@@ -1588,6 +1588,7 @@ PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
1588
1588
PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH ) )
1589
1589
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH ) )
1590
1590
DIFF_SQ = $(subst ','\'',$(DIFF ) )
1591
+ PERLLIB_EXTRA_SQ = $(subst ','\'',$(PERLLIB_EXTRA ) )
1591
1592
1592
1593
LIBS = $(GITLIBS ) $(EXTLIBS )
1593
1594
@@ -1792,9 +1793,12 @@ perl/PM.stamp: FORCE
1792
1793
perl/perl.mak : GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
1793
1794
$(QUIET_SUBDIR0 ) perl $(QUIET_SUBDIR1 ) PERL_PATH=' $(PERL_PATH_SQ)' prefix=' $(prefix_SQ)' $(@F )
1794
1795
1795
- $(patsubst % .perl,% ,$(SCRIPT_PERL ) ) : % : % .perl GIT-VERSION-FILE
1796
+ PERL_DEFINES = $(PERL_PATH_SQ ) :$(PERLLIB_EXTRA_SQ )
1797
+ $(patsubst % .perl,% ,$(SCRIPT_PERL ) ) : % : % .perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
1796
1798
$(QUIET_GEN )$(RM ) $@ $@ + && \
1797
1799
INSTLIBDIR=` MAKEFLAGS= $( MAKE) -C perl -s --no-print-directory instlibdir` && \
1800
+ INSTLIBDIR_EXTRA=' $(PERLLIB_EXTRA_SQ)' && \
1801
+ INSTLIBDIR=" $$ INSTLIBDIR$$ {INSTLIBDIR_EXTRA:+:$$ INSTLIBDIR_EXTRA}" && \
1798
1802
sed -e ' 1{' \
1799
1803
-e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \
1800
1804
-e ' h' \
@@ -1807,6 +1811,13 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl GIT-VERSION-FILE
1807
1811
chmod +x $@ + && \
1808
1812
mv $@ + $@
1809
1813
1814
+ GIT-PERL-DEFINES : FORCE
1815
+ @FLAGS=' $(PERL_DEFINES)' ; \
1816
+ if test x" $$ FLAGS" ! = x" ` cat $@ 2> /dev/null` " ; then \
1817
+ echo >&2 " * new perl-specific parameters" ; \
1818
+ echo " $$ FLAGS" > $@ ; \
1819
+ fi
1820
+
1810
1821
1811
1822
.PHONY : gitweb
1812
1823
gitweb :
@@ -2494,7 +2505,8 @@ ifndef NO_TCLTK
2494
2505
$(MAKE) -C git-gui clean
2495
2506
endif
2496
2507
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS
2497
- $(RM) GIT-USER-AGENT GIT-PREFIX GIT-SCRIPT-DEFINES GIT-PYTHON-VARS
2508
+ $(RM) GIT-USER-AGENT GIT-PREFIX
2509
+ $(RM) GIT-SCRIPT-DEFINES GIT-PERL-DEFINES GIT-PYTHON-VARS
2498
2510
2499
2511
.PHONY : all install profile-clean clean strip
2500
2512
.PHONY : shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
0 commit comments