summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-11-18 12:43:09 -0500
committerJunio C Hamano <gitster@pobox.com>2014-11-18 10:15:14 -0800
commite204b001cfa33e36eb06bc9d2437d75fc4efafe8 (patch)
tree8fbdc22c417d6b79ad2310576d4b9c45de5ab0fe
parent7fa1365c54c28b3cd9375539f381b54061a1880d (diff)
downloadgit-e204b001cfa33e36eb06bc9d2437d75fc4efafe8.tar.gz
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 9f984a9e55..4d1639ddc9 100644
--- a/Makefile
+++ b/Makefile
@@ -1801,6 +1801,9 @@ git.res: git.rc GIT-VERSION-FILE
$(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
-DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
+# This makes sure we depend on the NO_PERL setting itself.
+$(patsubst %.perl,%,$(SCRIPT_PERL)): GIT-BUILD-OPTIONS
+
ifndef NO_PERL
$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak