gitweb/Makefile: define all .PHONY prerequisites inline

Move the '.PHONY' definition so that it's split up and accompanies the relevant as they're defined. This will make a subsequent diff smaller as we'll remove some of these, and won't need to re-edit the now-removed '.PHONY' line. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Jun 28, 2022 at 12:15 UTC 7decdb9b4ac322158069645685b7527cba65a7e7
1 file changed +7 -3
gitweb/Makefile
+7 -3
@@ -1,5 +1,6 @@
1 # The default target of this Makefile is...
2 all::
3 +.PHONY: all
4
5 # Define V=1 to have a more verbose compile.
6 #
@@ -45,6 +46,7 @@ HIGHLIGHT_BIN = highlight
46 -include config.mak
47
48 # determine version
49 +.PHONY: .FORCE-GIT-VERSION-FILE
50 ../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
51 $(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE
52
@@ -152,6 +154,7 @@ GITWEB_REPLACE = \
154 -e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER)|g' \
155 -e 's|++HIGHLIGHT_BIN++|$(HIGHLIGHT_BIN)|g'
156
157 +.PHONY: FORCE
158 GITWEB-BUILD-OPTIONS: FORCE
159 @rm -f $@+
160 @echo "x" '$(PERL_PATH_SQ)' $(GITWEB_REPLACE) "$(JSMIN)|$(CSSMIN)" >$@+
@@ -171,15 +174,18 @@ static/gitweb.js: $(GITWEB_JSLIB_FILES)
174
175 ### Testing rules
176
177 +.PHONY: test
178 test:
179 $(MAKE) -C ../t gitweb-test
180
181 +.PHONY: test-installed
182 test-installed:
183 GITWEB_TEST_INSTALLED='$(DESTDIR_SQ)$(gitwebdir_SQ)' \
184 $(MAKE) -C ../t gitweb-test
185
186 ### Installation rules
187
188 +.PHONY: install
189 install: all
190 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebdir_SQ)'
191 $(INSTALL) -m 755 $(GITWEB_PROGRAMS) '$(DESTDIR_SQ)$(gitwebdir_SQ)'
@@ -188,10 +194,8 @@ install: all
194
195 ### Cleaning rules
196
197 +.PHONY: clean
198 clean:
199 $(RM) gitweb.cgi static/gitweb.js \
200 static/gitweb.min.js static/gitweb.min.css \
201 GITWEB-BUILD-OPTIONS
195 -
196 -.PHONY: all clean install test test-installed .FORCE-GIT-VERSION-FILE FORCE
197 -