summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2005-09-07 21:26:52 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2005-09-07 22:08:30 -0700
commit6a2e50f9dfdca7ac572bbe30dd0efdf19ca250f6 (patch)
tree1bfdbf8b7467f61ac1c89cac3603abefc184ce5a /Makefile
parent[PATCH] Do not create bogus branch from flag to git branch (diff)
downloadtgif-6a2e50f9dfdca7ac572bbe30dd0efdf19ca250f6.tar.xz
git --version tells which version of git you have.
Originally from Martin Atukunda <matlads@dsmagic.com> but adjusted for post-rename code. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 4f55f631b9..d3d0855e03 100644
--- a/Makefile
+++ b/Makefile
@@ -183,11 +183,17 @@ SCRIPTS = $(SCRIPT_SH) $(SCRIPT_PERL) gitk
### Build rules
-all: $(PROGRAMS)
+all: $(PROGRAMS) git.sh
all:
$(MAKE) -C templates
+git.sh: git.sh.in Makefile
+ rm -f $@+ $@
+ sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' <$@.in >$@+
+ chmod +x $@+
+ mv $@+ $@
+
%.o: %.c
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
%.o: %.S
@@ -293,7 +299,7 @@ deb: dist
clean:
rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROGRAMS) $(LIB_FILE)
- rm -f git-core.spec
+ rm -f git-core.spec git.sh
rm -rf $(GIT_TARNAME)
rm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
rm -f git-core_$(GIT_VERSION)-*.deb git-core_$(GIT_VERSION)-*.dsc