Skip to content

Commit a35258c

Browse files
avargitster
authored andcommitted
gitweb/Makefile: add a "NO_GITWEB" parameter
From looking at the {Free,Net,Dragonfly}BSD packages for git[1] they've been monkeypatching "gitweb" out of the Makefile, let's be nicer and provide a NO_GITWEB=Y for their use. For the "all" target this allows for optionally restoring what's been the status quo before the preceding commit, but now we'll also behave correctly on the subsequent "make install". As before our installation of gitweb can be suppressed with NO_PERL. For backwards compatibility the NO_PERL=Y flag by itself still doesn't change whether or not we build gitweb, unlike the new NO_GITWEB=Y flag. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d3b8274 commit a35258c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,11 @@ include shared.mak
309309
# distributions that want to use their packaged versions of Perl
310310
# modules, instead of the fallbacks shipped with Git.
311311
#
312+
# Define NO_GITWEB if you do not want to build or install
313+
# 'gitweb'. Note that defining NO_PERL currently has the same effect
314+
# on not installing gitweb, but not on whether it's built in the
315+
# gitweb/ directory.
316+
#
312317
# Define PYTHON_PATH to the path of your Python binary (often /usr/bin/python
313318
# but /usr/bin/python2.7 or /usr/bin/python3 on some platforms).
314319
#
@@ -3042,7 +3047,9 @@ include gitweb/Makefile
30423047

30433048
.PHONY: gitweb
30443049
gitweb: $(MAK_DIR_GITWEB_ALL)
3050+
ifndef NO_GITWEB
30453051
all:: gitweb
3052+
endif
30463053

30473054
### Installation rules
30483055

gitweb/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,11 @@ install-gitweb: $(MAK_DIR_GITWEB_ALL)
130130
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)'
131131
$(INSTALL) -m 644 $(addprefix $(MAK_DIR_GITWEB),$(GITWEB_FILES)) \
132132
'$(DESTDIR_SQ)$(gitwebstaticdir_SQ)'
133+
ifndef NO_GITWEB
133134
ifndef NO_PERL
134135
install: install-gitweb
135136
endif
137+
endif
136138

137139
### Cleaning rules
138140

0 commit comments

Comments
 (0)