@matheusbsbs / matheus-bagliano / commits / 62f780dcc6
Fork 0

Makefile: fix NO_PERL bug with gitweb

When the user has defined NO_PERL, we want to skip building gitweb entirely. However, the conditional to add gitweb/gitweb.cgi to OTHER_PROGRAMS was evaluated before we actually parsed the user's config.mak. This meant that "make NO_PERL=NoThanks" worked fine, but putting "NO_PERL=NoThanks" into your config.mak broke the build (it wanted gitweb.cgi to satisfy "all", but the rule to build it was conditionally ignored, so it complained). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Apr 27, 2009 at 23:34 UTC 62f780dcc6a5f1a38d9f8e25234a91d16ab8fbbd
1 file changed +1 -3
Makefile
+1 -3
@@ -365,9 +365,6 @@ ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
365
366 # what 'all' will build but not install in gitexecdir
367 OTHER_PROGRAMS = git$X
368 -ifndef NO_PERL
369 -OTHER_PROGRAMS += gitweb/gitweb.cgi
370 -endif
368
369 # Set paths to tools early so that they can be used for version tests.
370 ifndef SHELL_PATH
@@ -1280,6 +1277,7 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
1277 chmod +x $@+ && \
1278 mv $@+ $@
1279
1280 +OTHER_PROGRAMS += gitweb/gitweb.cgi
1281 gitweb/gitweb.cgi: gitweb/gitweb.perl
1282 $(QUIET_GEN)$(RM) $@ $@+ && \
1283 sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \