Skip to content

Commit 0386dd3

Browse files
jrngitster
authored andcommitted
Makefile: add PERLLIB_EXTRA variable that adds to default perl path
Some platforms ship Perl modules used by git scripts outside the default perl path (e.g., on Mac OS X, Subversion's perl bindings live in a separate xcode perl path). Add an PERLLIB_EXTRA variable to hold a colon-separated list of extra directories to add to the perl path in git's scripts, as a convenience for packagers. Requested-by: Dave Borowitz <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 07981dc commit 0386dd3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1588,6 +1588,7 @@ PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
15881588
PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
15891589
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
15901590
DIFF_SQ = $(subst ','\'',$(DIFF))
1591+
PERLLIB_EXTRA_SQ = $(subst ','\'',$(PERLLIB_EXTRA))
15911592

15921593
LIBS = $(GITLIBS) $(EXTLIBS)
15931594

@@ -1792,10 +1793,12 @@ perl/PM.stamp: FORCE
17921793
perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
17931794
$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
17941795

1795-
PERL_DEFINES = $(PERL_PATH_SQ)
1796+
PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ)
17961797
$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
17971798
$(QUIET_GEN)$(RM) $@ $@+ && \
17981799
INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
1800+
INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
1801+
INSTLIBDIR="$$INSTLIBDIR$${INSTLIBDIR_EXTRA:+:$$INSTLIBDIR_EXTRA}" && \
17991802
sed -e '1{' \
18001803
-e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \
18011804
-e ' h' \

0 commit comments

Comments
 (0)