Skip to content

Commit 62f780d

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b9d622e commit 62f780d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,6 @@ ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
365365

366366
# what 'all' will build but not install in gitexecdir
367367
OTHER_PROGRAMS = git$X
368-
ifndef NO_PERL
369-
OTHER_PROGRAMS += gitweb/gitweb.cgi
370-
endif
371368

372369
# Set paths to tools early so that they can be used for version tests.
373370
ifndef SHELL_PATH
@@ -1280,6 +1277,7 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
12801277
chmod +x $@+ && \
12811278
mv $@+ $@
12821279

1280+
OTHER_PROGRAMS += gitweb/gitweb.cgi
12831281
gitweb/gitweb.cgi: gitweb/gitweb.perl
12841282
$(QUIET_GEN)$(RM) $@ $@+ && \
12851283
sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \

0 commit comments

Comments
 (0)