提交 998c4daa 编写于 作者: J Junio C Hamano

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: NJunio C Hamano <junkio@cox.net>
上级 c7a30e56
......@@ -550,9 +550,13 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/Makefile
$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
rm -f $@ $@+
INSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \
sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|1' \
-e '2i\
use lib (split(/:/, $$ENV{GITPERLLIB} || '\'"$$INSTLIBDIR"\''));' \
sed -e '1{' \
-e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \
-e ' h' \
-e ' s=.*=use lib (split(/:/, $$ENV{GITPERLLIB} || "@@INSTLIBDIR@@"));=' \
-e ' H' \
-e ' x' \
-e '}' \
-e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
$@.perl >$@+
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册