Skip to content

Commit 57815a4

Browse files
committed
Merge branch 'jk/rebuild-perl-scripts-with-no-perl-seting-change' into maint
The build procedure did not bother fixing perl and python scripts when NO_PERL and NO_PYTHON build-time configuration changed. * jk/rebuild-perl-scripts-with-no-perl-seting-change: Makefile: have python scripts depend on NO_PYTHON setting Makefile: simplify by using SCRIPT_{PERL,SH}_GEN macros Makefile: have perl scripts depend on NO_PERL setting
2 parents 7d37ed1 + ca2051d commit 57815a4

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ GIT-SCRIPT-DEFINES: FORCE
16621662
fi
16631663

16641664

1665-
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh GIT-SCRIPT-DEFINES
1665+
$(SCRIPT_SH_GEN) : % : %.sh GIT-SCRIPT-DEFINES
16661666
$(QUIET_GEN)$(cmd_munge_script) && \
16671667
chmod +x $@+ && \
16681668
mv $@+ $@
@@ -1676,8 +1676,11 @@ git.res: git.rc GIT-VERSION-FILE
16761676
$(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
16771677
-DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
16781678

1679+
# This makes sure we depend on the NO_PERL setting itself.
1680+
$(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS
1681+
16791682
ifndef NO_PERL
1680-
$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
1683+
$(SCRIPT_PERL_GEN): perl/perl.mak
16811684

16821685
perl/perl.mak: perl/PM.stamp
16831686

@@ -1690,7 +1693,7 @@ perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
16901693
$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
16911694

16921695
PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ)
1693-
$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
1696+
$(SCRIPT_PERL_GEN): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
16941697
$(QUIET_GEN)$(RM) $@ $@+ && \
16951698
INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
16961699
INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
@@ -1724,7 +1727,7 @@ git-instaweb: git-instaweb.sh gitweb GIT-SCRIPT-DEFINES
17241727
chmod +x $@+ && \
17251728
mv $@+ $@
17261729
else # NO_PERL
1727-
$(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
1730+
$(SCRIPT_PERL_GEN) git-instaweb: % : unimplemented.sh
17281731
$(QUIET_GEN)$(RM) $@ $@+ && \
17291732
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
17301733
-e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
@@ -1733,6 +1736,9 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
17331736
mv $@+ $@
17341737
endif # NO_PERL
17351738

1739+
# This makes sure we depend on the NO_PYTHON setting itself.
1740+
$(SCRIPT_PYTHON_GEN): GIT-BUILD-OPTIONS
1741+
17361742
ifndef NO_PYTHON
17371743
$(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS
17381744
$(SCRIPT_PYTHON_GEN): % : %.py

0 commit comments

Comments
 (0)