Skip to content

Commit e204b00

Browse files
peffgitster
authored andcommitted
Makefile: have perl scripts depend on NO_PERL setting
If NO_PERL is not set, our perl scripts are built as usual. If it is set, then we build "dummy" versions that tell you git was built without perl support and exit gracefully. However, if you switch to NO_PERL in a directory with existing build artifacts, we do not notice that the files need rebuilt. We see only that they are newer than the "unimplemented.sh" wrapper and assume they are done. So doing: make make NO_PERL=Nope would result in a git-add--interactive script that uses perl (and running the test suite would make use of it). Instead, we should trigger a rebuild of the perl scripts anytime NO_PERL changes. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7fa1365 commit e204b00

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,6 +1801,9 @@ git.res: git.rc GIT-VERSION-FILE
18011801
$(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
18021802
-DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
18031803

1804+
# This makes sure we depend on the NO_PERL setting itself.
1805+
$(patsubst %.perl,%,$(SCRIPT_PERL)): GIT-BUILD-OPTIONS
1806+
18041807
ifndef NO_PERL
18051808
$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
18061809

0 commit comments

Comments
 (0)