Thread (26 messages) 26 messages, 4 authors, 2022-06-28
DORMANTno replies

[PATCH v3 8/8] gitweb/Makefile: add a "NO_GITWEB" parameter

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2022-06-28 10:16:29
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

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 <redacted>
---
 Makefile        | 7 +++++++
 gitweb/Makefile | 2 ++
 2 files changed, 9 insertions(+)
diff --git a/Makefile b/Makefile
index d150be4dc32..92bea603394 100644
--- a/Makefile
+++ b/Makefile
@@ -309,6 +309,11 @@ include shared.mak
 # distributions that want to use their packaged versions of Perl
 # modules, instead of the fallbacks shipped with Git.
 #
+# Define NO_GITWEB if you do not want to build or install
+# 'gitweb'. Note that defining NO_PERL currently has the same effect
+# on not installing gitweb, but not on whether it's built in the
+# gitweb/ directory.
+#
 # Define PYTHON_PATH to the path of your Python binary (often /usr/bin/python
 # but /usr/bin/python2.7 or /usr/bin/python3 on some platforms).
 #
@@ -3155,7 +3160,9 @@ include gitweb/Makefile
 
 .PHONY: gitweb
 gitweb: $(MAK_DIR_GITWEB_ALL)
+ifndef NO_GITWEB
 all:: gitweb
+endif
 
 ### Installation rules
 
diff --git a/gitweb/Makefile b/gitweb/Makefile
index 66fceb9e94f..3b68ab2d672 100644
--- a/gitweb/Makefile
+++ b/gitweb/Makefile
@@ -130,9 +130,11 @@ install-gitweb: $(MAK_DIR_GITWEB_ALL)
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)'
 	$(INSTALL) -m 644 $(addprefix $(MAK_DIR_GITWEB),$(GITWEB_FILES)) \
 		'$(DESTDIR_SQ)$(gitwebstaticdir_SQ)'
+ifndef NO_GITWEB
 ifndef NO_PERL
 install: install-gitweb
 endif
+endif
 
 ### Cleaning rules
 
-- 
2.37.0.880.gf07d56b18ba
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help