Skip to content

Commit 7decdb9

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2668e36 commit 7decdb9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

gitweb/Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# The default target of this Makefile is...
22
all::
3+
.PHONY: all
34

45
# Define V=1 to have a more verbose compile.
56
#
@@ -45,6 +46,7 @@ HIGHLIGHT_BIN = highlight
4546
-include config.mak
4647

4748
# determine version
49+
.PHONY: .FORCE-GIT-VERSION-FILE
4850
../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
4951
$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE
5052

@@ -152,6 +154,7 @@ GITWEB_REPLACE = \
152154
-e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER)|g' \
153155
-e 's|++HIGHLIGHT_BIN++|$(HIGHLIGHT_BIN)|g'
154156

157+
.PHONY: FORCE
155158
GITWEB-BUILD-OPTIONS: FORCE
156159
@rm -f $@+
157160
@echo "x" '$(PERL_PATH_SQ)' $(GITWEB_REPLACE) "$(JSMIN)|$(CSSMIN)" >$@+
@@ -171,15 +174,18 @@ static/gitweb.js: $(GITWEB_JSLIB_FILES)
171174

172175
### Testing rules
173176

177+
.PHONY: test
174178
test:
175179
$(MAKE) -C ../t gitweb-test
176180

181+
.PHONY: test-installed
177182
test-installed:
178183
GITWEB_TEST_INSTALLED='$(DESTDIR_SQ)$(gitwebdir_SQ)' \
179184
$(MAKE) -C ../t gitweb-test
180185

181186
### Installation rules
182187

188+
.PHONY: install
183189
install: all
184190
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebdir_SQ)'
185191
$(INSTALL) -m 755 $(GITWEB_PROGRAMS) '$(DESTDIR_SQ)$(gitwebdir_SQ)'
@@ -188,10 +194,8 @@ install: all
188194

189195
### Cleaning rules
190196

197+
.PHONY: clean
191198
clean:
192199
$(RM) gitweb.cgi static/gitweb.js \
193200
static/gitweb.min.js static/gitweb.min.css \
194201
GITWEB-BUILD-OPTIONS
195-
196-
.PHONY: all clean install test test-installed .FORCE-GIT-VERSION-FILE FORCE
197-

0 commit comments

Comments
 (0)