Skip to content

Commit 13fca9f

Browse files
jrngitster
authored andcommitted
Makefile: consolidate .FORCE-* targets
Providing multiple targets to force a rebuild is unnecessary complication. Avoid using a name that could conflict with future special targets in GNU make (a leading period followed by uppercase letters). The corresponding change to the git-gui Makefile is left for another patch. Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent de54e67 commit 13fca9f

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

Documentation/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ install-pdf: pdf
204204
install-html: html
205205
'$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir)
206206

207-
../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
207+
../GIT-VERSION-FILE: FORCE
208208
$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE
209209

210210
-include ../GIT-VERSION-FILE
@@ -337,4 +337,4 @@ quick-install-man:
337337
quick-install-html:
338338
'$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir)
339339

340-
.PHONY: .FORCE-GIT-VERSION-FILE
340+
.PHONY: FORCE

Makefile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ all::
222222
# DEFAULT_EDITOR='$GIT_FALLBACK_EDITOR',
223223
# DEFAULT_EDITOR='"C:\Program Files\Vim\gvim.exe" --nofork'
224224

225-
GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
225+
GIT-VERSION-FILE: FORCE
226226
@$(SHELL_PATH) ./GIT-VERSION-GEN
227227
-include GIT-VERSION-FILE
228228

@@ -1632,7 +1632,7 @@ git.o git.spec \
16321632

16331633
%.o: %.c GIT-CFLAGS
16341634
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
1635-
%.s: %.c GIT-CFLAGS .FORCE-LISTING
1635+
%.s: %.c GIT-CFLAGS FORCE
16361636
$(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
16371637
%.o: %.S GIT-CFLAGS
16381638
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
@@ -1723,7 +1723,7 @@ cscope:
17231723
TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\
17241724
$(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)
17251725

1726-
GIT-CFLAGS: .FORCE-GIT-CFLAGS
1726+
GIT-CFLAGS: FORCE
17271727
@FLAGS='$(TRACK_CFLAGS)'; \
17281728
if test x"$$FLAGS" != x"`cat GIT-CFLAGS 2>/dev/null`" ; then \
17291729
echo 1>&2 " * new build flags or prefix"; \
@@ -1733,7 +1733,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS
17331733
# We need to apply sq twice, once to protect from the shell
17341734
# that runs GIT-BUILD-OPTIONS, and then again to protect it
17351735
# and the first level quoting from the shell that runs "echo".
1736-
GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
1736+
GIT-BUILD-OPTIONS: FORCE
17371737
@echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@
17381738
@echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@
17391739
@echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
@@ -1745,14 +1745,12 @@ GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
17451745
ifndef NO_TCLTK
17461746
TRACK_VARS = $(subst ','\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)')
17471747

1748-
GIT-GUI-VARS: .FORCE-GIT-GUI-VARS
1748+
GIT-GUI-VARS: FORCE
17491749
@VARS='$(TRACK_VARS)'; \
17501750
if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
17511751
echo 1>&2 " * new Tcl/Tk interpreter location"; \
17521752
echo "$$VARS" >$@; \
17531753
fi
1754-
1755-
.PHONY: .FORCE-GIT-GUI-VARS
17561754
endif
17571755

17581756
### Testing rules
@@ -1972,8 +1970,7 @@ endif
19721970

19731971
.PHONY: all install clean strip
19741972
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
1975-
.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
1976-
.PHONY: .FORCE-GIT-BUILD-OPTIONS .FORCE-LISTING
1973+
.PHONY: FORCE TAGS tags cscope
19771974

19781975
### Check documentation
19791976
#

0 commit comments

Comments
 (0)