Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Work around sed and make interactions on the backslash at the end of line.
author
Junio C Hamano
<junkio@cox.net>
Fri, 7 Jul 2006 20:04:35 +0000
(13:04 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Sat, 8 Jul 2006 21:15:09 +0000
(14:15 -0700)
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>
Makefile
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
c7a30e5
)
diff --git
a/Makefile
b/Makefile
index 71657ec90466766ed1035eea2e49b2ca05fd86dd..01b9a948238daef7fe89dace4cba3fbe0be12aa9 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-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` && \
$(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 >$@+
-e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
$@.perl >$@+