Thread (11 messages) flat view 11 messages, 5 authors, 2018-01-02

Re: [PATCH v6] Makefile: replace perl/Makefile.PL with simple make rules

From: Jonathan Nieder <hidden>
Date: 2018-01-02 19:17:31

Possibly related (same subject, not in this thread)

Hi,

Ævar Arnfjörð Bjarmason wrote:
quoted hunk ↗ jump to hunk
+++ b/Makefile
[...]
-PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ)
-$(SCRIPT_PERL_GEN): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
+PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ):$(perllibdir_SQ)
+$(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-VERSION-FILE
 	$(QUIET_GEN)$(RM) $@ $@+ && \
-	INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
 	INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
 	INSTLIBDIR="$$INSTLIBDIR$${INSTLIBDIR_EXTRA:+:$$INSTLIBDIR_EXTRA}" && \
 	sed -e '1{' \
 	    -e '	s|#!.*perl|#!$(PERL_PATH_SQ)|' \
 	    -e '	h' \
-	    -e '	s=.*=use lib (split(/$(pathsep)/, $$ENV{GITPERLLIB} || "'"$$INSTLIBDIR"'"));=' \
+	    -e '	s=.*=use lib (split(/$(pathsep)/, $$ENV{GITPERLLIB} || "'"$$INSTLIBDIR"'" || "'"$(perllibdir_SQ)"'"));=' \
This appears to have broken a build with INSTLIBDIR set.

 $ head -2 /usr/local/git/current/libexec/git-core/git-add--interactive
 #!/usr/bin/perl
 use lib (split(/:/, $ENV{GITPERLLIB} || ":/Applications/Xcode.app/Contents/Developer/Library/Perl/5.@{[sub{use Config; $Config{api_version}}->()]}/darwin-thread-multi-2level" || "/usr/local/git/current/share/perl5"));

(forgive the hackiness there).

Is there a reason we don't do

	INSTLIBDIR='$(perllibdir_SQ)' && \
	INSTLIBDIR_EXTRA=... &&
	INSTLIBDIR=...

and

	use lib ... || "'"$$INSTLIBDIR"'"));=' \

?

Thanks,
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help