From dbd57f99680eac33626d5058459efd7f118f5170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Thu, 20 Aug 2009 20:46:56 +0700 Subject: Add test-index-version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 06aaaa0bf70fe37d198893f4e25fa73b6516f8a9 may step index format version up and down, depends on whether extended flags present in the index. This adds a test to check for index format version. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index daf4296706..3c5b890223 100644 --- a/Makefile +++ b/Makefile @@ -1580,6 +1580,7 @@ TEST_PROGRAMS += test-parse-options$X TEST_PROGRAMS += test-path-utils$X TEST_PROGRAMS += test-sha1$X TEST_PROGRAMS += test-sigchain$X +TEST_PROGRAMS += test-index-version$X all:: $(TEST_PROGRAMS) -- cgit v1.2.3 From d4e1b47a922576e6af98cd84913471a6d3096ac0 Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Wed, 18 Nov 2009 02:42:31 +0100 Subject: Basic build infrastructure for Python scripts This patch adds basic boilerplate support (based on corresponding Perl sections) for enabling the building and installation Python scripts. There are currently no Python scripts being built, and when Python scripts are added in future patches, their building and installation can be disabled by defining NO_PYTHON. Signed-off-by: Johan Herland Signed-off-by: Junio C Hamano --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 268aede566..b27a7d603b 100644 --- a/Makefile +++ b/Makefile @@ -164,6 +164,8 @@ all:: # # Define NO_PERL if you do not want Perl scripts or libraries at all. # +# Define NO_PYTHON if you do not want Python scripts or libraries at all. +# # Define NO_TCLTK if you do not want Tcl/Tk GUI. # # The TCL_PATH variable governs the location of the Tcl interpreter @@ -308,6 +310,7 @@ LIB_H = LIB_OBJS = PROGRAMS = SCRIPT_PERL = +SCRIPT_PYTHON = SCRIPT_SH = TEST_PROGRAMS = @@ -345,6 +348,7 @@ SCRIPT_PERL += git-svn.perl SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \ $(patsubst %.perl,%,$(SCRIPT_PERL)) \ + $(patsubst %.py,%,$(SCRIPT_PYTHON)) \ git-instaweb # Empty... @@ -398,8 +402,12 @@ endif ifndef PERL_PATH PERL_PATH = /usr/bin/perl endif +ifndef PYTHON_PATH + PYTHON_PATH = /usr/bin/python +endif export PERL_PATH +export PYTHON_PATH LIB_FILE=libgit.a XDIFF_LIB=xdiff/lib.a @@ -1308,6 +1316,10 @@ ifeq ($(PERL_PATH),) NO_PERL=NoThanks endif +ifeq ($(PYTHON_PATH),) +NO_PYTHON=NoThanks +endif + QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir QUIET_SUBDIR1 = @@ -1355,6 +1367,7 @@ prefix_SQ = $(subst ','\'',$(prefix)) SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) +PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH)) TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH)) LIBS = $(GITLIBS) $(EXTLIBS) -- cgit v1.2.3 From 2fe40b63001844f9a884ac9cb49cabd5e183b62f Mon Sep 17 00:00:00 2001 From: Sverre Rabbelier Date: Wed, 18 Nov 2009 02:42:32 +0100 Subject: Add Python support library for remote helpers This patch introduces parts of a Python package called "git_remote_helpers" containing the building blocks for remote helpers written in Python. No actual remote helpers are part of this patch, this patch only includes the common basics needed to start writing such helpers. The patch includes the necessary Makefile additions to build and install the git_remote_helpers Python package along with the rest of Git. This patch is based on Johan Herland's git_remote_cvs patch and has been improved by the following contributions: - David Aguilar: Lots of Python coding style fixes - David Aguilar: DESTDIR support in Makefile Cc: David Aguilar Cc: Johan Herland Signed-off-by: Sverre Rabbelier Signed-off-by: Johan Herland Signed-off-by: Junio C Hamano --- Makefile | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b27a7d603b..a95ffda23a 100644 --- a/Makefile +++ b/Makefile @@ -1398,6 +1398,9 @@ ifndef NO_TCLTK endif ifndef NO_PERL $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all +endif +ifndef NO_PYTHON + $(QUIET_SUBDIR0)git_remote_helpers $(QUIET_SUBDIR1) PYTHON_PATH='$(PYTHON_PATH_SQ)' prefix='$(prefix_SQ)' all endif $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) @@ -1517,6 +1520,35 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh mv $@+ $@ endif # NO_PERL +ifndef NO_PYTHON +$(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS +$(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py + $(QUIET_GEN)$(RM) $@ $@+ && \ + INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C git_remote_helpers -s \ + --no-print-directory prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' \ + instlibdir` && \ + sed -e '1{' \ + -e ' s|#!.*python|#!$(PYTHON_PATH_SQ)|' \ + -e '}' \ + -e 's|^import sys.*|&; \\\ + import os; \\\ + sys.path[0] = os.environ.has_key("GITPYTHONLIB") and \\\ + os.environ["GITPYTHONLIB"] or \\\ + "@@INSTLIBDIR@@"|' \ + -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \ + $@.py >$@+ && \ + chmod +x $@+ && \ + mv $@+ $@ +else # NO_PYTHON +$(patsubst %.py,%,$(SCRIPT_PYTHON)): % : unimplemented.sh + $(QUIET_GEN)$(RM) $@ $@+ && \ + sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ + -e 's|@@REASON@@|NO_PYTHON=$(NO_PYTHON)|g' \ + unimplemented.sh >$@+ && \ + chmod +x $@+ && \ + mv $@+ $@ +endif # NO_PYTHON + configure: configure.ac $(QUIET_GEN)$(RM) $@ $<+ && \ sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ @@ -1741,6 +1773,9 @@ install: all ifndef NO_PERL $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install endif +ifndef NO_PYTHON + $(MAKE) -C git_remote_helpers prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install +endif ifndef NO_TCLTK $(MAKE) -C gitk-git install $(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' install @@ -1854,6 +1889,9 @@ clean: ifndef NO_PERL $(RM) gitweb/gitweb.cgi $(MAKE) -C perl clean +endif +ifndef NO_PYTHON + $(MAKE) -C git_remote_helpers clean endif $(MAKE) -C templates/ clean $(MAKE) -C t/ clean -- cgit v1.2.3 From ea925196f1bd3acaabaeaf384cc694337db97b2b Mon Sep 17 00:00:00 2001 From: Matthew Ogilvie Date: Wed, 2 Dec 2009 22:14:05 -0700 Subject: build dashless "bin-wrappers" directory similar to installed bindir The new bin-wrappers directory contains wrapper scripts for executables that will be installed into the standard bindir. It explicitly does not contain most dashed-commands. The scripts automatically set environment variables to run out of the source tree, not the installed directory. This will allow running the test suite without dashed commands in the PATH. It also provides a simplified way to test run custom built git executables without installing them first. bin-wrappers also contains wrappers for some test suite support executables, where the test suite will soon make use of them. Signed-off-by: Matthew Ogilvie Signed-off-by: Junio C Hamano --- Makefile | 49 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 13 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4dba10e7f0..b981364536 100644 --- a/Makefile +++ b/Makefile @@ -416,6 +416,15 @@ ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) # what 'all' will build but not install in gitexecdir OTHER_PROGRAMS = git$X +# what test wrappers are needed and 'install' will install, in bindir +BINDIR_PROGRAMS_NEED_X += git +BINDIR_PROGRAMS_NEED_X += git-upload-pack +BINDIR_PROGRAMS_NEED_X += git-receive-pack +BINDIR_PROGRAMS_NEED_X += git-upload-archive +BINDIR_PROGRAMS_NEED_X += git-shell + +BINDIR_PROGRAMS_NO_X += git-cvsserver + # Set paths to tools early so that they can be used for version tests. ifndef SHELL_PATH SHELL_PATH = /bin/sh @@ -1690,19 +1699,30 @@ endif ### Testing rules -TEST_PROGRAMS += test-chmtime$X -TEST_PROGRAMS += test-ctype$X -TEST_PROGRAMS += test-date$X -TEST_PROGRAMS += test-delta$X -TEST_PROGRAMS += test-dump-cache-tree$X -TEST_PROGRAMS += test-genrandom$X -TEST_PROGRAMS += test-match-trees$X -TEST_PROGRAMS += test-parse-options$X -TEST_PROGRAMS += test-path-utils$X -TEST_PROGRAMS += test-sha1$X -TEST_PROGRAMS += test-sigchain$X +TEST_PROGRAMS_NEED_X += test-chmtime +TEST_PROGRAMS_NEED_X += test-ctype +TEST_PROGRAMS_NEED_X += test-date +TEST_PROGRAMS_NEED_X += test-delta +TEST_PROGRAMS_NEED_X += test-dump-cache-tree +TEST_PROGRAMS_NEED_X += test-genrandom +TEST_PROGRAMS_NEED_X += test-match-trees +TEST_PROGRAMS_NEED_X += test-parse-options +TEST_PROGRAMS_NEED_X += test-path-utils +TEST_PROGRAMS_NEED_X += test-sha1 +TEST_PROGRAMS_NEED_X += test-sigchain + +TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X)) -all:: $(TEST_PROGRAMS) +test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(BINDIR_PROGRAMS_NO_X) $(TEST_PROGRAMS_NEED_X)) + +all:: $(TEST_PROGRAMS) $(test_bindir_programs) + +bin-wrappers/%: wrap-for-bin.sh + @mkdir -p bin-wrappers + $(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ + -e 's|@@BUILD_DIR@@|$(shell pwd)|' \ + -e 's|@@PROG@@|$(@F)|' < $< > $@ && \ + chmod +x $@ # GNU make supports exporting all variables by "export" without parameters. # However, the environment gets quite big, and some programs have problems @@ -1763,11 +1783,13 @@ endif gitexec_instdir_SQ = $(subst ','\'',$(gitexec_instdir)) export gitexec_instdir +install_bindir_programs := $(patsubst %,%$X,$(BINDIR_PROGRAMS_NEED_X)) $(BINDIR_PROGRAMS_NO_X) + install: all $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' - $(INSTALL) git$X git-upload-pack$X git-receive-pack$X git-upload-archive$X git-shell$X git-cvsserver '$(DESTDIR_SQ)$(bindir_SQ)' + $(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)' $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install ifndef NO_PERL $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install @@ -1878,6 +1900,7 @@ clean: $(LIB_FILE) $(XDIFF_LIB) $(RM) $(ALL_PROGRAMS) $(BUILT_INS) git$X $(RM) $(TEST_PROGRAMS) + $(RM) -r bin-wrappers $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope* $(RM) -r autom4te.cache $(RM) config.log config.mak.autogen config.mak.append config.status config.cache -- cgit v1.2.3 From ac10a85785baee56bb4a04ad5f847d15ffba0893 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 7 Dec 2009 00:32:50 -0500 Subject: tests: handle NO_PYTHON setting Without this, test-lib checks that the git_remote_helpers directory has been built. However, if we are building without python, we will not have done anything at all in that directory, and test-lib's sanity check will fail. We bump the inclusion of GIT-BUILD-OPTIONS further up in test-lib; it contains configuration, and as such should be read before we do any checks (and in this particular case, we need its value to do our check properly). Signed-off-by: Jeff King Looks-fine-to-me-by: Brandon Casey Acked-by: Johan Herland Signed-off-by: Junio C Hamano --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a95ffda23a..b43725210b 100644 --- a/Makefile +++ b/Makefile @@ -1674,6 +1674,7 @@ GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS @echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@ @echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@ @echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@ + @echo NO_PYTHON=\''$(subst ','\'',$(subst ','\'',$(NO_PYTHON)))'\' >>$@ ### Detect Tck/Tk interpreter path changes ifndef NO_TCLTK -- cgit v1.2.3 From cfc5789ada444423232fa1533f401b5972eb3f6c Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 25 Dec 2009 00:30:51 -0800 Subject: resolve-undo: record resolved conflicts in a new index extension section When resolving a conflict using "git add" to create a stage #0 entry, or "git rm" to remove entries at higher stages, remove_index_entry_at() function is eventually called to remove unmerged (i.e. higher stage) entries from the index. Introduce a "resolve_undo_info" structure and keep track of the removed cache entries, and save it in a new index extension section in the index_state. Operations like "read-tree -m", "merge", "checkout [-m] " and "reset" are signs that recorded information in the index is no longer necessary. The data is removed from the index extension when operations start; they may leave conflicted entries in the index, and later user actions like "git add" will record their conflicted states afresh. Signed-off-by: Junio C Hamano --- Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4a1e5bcc4d..762898ae7f 100644 --- a/Makefile +++ b/Makefile @@ -483,6 +483,7 @@ LIB_H += reflog-walk.h LIB_H += refs.h LIB_H += remote.h LIB_H += rerere.h +LIB_H += resolve-undo.h LIB_H += revision.h LIB_H += run-command.h LIB_H += sha1-lookup.h @@ -578,6 +579,7 @@ LIB_OBJS += refs.o LIB_OBJS += remote.o LIB_OBJS += replace_object.o LIB_OBJS += rerere.o +LIB_OBJS += resolve-undo.o LIB_OBJS += revision.o LIB_OBJS += run-command.o LIB_OBJS += server-info.o -- cgit v1.2.3 From 28ca0c90080ec933d82b0f7d050ea5fde2816c57 Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Wed, 9 Dec 2009 17:26:34 +0200 Subject: Remove special casing of http, https and ftp HTTP, HTTPS and FTP are no longer special to transport code. Also add support for FTPS (curl supports it so it is easy). Signed-off-by: Ilari Liusvaara Signed-off-by: Junio C Hamano --- Makefile | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2ad7e366ef..87fc7ff476 100644 --- a/Makefile +++ b/Makefile @@ -424,6 +424,16 @@ BUILT_INS += git-stage$X BUILT_INS += git-status$X BUILT_INS += git-whatchanged$X +ifdef NO_CURL +REMOTE_CURL_PRIMARY = +REMOTE_CURL_ALIASES = +REMOTE_CURL_NAMES = +else +REMOTE_CURL_PRIMARY = git-remote-http$X +REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X +REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) +endif + # what 'all' will build and 'install' will install in gitexecdir, # excluding programs for built-in commands ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) @@ -1097,7 +1107,7 @@ else else CURL_LIBCURL = -lcurl endif - PROGRAMS += git-remote-curl$X git-http-fetch$X + PROGRAMS += $(REMOTE_CURL_NAMES) git-http-fetch$X curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p) ifeq "$(curl_check)" "070908" ifndef NO_EXPAT @@ -1676,7 +1686,13 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) -git-remote-curl$X: remote-curl.o http.o http-walker.o $(GITLIBS) +$(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY) + $(QUIET_LNCP)$(RM) $@ && \ + ln $< $@ 2>/dev/null || \ + ln -s $< $@ 2>/dev/null || \ + cp $< $@ + +$(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) @@ -1852,6 +1868,7 @@ endif ifneq (,$X) $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' -ef '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p$X' || $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';) endif + bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \ { test "$$bindir/" = "$$execdir/" || \ @@ -1865,6 +1882,12 @@ endif ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \ cp "$$execdir/git$X" "$$execdir/$$p" || exit; \ done; } && \ + { for p in $(REMOTE_CURL_ALIASES); do \ + $(RM) "$$execdir/$$p" && \ + ln "$$execdir/git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \ + ln -s "git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \ + cp "$$execdir/git-remote-http$X" "$$execdir/$$p" || exit; \ + done; } && \ ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X" install-doc: -- cgit v1.2.3 From 4ecbc65fa7decb2aa271d68d54e8563a679e6ec1 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 6 Jan 2010 00:37:59 -0600 Subject: Makefile: make ppc/sha1ppc.o depend on GIT-CFLAGS The %.o: %.S pattern rule should depend on GIT-CFLAGS to avoid trouble when ALL_CFLAGS changes. The pattern only applies to one file (ppc/sha1ppc.S) and that file does not use any #ifdefs, so leaving the dependency out is probably harmless. Nevertheless, it is safer to include the dependency in case future code's behavior does depend on the build flags. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c11719c277..015bfabb9c 100644 --- a/Makefile +++ b/Makefile @@ -1635,7 +1635,7 @@ git.o git.spec \ $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $< %.s: %.c GIT-CFLAGS $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $< -%.o: %.S +%.o: %.S GIT-CFLAGS $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $< exec_cmd.o: exec_cmd.c GIT-CFLAGS -- cgit v1.2.3 From 31838b4dcd27961b13e46ffd126233b208a29530 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 6 Jan 2010 02:04:20 -0600 Subject: Makefile: regenerate assembler listings when asked 'make var.s' fails to regenerate an assembler listing if var.c has not changed but a header it includes has: $ make var.s CC var.s $ touch cache.h $ make var.s $ The corresponding problem for 'make var.o' does not occur because the Makefile lists dependencies for each .o target explicitly; analogous dependency rules for the .s targets are not present. Rather than add some, it seems better to force 'make' to always regenerate assembler listings, since the assembler listing targets are only invoked when specifically requested on the make command line. Acked-by: Linus Torvalds Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 015bfabb9c..36e6f812b3 100644 --- a/Makefile +++ b/Makefile @@ -1633,7 +1633,7 @@ git.o git.spec \ %.o: %.c GIT-CFLAGS $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $< -%.s: %.c GIT-CFLAGS +%.s: %.c GIT-CFLAGS .FORCE-LISTING $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $< %.o: %.S GIT-CFLAGS $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $< @@ -1978,7 +1978,7 @@ endif .PHONY: all install clean strip .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell .PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS -.PHONY: .FORCE-GIT-BUILD-OPTIONS +.PHONY: .FORCE-GIT-BUILD-OPTIONS .FORCE-LISTING ### Check documentation # -- cgit v1.2.3 From 373a5ede53863132dbd3eeab262a8e29e763ddab Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 6 Jan 2010 02:05:04 -0600 Subject: Makefile: use target-specific variable to pass flags to cc This allows reusing the standard %.o: %.c pattern rule even for targets that require special flags to be set. Thus after this change, any changes in the command for compilation only have to be performed in one place. Target-specific variables have been supported in GNU make since version 3.77, which has been available since 1998. Acked-by: Linus Torvalds Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Makefile | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 36e6f812b3..2580e23112 100644 --- a/Makefile +++ b/Makefile @@ -1467,20 +1467,19 @@ shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell strip: $(PROGRAMS) git$X $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X -git.o: git.c common-cmds.h GIT-CFLAGS - $(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \ - '-DGIT_HTML_PATH="$(htmldir_SQ)"' \ - $(ALL_CFLAGS) -o $@ -c $(filter %.c,$^) +git.o: common-cmds.h +git.o: ALL_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' \ + '-DGIT_HTML_PATH="$(htmldir_SQ)"' git$X: git.o $(BUILTIN_OBJS) $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \ $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS) -builtin-help.o: builtin-help.c common-cmds.h GIT-CFLAGS - $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \ - '-DGIT_HTML_PATH="$(htmldir_SQ)"' \ - '-DGIT_MAN_PATH="$(mandir_SQ)"' \ - '-DGIT_INFO_PATH="$(infodir_SQ)"' $< +builtin-help.o: common-cmds.h +builtin-help.o: ALL_CFLAGS += \ + '-DGIT_HTML_PATH="$(htmldir_SQ)"' \ + '-DGIT_MAN_PATH="$(mandir_SQ)"' \ + '-DGIT_INFO_PATH="$(infodir_SQ)"' $(BUILT_INS): git$X $(QUIET_BUILT_IN)$(RM) $@ && \ @@ -1638,25 +1637,21 @@ git.o git.spec \ %.o: %.S GIT-CFLAGS $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $< -exec_cmd.o: exec_cmd.c GIT-CFLAGS - $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \ - '-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \ - '-DBINDIR="$(bindir_relative_SQ)"' \ - '-DPREFIX="$(prefix_SQ)"' \ - $< +exec_cmd.o: ALL_CFLAGS += \ + '-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \ + '-DBINDIR="$(bindir_relative_SQ)"' \ + '-DPREFIX="$(prefix_SQ)"' -builtin-init-db.o: builtin-init-db.c GIT-CFLAGS - $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' $< +builtin-init-db.o: ALL_CFLAGS += \ + -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' -config.o: config.c GIT-CFLAGS - $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' $< +config.o: ALL_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' -http.o: http.c GIT-CFLAGS - $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DGIT_USER_AGENT='"git/$(GIT_VERSION)"' $< +http.o: ALL_CFLAGS += -DGIT_USER_AGENT='"git/$(GIT_VERSION)"' ifdef NO_EXPAT -http-walker.o: http-walker.c http.h GIT-CFLAGS - $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DNO_EXPAT $< +http-walker.o: http.h +http-walker.o: ALL_CFLAGS += -DNO_EXPAT endif git-%$X: %.o $(GITLIBS) -- cgit v1.2.3 From de54e67c1a892167ade274017a946de1f99920d1 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 6 Jan 2010 02:06:03 -0600 Subject: Makefile: learn to generate listings for targets requiring special flags 'make git.s' to debug code generation of main() fails because git.c makes use of preprocessor symbols such as GIT_VERSION that are not set. make does not generate code listings for builtin_help.c, exec_cmd.c, builtin-init-db.c, config.c, http.c, or http-walker.c either, for the same reason. So pass the flags used to generate each .o file when generating the corresponding assembler listing. Acked-by: Linus Torvalds Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2580e23112..896cf45a07 100644 --- a/Makefile +++ b/Makefile @@ -1468,7 +1468,7 @@ strip: $(PROGRAMS) git$X $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X git.o: common-cmds.h -git.o: ALL_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' \ +git.s git.o: ALL_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' \ '-DGIT_HTML_PATH="$(htmldir_SQ)"' git$X: git.o $(BUILTIN_OBJS) $(GITLIBS) @@ -1476,7 +1476,7 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS) $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS) builtin-help.o: common-cmds.h -builtin-help.o: ALL_CFLAGS += \ +builtin-help.s builtin-help.o: ALL_CFLAGS += \ '-DGIT_HTML_PATH="$(htmldir_SQ)"' \ '-DGIT_MAN_PATH="$(mandir_SQ)"' \ '-DGIT_INFO_PATH="$(infodir_SQ)"' @@ -1637,21 +1637,21 @@ git.o git.spec \ %.o: %.S GIT-CFLAGS $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $< -exec_cmd.o: ALL_CFLAGS += \ +exec_cmd.s exec_cmd.o: ALL_CFLAGS += \ '-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \ '-DBINDIR="$(bindir_relative_SQ)"' \ '-DPREFIX="$(prefix_SQ)"' -builtin-init-db.o: ALL_CFLAGS += \ +builtin-init-db.s builtin-init-db.o: ALL_CFLAGS += \ -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' -config.o: ALL_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' +config.s config.o: ALL_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' -http.o: ALL_CFLAGS += -DGIT_USER_AGENT='"git/$(GIT_VERSION)"' +http.s http.o: ALL_CFLAGS += -DGIT_USER_AGENT='"git/$(GIT_VERSION)"' ifdef NO_EXPAT http-walker.o: http.h -http-walker.o: ALL_CFLAGS += -DNO_EXPAT +http-walker.s http-walker.o: ALL_CFLAGS += -DNO_EXPAT endif git-%$X: %.o $(GITLIBS) -- cgit v1.2.3 From 13fca9f36b6dfa1a4a8bb3a67bb9a41705bea68a Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 6 Jan 2010 02:06:58 -0600 Subject: Makefile: consolidate .FORCE-* targets Providing multiple targets to force a rebuild is unnecessary complication. Avoid using a name that could conflict with future special targets in GNU make (a leading period followed by uppercase letters). The corresponding change to the git-gui Makefile is left for another patch. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Makefile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 896cf45a07..8ce6fd785c 100644 --- a/Makefile +++ b/Makefile @@ -222,7 +222,7 @@ all:: # DEFAULT_EDITOR='$GIT_FALLBACK_EDITOR', # DEFAULT_EDITOR='"C:\Program Files\Vim\gvim.exe" --nofork' -GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE +GIT-VERSION-FILE: FORCE @$(SHELL_PATH) ./GIT-VERSION-GEN -include GIT-VERSION-FILE @@ -1632,7 +1632,7 @@ git.o git.spec \ %.o: %.c GIT-CFLAGS $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $< -%.s: %.c GIT-CFLAGS .FORCE-LISTING +%.s: %.c GIT-CFLAGS FORCE $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $< %.o: %.S GIT-CFLAGS $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $< @@ -1723,7 +1723,7 @@ cscope: TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\ $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ) -GIT-CFLAGS: .FORCE-GIT-CFLAGS +GIT-CFLAGS: FORCE @FLAGS='$(TRACK_CFLAGS)'; \ if test x"$$FLAGS" != x"`cat GIT-CFLAGS 2>/dev/null`" ; then \ echo 1>&2 " * new build flags or prefix"; \ @@ -1733,7 +1733,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS # We need to apply sq twice, once to protect from the shell # that runs GIT-BUILD-OPTIONS, and then again to protect it # and the first level quoting from the shell that runs "echo". -GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS +GIT-BUILD-OPTIONS: FORCE @echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@ @echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@ @echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@ @@ -1745,14 +1745,12 @@ GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS ifndef NO_TCLTK TRACK_VARS = $(subst ','\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)') -GIT-GUI-VARS: .FORCE-GIT-GUI-VARS +GIT-GUI-VARS: FORCE @VARS='$(TRACK_VARS)'; \ if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \ echo 1>&2 " * new Tcl/Tk interpreter location"; \ echo "$$VARS" >$@; \ fi - -.PHONY: .FORCE-GIT-GUI-VARS endif ### Testing rules @@ -1972,8 +1970,7 @@ endif .PHONY: all install clean strip .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell -.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS -.PHONY: .FORCE-GIT-BUILD-OPTIONS .FORCE-LISTING +.PHONY: FORCE TAGS tags cscope ### Check documentation # -- cgit v1.2.3 From 2b541bf8be2bbd6cc8daf8e3d5d4a8ee30b2ce4e Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Sun, 10 Jan 2010 14:11:22 +0100 Subject: start_command: detect execvp failures early Previously, failures during execvp could be detected only by finish_command. However, in some situations it is beneficial for the parent process to know earlier that the child process will not run. The idea to use a pipe to signal failures to the parent process and the test case were lifted from patches by Ilari Liusvaara. Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 87fc7ff476..22c1546e2f 100644 --- a/Makefile +++ b/Makefile @@ -1785,6 +1785,7 @@ TEST_PROGRAMS += test-genrandom$X TEST_PROGRAMS += test-match-trees$X TEST_PROGRAMS += test-parse-options$X TEST_PROGRAMS += test-path-utils$X +TEST_PROGRAMS += test-run-command$X TEST_PROGRAMS += test-sha1$X TEST_PROGRAMS += test-sigchain$X -- cgit v1.2.3 From bbc09c22b9f7784b1aab71d4876227956e6e8f4f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 12 Jan 2010 19:06:41 -0800 Subject: grep: rip out support for external grep We still allow people to pass --[no-]ext-grep on the command line, but the option is ignored. Signed-off-by: Junio C Hamano --- Makefile | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4a1e5bcc4d..a4b922e070 100644 --- a/Makefile +++ b/Makefile @@ -185,10 +185,6 @@ all:: # is a simplified version of the merge sort used in glibc. This is # recommended if Git triggers O(n^2) behavior in your platform's qsort(). # -# Define NO_EXTERNAL_GREP if you don't want "git grep" to ever call -# your external grep (e.g., if your system lacks grep, if its grep is -# broken, or spawning external process is slower than built-in grep git has). -# # Define UNRELIABLE_FSTAT if your system's fstat does not return the same # information on a not yet closed file that lstat would return for the same # file after it was closed. @@ -777,7 +773,6 @@ ifeq ($(uname_S),SunOS) NO_MKDTEMP = YesPlease NO_MKSTEMPS = YesPlease NO_REGEX = YesPlease - NO_EXTERNAL_GREP = YesPlease THREADED_DELTA_SEARCH = YesPlease ifeq ($(uname_R),5.7) NEEDS_RESOLV = YesPlease @@ -895,7 +890,6 @@ ifeq ($(uname_S),IRIX) # NO_MMAP. If you suspect that your compiler is not affected by this # issue, comment out the NO_MMAP statement. NO_MMAP = YesPlease - NO_EXTERNAL_GREP = UnfortunatelyYes SNPRINTF_RETURNS_BOGUS = YesPlease SHELL_PATH = /usr/gnu/bin/bash NEEDS_LIBGEN = YesPlease @@ -915,7 +909,6 @@ ifeq ($(uname_S),IRIX64) # NO_MMAP. If you suspect that your compiler is not affected by this # issue, comment out the NO_MMAP statement. NO_MMAP = YesPlease - NO_EXTERNAL_GREP = UnfortunatelyYes SNPRINTF_RETURNS_BOGUS = YesPlease SHELL_PATH=/usr/gnu/bin/bash NEEDS_LIBGEN = YesPlease @@ -1322,9 +1315,6 @@ endif ifdef DIR_HAS_BSD_GROUP_SEMANTICS COMPAT_CFLAGS += -DDIR_HAS_BSD_GROUP_SEMANTICS endif -ifdef NO_EXTERNAL_GREP - BASIC_CFLAGS += -DNO_EXTERNAL_GREP -endif ifdef UNRELIABLE_FSTAT BASIC_CFLAGS += -DUNRELIABLE_FSTAT endif -- cgit v1.2.3 From 56932249cf7d327115eae608d550e3a8cca4ea06 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 15 Jan 2010 21:12:15 +0100 Subject: Windows: disable Python Python is not commonly installed on Windows machines, so we should disable it there by default. Signed-off-by: Erik Faye-Lund Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 57045dee89..6933555660 100644 --- a/Makefile +++ b/Makefile @@ -995,6 +995,7 @@ ifeq ($(uname_S),Windows) OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo NO_REGEX = YesPlease NO_CURL = YesPlease + NO_PYTHON = YesPlease NO_PTHREADS = YesPlease BLK_SHA1 = YesPlease @@ -1045,6 +1046,7 @@ ifneq (,$(findstring MINGW,$(uname_S))) UNRELIABLE_FSTAT = UnfortunatelyYes OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo NO_REGEX = YesPlease + NO_PYTHON = YesPlease BLK_SHA1 = YesPlease COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" -- cgit v1.2.3 From 44626dc7d562d23b54d969bb73ddeda12d5602e9 Mon Sep 17 00:00:00 2001 From: "Andrzej K. Haczewski" Date: Fri, 15 Jan 2010 21:12:20 +0100 Subject: MSVC: Windows-native implementation for subset of Pthreads API This patch implements native to Windows subset of pthreads API used by Git. It allows to remove Pthreads for Win32 dependency for MSVC, msysgit and Cygwin. [J6t: If the MinGW build was built as part of the msysgit build environment, then threading was already enabled because the pthreads-win32 package is available in msysgit. With this patch, we can now enable threaded code unconditionally.] Signed-off-by: Andrzej K. Haczewski Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6933555660..7f5814c7a3 100644 --- a/Makefile +++ b/Makefile @@ -478,6 +478,7 @@ LIB_H += commit.h LIB_H += compat/bswap.h LIB_H += compat/cygwin.h LIB_H += compat/mingw.h +LIB_H += compat/win32/pthread.h LIB_H += csum-file.h LIB_H += decorate.h LIB_H += delta.h @@ -996,15 +997,15 @@ ifeq ($(uname_S),Windows) NO_REGEX = YesPlease NO_CURL = YesPlease NO_PYTHON = YesPlease - NO_PTHREADS = YesPlease BLK_SHA1 = YesPlease + THREADED_DELTA_SEARCH = YesPlease CC = compat/vcbuild/scripts/clink.pl AR = compat/vcbuild/scripts/lib.pl CFLAGS = BASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE - COMPAT_OBJS = compat/msvc.o compat/fnmatch/fnmatch.o compat/winansi.o - COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/fnmatch -Icompat/regex -Icompat/fnmatch -DSTRIP_EXTENSION=\".exe\" + COMPAT_OBJS = compat/msvc.o compat/fnmatch/fnmatch.o compat/winansi.o compat/win32/pthread.o + COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/fnmatch -Icompat/regex -Icompat/fnmatch -Icompat/win32 -DSTRIP_EXTENSION=\".exe\" BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib EXTLIBS = advapi32.lib shell32.lib wininet.lib ws2_32.lib lib = @@ -1048,9 +1049,11 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_REGEX = YesPlease NO_PYTHON = YesPlease BLK_SHA1 = YesPlease + THREADED_DELTA_SEARCH = YesPlease COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" - COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o + COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \ + compat/win32/pthread.o EXTLIBS += -lws2_32 X = .exe ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) @@ -1060,10 +1063,8 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) EXTLIBS += /mingw/lib/libz.a NO_R_TO_GCC_LINKER = YesPlease INTERNAL_QSORT = YesPlease - THREADED_DELTA_SEARCH = YesPlease else NO_CURL = YesPlease - NO_PTHREADS = YesPlease endif endif -- cgit v1.2.3 From 4256f36c58238a1b2317372b37be889d75a93198 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Tue, 19 Jan 2010 16:39:12 +0100 Subject: Makefile: honor NO_CURL when setting REMOTE_CURL_* variables Previously, these variables were set before there was a chance to set NO_CURL. This made a difference only during 'make install', because by installing $(REMOTE_CURL_ALIASES), the rule tries to access $(REMOTE_CURL_PRIMARY), which was never installed. On Windows, this fails; on Unix, stale symbolic links are created. Signed-off-by: Johannes Sixt Acked-by: Ilari Liusvaara Signed-off-by: Junio C Hamano --- Makefile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 45a23a4dc8..b7f56b7eaa 100644 --- a/Makefile +++ b/Makefile @@ -424,16 +424,6 @@ BUILT_INS += git-stage$X BUILT_INS += git-status$X BUILT_INS += git-whatchanged$X -ifdef NO_CURL -REMOTE_CURL_PRIMARY = -REMOTE_CURL_ALIASES = -REMOTE_CURL_NAMES = -else -REMOTE_CURL_PRIMARY = git-remote-http$X -REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X -REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) -endif - # what 'all' will build and 'install' will install in gitexecdir, # excluding programs for built-in commands ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) @@ -1112,6 +1102,9 @@ endif ifdef NO_CURL BASIC_CFLAGS += -DNO_CURL + REMOTE_CURL_PRIMARY = + REMOTE_CURL_ALIASES = + REMOTE_CURL_NAMES = else ifdef CURLDIR # Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case. @@ -1120,6 +1113,9 @@ else else CURL_LIBCURL = -lcurl endif + REMOTE_CURL_PRIMARY = git-remote-http$X + REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X + REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) PROGRAMS += $(REMOTE_CURL_NAMES) git-http-fetch$X curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p) ifeq "$(curl_check)" "070908" -- cgit v1.2.3 From a5031214c4fe5f5d3fcf649d10769744cbc66fed Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 21 Jan 2010 15:25:19 -0800 Subject: slim down "git show-index" As the documentation says, this is primarily for debugging, and in the longer term we should rename it to test-show-index or something. In the meantime, just avoid xmalloc (which slurps in the rest of git), and separating out the trivial hex functions into "hex.o". This results in [torvalds@nehalem git]$ size git-show-index text data bss dec hex filename 222818 2276 112688 337782 52776 git-show-index (before) 5696 624 1264 7584 1da0 git-show-index (after) which is a whole lot better. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ad890ec925..a041b69561 100644 --- a/Makefile +++ b/Makefile @@ -559,6 +559,7 @@ LIB_OBJS += graph.o LIB_OBJS += grep.o LIB_OBJS += hash.o LIB_OBJS += help.o +LIB_OBJS += hex.o LIB_OBJS += ident.o LIB_OBJS += levenshtein.o LIB_OBJS += list-objects.o -- cgit v1.2.3 From 907a7cb51c6c44d25f4c734a46d5174363190a84 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 21 Jan 2010 18:25:20 -0800 Subject: make "git merge-tree" a built-in Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a041b69561..969adc7e20 100644 --- a/Makefile +++ b/Makefile @@ -391,7 +391,6 @@ PROGRAMS += git-hash-object$X PROGRAMS += git-imap-send$X PROGRAMS += git-index-pack$X PROGRAMS += git-merge-index$X -PROGRAMS += git-merge-tree$X PROGRAMS += git-mktag$X PROGRAMS += git-pack-redundant$X PROGRAMS += git-patch-id$X @@ -672,6 +671,7 @@ BUILTIN_OBJS += builtin-merge-base.o BUILTIN_OBJS += builtin-merge-file.o BUILTIN_OBJS += builtin-merge-ours.o BUILTIN_OBJS += builtin-merge-recursive.o +BUILTIN_OBJS += builtin-merge-tree.o BUILTIN_OBJS += builtin-mktree.o BUILTIN_OBJS += builtin-mv.o BUILTIN_OBJS += builtin-name-rev.o -- cgit v1.2.3 From b28a1ce04cdafbd3b470ec43c0f562054bd45d4d Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 21 Jan 2010 19:50:11 -0800 Subject: make "git hash-object" a built-in Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 969adc7e20..6e7431e5b3 100644 --- a/Makefile +++ b/Makefile @@ -387,7 +387,6 @@ EXTRA_PROGRAMS = # ... and all the rest that could be moved out of bindir to gitexecdir PROGRAMS += $(EXTRA_PROGRAMS) PROGRAMS += git-fast-import$X -PROGRAMS += git-hash-object$X PROGRAMS += git-imap-send$X PROGRAMS += git-index-pack$X PROGRAMS += git-merge-index$X @@ -658,6 +657,7 @@ BUILTIN_OBJS += builtin-for-each-ref.o BUILTIN_OBJS += builtin-fsck.o BUILTIN_OBJS += builtin-gc.o BUILTIN_OBJS += builtin-grep.o +BUILTIN_OBJS += builtin-hash-object.o BUILTIN_OBJS += builtin-help.o BUILTIN_OBJS += builtin-init-db.o BUILTIN_OBJS += builtin-log.o -- cgit v1.2.3 From 55b6745d633b9501576eb02183da0b0fb1cee964 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 21 Jan 2010 20:21:55 -0800 Subject: make "git var" a built-in Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6e7431e5b3..4558c4627b 100644 --- a/Makefile +++ b/Makefile @@ -397,7 +397,6 @@ PROGRAMS += git-shell$X PROGRAMS += git-show-index$X PROGRAMS += git-unpack-file$X PROGRAMS += git-upload-pack$X -PROGRAMS += git-var$X PROGRAMS += git-http-backend$X # List built-in command $C whose implementation cmd_$C() is not in @@ -704,6 +703,7 @@ BUILTIN_OBJS += builtin-update-index.o BUILTIN_OBJS += builtin-update-ref.o BUILTIN_OBJS += builtin-update-server-info.o BUILTIN_OBJS += builtin-upload-archive.o +BUILTIN_OBJS += builtin-var.o BUILTIN_OBJS += builtin-verify-pack.o BUILTIN_OBJS += builtin-verify-tag.o BUILTIN_OBJS += builtin-write-tree.o -- cgit v1.2.3 From dedc0ec5d778214528dae3bddf60d77cfcde4bd4 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 21 Jan 2010 20:31:25 -0800 Subject: make "git patch-id" a built-in Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4558c4627b..e1c7ae5850 100644 --- a/Makefile +++ b/Makefile @@ -392,7 +392,6 @@ PROGRAMS += git-index-pack$X PROGRAMS += git-merge-index$X PROGRAMS += git-mktag$X PROGRAMS += git-pack-redundant$X -PROGRAMS += git-patch-id$X PROGRAMS += git-shell$X PROGRAMS += git-show-index$X PROGRAMS += git-unpack-file$X @@ -676,6 +675,7 @@ BUILTIN_OBJS += builtin-mv.o BUILTIN_OBJS += builtin-name-rev.o BUILTIN_OBJS += builtin-pack-objects.o BUILTIN_OBJS += builtin-pack-refs.o +BUILTIN_OBJS += builtin-patch-id.o BUILTIN_OBJS += builtin-prune-packed.o BUILTIN_OBJS += builtin-prune.o BUILTIN_OBJS += builtin-push.o -- cgit v1.2.3 From 0ecace728f8e48b87f81433b053d7f277f22e674 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 22 Jan 2010 07:29:21 -0800 Subject: make "merge-index" a built-in Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e1c7ae5850..70ac4b3e23 100644 --- a/Makefile +++ b/Makefile @@ -389,7 +389,6 @@ PROGRAMS += $(EXTRA_PROGRAMS) PROGRAMS += git-fast-import$X PROGRAMS += git-imap-send$X PROGRAMS += git-index-pack$X -PROGRAMS += git-merge-index$X PROGRAMS += git-mktag$X PROGRAMS += git-pack-redundant$X PROGRAMS += git-shell$X @@ -667,6 +666,7 @@ BUILTIN_OBJS += builtin-mailsplit.o BUILTIN_OBJS += builtin-merge.o BUILTIN_OBJS += builtin-merge-base.o BUILTIN_OBJS += builtin-merge-file.o +BUILTIN_OBJS += builtin-merge-index.o BUILTIN_OBJS += builtin-merge-ours.o BUILTIN_OBJS += builtin-merge-recursive.o BUILTIN_OBJS += builtin-merge-tree.o -- cgit v1.2.3 From 112dd5146589ecb76d52bf349bd51dbe2936e936 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 22 Jan 2010 07:34:44 -0800 Subject: make "mktag" a built-in Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 70ac4b3e23..c5a1190ebe 100644 --- a/Makefile +++ b/Makefile @@ -389,7 +389,6 @@ PROGRAMS += $(EXTRA_PROGRAMS) PROGRAMS += git-fast-import$X PROGRAMS += git-imap-send$X PROGRAMS += git-index-pack$X -PROGRAMS += git-mktag$X PROGRAMS += git-pack-redundant$X PROGRAMS += git-shell$X PROGRAMS += git-show-index$X @@ -670,6 +669,7 @@ BUILTIN_OBJS += builtin-merge-index.o BUILTIN_OBJS += builtin-merge-ours.o BUILTIN_OBJS += builtin-merge-recursive.o BUILTIN_OBJS += builtin-merge-tree.o +BUILTIN_OBJS += builtin-mktag.o BUILTIN_OBJS += builtin-mktree.o BUILTIN_OBJS += builtin-mv.o BUILTIN_OBJS += builtin-name-rev.o -- cgit v1.2.3 From b53258182bf90b4fb922a20d164a02e6f0e9afd1 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 22 Jan 2010 07:38:03 -0800 Subject: make "git unpack-file" a built-in Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c5a1190ebe..88e2f8fd49 100644 --- a/Makefile +++ b/Makefile @@ -392,7 +392,6 @@ PROGRAMS += git-index-pack$X PROGRAMS += git-pack-redundant$X PROGRAMS += git-shell$X PROGRAMS += git-show-index$X -PROGRAMS += git-unpack-file$X PROGRAMS += git-upload-pack$X PROGRAMS += git-http-backend$X @@ -698,6 +697,7 @@ BUILTIN_OBJS += builtin-stripspace.o BUILTIN_OBJS += builtin-symbolic-ref.o BUILTIN_OBJS += builtin-tag.o BUILTIN_OBJS += builtin-tar-tree.o +BUILTIN_OBJS += builtin-unpack-file.o BUILTIN_OBJS += builtin-unpack-objects.o BUILTIN_OBJS += builtin-update-index.o BUILTIN_OBJS += builtin-update-ref.o -- cgit v1.2.3 From 377d0276ca7446ce9fb2f6987b1e6b4ba9e7cf29 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 22 Jan 2010 07:42:14 -0800 Subject: make "git pack-redundant" a built-in Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 88e2f8fd49..33f9870886 100644 --- a/Makefile +++ b/Makefile @@ -389,7 +389,6 @@ PROGRAMS += $(EXTRA_PROGRAMS) PROGRAMS += git-fast-import$X PROGRAMS += git-imap-send$X PROGRAMS += git-index-pack$X -PROGRAMS += git-pack-redundant$X PROGRAMS += git-shell$X PROGRAMS += git-show-index$X PROGRAMS += git-upload-pack$X @@ -673,6 +672,7 @@ BUILTIN_OBJS += builtin-mktree.o BUILTIN_OBJS += builtin-mv.o BUILTIN_OBJS += builtin-name-rev.o BUILTIN_OBJS += builtin-pack-objects.o +BUILTIN_OBJS += builtin-pack-redundant.o BUILTIN_OBJS += builtin-pack-refs.o BUILTIN_OBJS += builtin-patch-id.o BUILTIN_OBJS += builtin-prune-packed.o -- cgit v1.2.3 From 3bb7256281bb1d291bb705a57dc3f30b26b7c127 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 22 Jan 2010 07:55:19 -0800 Subject: make "index-pack" a built-in This required some fairly trivial packfile function 'const' cleanup, since the builtin commands get a const char *argv[] array. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 33f9870886..c0dbee2ae4 100644 --- a/Makefile +++ b/Makefile @@ -388,7 +388,6 @@ EXTRA_PROGRAMS = PROGRAMS += $(EXTRA_PROGRAMS) PROGRAMS += git-fast-import$X PROGRAMS += git-imap-send$X -PROGRAMS += git-index-pack$X PROGRAMS += git-shell$X PROGRAMS += git-show-index$X PROGRAMS += git-upload-pack$X @@ -653,6 +652,7 @@ BUILTIN_OBJS += builtin-gc.o BUILTIN_OBJS += builtin-grep.o BUILTIN_OBJS += builtin-hash-object.o BUILTIN_OBJS += builtin-help.o +BUILTIN_OBJS += builtin-index-pack.o BUILTIN_OBJS += builtin-init-db.o BUILTIN_OBJS += builtin-log.o BUILTIN_OBJS += builtin-ls-files.o -- cgit v1.2.3 From 767f8b31cb3becbe303eb50a3faf3b4753fbaddd Mon Sep 17 00:00:00 2001 From: Michael Lukashov Date: Sun, 24 Jan 2010 10:10:30 +0000 Subject: Windows: Remove dependency on pthreadGC2.dll Commit 44626dc7 (MSVC: Windows-native implementation for subset of threads API, 2010-01-15) introduces builtin replacement of pthreadGC2.dll functionality, thus we can completely drop dependency on this dll. Signed-off-by: Michael Lukashov Acked-by: Johannes Sixt Signed-off-by: Junio C Hamano --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c0dbee2ae4..af08c8f452 100644 --- a/Makefile +++ b/Makefile @@ -994,6 +994,7 @@ ifeq ($(uname_S),Windows) COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/fnmatch -Icompat/regex -Icompat/fnmatch -Icompat/win32 -DSTRIP_EXTENSION=\".exe\" BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib EXTLIBS = advapi32.lib shell32.lib wininet.lib ws2_32.lib + PTHREAD_LIBS = lib = ifndef DEBUG BASIC_CFLAGS += -GL -Os -MT @@ -1036,11 +1037,12 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_PYTHON = YesPlease BLK_SHA1 = YesPlease THREADED_DELTA_SEARCH = YesPlease - COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch + COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/win32 COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \ compat/win32/pthread.o EXTLIBS += -lws2_32 + PTHREAD_LIBS = X = .exe ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) htmldir=doc/git/html/ -- cgit v1.2.3