summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMatt McCutchen <hashproduct@gmail.com>2007-07-10 01:30:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-07-10 06:39:59 (GMT)
commit54dadbdb29668fbd51effefd0a0c65d915f5422b (patch)
tree9226670da09c548cc5a8c5344a87020a83c0eec4 /Makefile
parent52aaf649cb70134090c3e3a762bed730d5451c17 (diff)
downloadgit-54dadbdb29668fbd51effefd0a0c65d915f5422b.zip
git-54dadbdb29668fbd51effefd0a0c65d915f5422b.tar.gz
git-54dadbdb29668fbd51effefd0a0c65d915f5422b.tar.bz2
Makefile: rebuild git.o on version change, clean up git$X flags
Commit 334d28ae factored out git.o as an intermediate stage between git.c and git$X. However: - It left some no-longer-relevant flags in the rule for git$X. - It failed to replace git$X with git.o in the list of files that record GIT_VERSION. This broke incorporation of a changed GIT_VERSION into git$X because, when GIT_VERSION changes, git.o isn't remade and git$X is relinked from the git.o that still contains the old GIT_VERSION. This patch removes the irrelevant flags and fixes incorporation of a changed GIT_VERSION into git$X. Signed-off-by: Matt McCutchen <hashproduct@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 2 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 5b30e5c..d7541b4 100644
--- a/Makefile
+++ b/Makefile
@@ -753,8 +753,7 @@ git.o: git.c common-cmds.h GIT-CFLAGS
$(ALL_CFLAGS) -c $(filter %.c,$^)
git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
- $(QUIET_LINK)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
- $(ALL_CFLAGS) -o $@ $(filter %.c,$^) git.o \
+ $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
help.o: common-cmds.h
@@ -857,7 +856,7 @@ configure: configure.ac
rm -f $<+
# These can record GIT_VERSION
-git$X git.spec \
+git.o git.spec \
$(patsubst %.sh,%,$(SCRIPT_SH)) \
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
: GIT-VERSION-FILE