scripts/functions: Fix CT_ExtractGit function.
Change CT_ExtractGit so that it clones the repository, instead of just
symlinking it. After cloning, any given ref is checked out, or if no
ref is given, the HEAD of the repository is checked out.
This makes CT_Extract behave similar for git repositories as it does
for tarballs, so that it for example can be used for passing glibc-ports
as a git repository.
Signed-off-by: "Esben Haabendal" <esben.haabendal@prevas.dk>
[yann.morin.1998@anciens.enib.fr: fix incomplete var rename]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
1 diff -durN ltrace-0.4.orig/Makefile.in ltrace-0.4/Makefile.in
2 --- ltrace-0.4.orig/Makefile.in 2006-03-05 23:21:07.000000000 +0100
3 +++ ltrace-0.4/Makefile.in 2008-10-24 10:31:51.000000000 +0200
8 -#OS := $(shell uname -s)
10 +ARCH := $(shell echo "@HOST_ARCH@" |sed -e s/i.86/i386/ \
11 + -e s/sun4u/sparc64/ \
24 -INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
25 -INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
26 -INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755
27 -INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755
28 +INSTALL_FILE = $(INSTALL) -p -m 644
29 +INSTALL_PROGRAM = $(INSTALL) -p -m 755
30 +INSTALL_SCRIPT = $(INSTALL) -p -m 755
31 +INSTALL_DIR = $(INSTALL) -p -d -m 755
33 OBJ = ltrace.o options.o elf.o output.o read_config_file.o \
34 execute_program.o wait_for_something.o process_event.o \
35 diff -durN ltrace-0.4.orig/configure ltrace-0.4/configure
36 --- ltrace-0.4.orig/configure 2008-10-23 23:35:39.000000000 +0200
37 +++ ltrace-0.4/configure 2008-10-24 10:27:20.000000000 +0200
42 -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os HOST_OS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP iquote iquoteend LIBOBJS LTLIBOBJS'
43 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os HOST_ARCH HOST_OS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP iquote iquoteend LIBOBJS LTLIBOBJS'
46 # Initialize some variables set by options.
48 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
49 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
52 +HOST_ARCH="$host_cpu"
55 linux-*) HOST_OS=linux-gnu;;
57 s,@host_cpu@,$host_cpu,;t t
58 s,@host_vendor@,$host_vendor,;t t
59 s,@host_os@,$host_os,;t t
60 +s,@HOST_ARCH@,$HOST_ARCH,;t t
61 s,@HOST_OS@,$HOST_OS,;t t
63 s,@CFLAGS@,$CFLAGS,;t t
64 diff -durN ltrace-0.4.orig/configure.ac ltrace-0.4/configure.ac
65 --- ltrace-0.4.orig/configure.ac 2008-10-23 23:35:39.000000000 +0200
66 +++ ltrace-0.4/configure.ac 2008-10-24 10:19:47.000000000 +0200
69 dnl Check host system type
71 +HOST_ARCH="$host_cpu"
74 linux-*) HOST_OS=linux-gnu;;
79 dnl Checks for programs.
80 diff -durN ltrace-0.4.orig/sysdeps/linux-gnu/Makefile ltrace-0.4/sysdeps/linux-gnu/Makefile
81 --- ltrace-0.4.orig/sysdeps/linux-gnu/Makefile 2006-02-20 22:44:45.000000000 +0100
82 +++ ltrace-0.4/sysdeps/linux-gnu/Makefile 2008-10-24 10:24:41.000000000 +0200
84 -ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
85 - -e s/arm.*/arm/ -e s/sa110/arm/ -e s/ppc64/ppc/ -e s/s390x/s390/)
87 CPPFLAGS += -I$(TOPDIR)/sysdeps/linux-gnu/$(ARCH)
89 OBJ = trace.o proc.o breakpoint.o