Skip to content

Commit 5d643cd

Browse files
committed
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 <[email protected]>
1 parent 7e81d4e commit 5d643cd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ install: all
4545
$(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'
4646
$(foreach p,$(GITGUI_BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
4747

48+
dist-version:
49+
@mkdir -p $(TARDIR)
50+
@echo $(GITGUI_VERSION) > $(TARDIR)/version
51+
4852
clean::
4953
rm -f $(ALL_PROGRAMS) GIT-VERSION-FILE
5054

51-
.PHONY: all install clean
55+
.PHONY: all install dist-version clean
5256
.PHONY: .FORCE-GIT-VERSION-FILE

0 commit comments

Comments
 (0)