Skip to content

Commit d821fc6

Browse files
committed
git-gui: stop including GIT-VERSION-FILE file
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 <[email protected]>
1 parent 28a8e5c commit d821fc6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ all::
99

1010
GIT-VERSION-FILE: FORCE
1111
@$(SHELL_PATH) ./GIT-VERSION-GEN . $@
12-
ifneq ($(MAKECMDGOALS),clean)
13-
-include GIT-VERSION-FILE
14-
endif
1512

1613
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
1714
uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
@@ -262,9 +259,9 @@ endif
262259
$(QUIET)$(REMOVE_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(REMOVE_D1)
263260
$(QUIET)$(REMOVE_D0)`dirname '$(DESTDIR_SQ)$(libdir_SQ)'` $(REMOVE_D1)
264261

265-
dist-version:
262+
dist-version: GIT-VERSION-FILE
266263
@mkdir -p $(TARDIR)
267-
@echo $(GITGUI_VERSION) > $(TARDIR)/version
264+
@sed 's|^GITGUI_VERSION=||' <GIT-VERSION-FILE >$(TARDIR)/version
268265

269266
clean::
270267
$(RM_RF) $(GITGUI_MAIN) lib/tclIndex po/*.msg $(PO_TEMPLATE)

0 commit comments

Comments
 (0)