Merge branch 'jn/perl-lib-extra'
Allow customizing the paths to Perl modules with the new PERLLIB_EXTRA makefile variable. * jn/perl-lib-extra: Makefile: add PERLLIB_EXTRA variable that adds to default perl path Makefile: rebuild perl scripts when perl paths change
This commit is contained in:
commit
128c5d07c5
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@
|
|||||||
/GIT-CFLAGS
|
/GIT-CFLAGS
|
||||||
/GIT-LDFLAGS
|
/GIT-LDFLAGS
|
||||||
/GIT-PREFIX
|
/GIT-PREFIX
|
||||||
|
/GIT-PERL-DEFINES
|
||||||
/GIT-PYTHON-VARS
|
/GIT-PYTHON-VARS
|
||||||
/GIT-SCRIPT-DEFINES
|
/GIT-SCRIPT-DEFINES
|
||||||
/GIT-USER-AGENT
|
/GIT-USER-AGENT
|
||||||
|
16
Makefile
16
Makefile
@ -1588,6 +1588,7 @@ PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
|
|||||||
PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
|
PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
|
||||||
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
|
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
|
||||||
DIFF_SQ = $(subst ','\'',$(DIFF))
|
DIFF_SQ = $(subst ','\'',$(DIFF))
|
||||||
|
PERLLIB_EXTRA_SQ = $(subst ','\'',$(PERLLIB_EXTRA))
|
||||||
|
|
||||||
LIBS = $(GITLIBS) $(EXTLIBS)
|
LIBS = $(GITLIBS) $(EXTLIBS)
|
||||||
|
|
||||||
@ -1792,9 +1793,12 @@ perl/PM.stamp: FORCE
|
|||||||
perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
|
perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
|
||||||
$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
|
$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
|
||||||
|
|
||||||
$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl GIT-VERSION-FILE
|
PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ)
|
||||||
|
$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
|
||||||
$(QUIET_GEN)$(RM) $@ $@+ && \
|
$(QUIET_GEN)$(RM) $@ $@+ && \
|
||||||
INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
|
INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
|
||||||
|
INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
|
||||||
|
INSTLIBDIR="$$INSTLIBDIR$${INSTLIBDIR_EXTRA:+:$$INSTLIBDIR_EXTRA}" && \
|
||||||
sed -e '1{' \
|
sed -e '1{' \
|
||||||
-e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \
|
-e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \
|
||||||
-e ' h' \
|
-e ' h' \
|
||||||
@ -1807,6 +1811,13 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl GIT-VERSION-FILE
|
|||||||
chmod +x $@+ && \
|
chmod +x $@+ && \
|
||||||
mv $@+ $@
|
mv $@+ $@
|
||||||
|
|
||||||
|
GIT-PERL-DEFINES: FORCE
|
||||||
|
@FLAGS='$(PERL_DEFINES)'; \
|
||||||
|
if test x"$$FLAGS" != x"`cat $@ 2>/dev/null`" ; then \
|
||||||
|
echo >&2 " * new perl-specific parameters"; \
|
||||||
|
echo "$$FLAGS" >$@; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
.PHONY: gitweb
|
.PHONY: gitweb
|
||||||
gitweb:
|
gitweb:
|
||||||
@ -2494,7 +2505,8 @@ ifndef NO_TCLTK
|
|||||||
$(MAKE) -C git-gui clean
|
$(MAKE) -C git-gui clean
|
||||||
endif
|
endif
|
||||||
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS
|
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS
|
||||||
$(RM) GIT-USER-AGENT GIT-PREFIX GIT-SCRIPT-DEFINES GIT-PYTHON-VARS
|
$(RM) GIT-USER-AGENT GIT-PREFIX
|
||||||
|
$(RM) GIT-SCRIPT-DEFINES GIT-PERL-DEFINES GIT-PYTHON-VARS
|
||||||
|
|
||||||
.PHONY: all install profile-clean clean strip
|
.PHONY: all install profile-clean clean strip
|
||||||
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
|
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
|
||||||
|
Loading…
Reference in New Issue
Block a user