summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2007-02-12 16:14:44 -0500
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2007-02-12 16:14:44 -0500
commit5d643cd3cebf5eab44d99c5c7e54a1dbef28cba6 (patch)
tree1b6093b6ffaa83ed52230320c456c3f68a1dfec5
parentgit-gui: Rename GIT_VERSION to GITGUI_VERSION. (diff)
downloadtgif-5d643cd3cebf5eab44d99c5c7e54a1dbef28cba6.tar.xz
git-gui: Generate a version file on demand.
Because git-gui is being shipped as a subproject of the main Git project and will often have a different lifecycle than the main Git project, we should ship our own version number in the release tarball rather than relying on the main Git version file. Git's master Makefile will invoke our own with the target dist-version, asking us to save off our GITGUI_VERSION value into our own version file, so that our GIT-VERSION-GEN script can recover it at build time. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 71ae7edb48..fd82d9d16d 100644
--- a/Makefile
+++ b/Makefile
@@ -45,8 +45,12 @@ install: all
$(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'
$(foreach p,$(GITGUI_BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
+dist-version:
+ @mkdir -p $(TARDIR)
+ @echo $(GITGUI_VERSION) > $(TARDIR)/version
+
clean::
rm -f $(ALL_PROGRAMS) GIT-VERSION-FILE
-.PHONY: all install clean
+.PHONY: all install dist-version clean
.PHONY: .FORCE-GIT-VERSION-FILE