Work around sed and make interactions on the backslash at the end of line.
Traditionally 'i' and 'a' commands to sed have been unfriendly with make, primarily because different make implementations did unexpected things to backslashes at the end of lines. So work it around by not using 'i' command. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
c7a30e5684
commit
998c4daaf4
10
Makefile
10
Makefile
@ -550,9 +550,13 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/Makefile
|
|||||||
$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
|
$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
|
||||||
rm -f $@ $@+
|
rm -f $@ $@+
|
||||||
INSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \
|
INSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \
|
||||||
sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|1' \
|
sed -e '1{' \
|
||||||
-e '2i\
|
-e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \
|
||||||
use lib (split(/:/, $$ENV{GITPERLLIB} || '\'"$$INSTLIBDIR"\''));' \
|
-e ' h' \
|
||||||
|
-e ' s=.*=use lib (split(/:/, $$ENV{GITPERLLIB} || "@@INSTLIBDIR@@"));=' \
|
||||||
|
-e ' H' \
|
||||||
|
-e ' x' \
|
||||||
|
-e '}' \
|
||||||
-e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
|
-e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
|
||||||
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
|
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
|
||||||
$@.perl >$@+
|
$@.perl >$@+
|
||||||
|
Loading…
Reference in New Issue
Block a user