]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-gui: stop including GIT-VERSION-FILE file
authorPatrick Steinhardt <ps@pks.im>
Tue, 11 Mar 2025 10:26:48 +0000 (11:26 +0100)
committerPatrick Steinhardt <ps@pks.im>
Tue, 13 May 2025 06:48:09 +0000 (08:48 +0200)
The "GITGUI_VERSION" variable is made available by generating and
including the "GIT-VERSION-FILE" file. Its value has been used in
various build steps, but in the preceding commits we have refactored
those to instead source the "GIT-VERSION-FILE" directly. As a result,
the variable is now only used in a single recipe, and this use can be
trivially replaced with sed(1).

Refactor the recipe to do so and stop including "GIT-VERSION-FILE" to
simplify the build process.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Makefile

index cde1b7e607d8b740d27fdc0af1800ee18cca5cb5..315888f302b050657959ee27426d4d2277f42977 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,9 +9,6 @@ all::
 
 GIT-VERSION-FILE: FORCE
        @$(SHELL_PATH) ./GIT-VERSION-GEN . $@
-ifneq ($(MAKECMDGOALS),clean)
--include GIT-VERSION-FILE
-endif
 
 uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
 uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
@@ -262,9 +259,9 @@ endif
        $(QUIET)$(REMOVE_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(REMOVE_D1)
        $(QUIET)$(REMOVE_D0)`dirname '$(DESTDIR_SQ)$(libdir_SQ)'` $(REMOVE_D1)
 
-dist-version:
+dist-version: GIT-VERSION-FILE
        @mkdir -p $(TARDIR)
-       @echo $(GITGUI_VERSION) > $(TARDIR)/version
+       @sed 's|^GITGUI_VERSION=||' <GIT-VERSION-FILE  >$(TARDIR)/version
 
 clean::
        $(RM_RF) $(GITGUI_MAIN) lib/tclIndex po/*.msg $(PO_TEMPLATE)