I'm not exactly an sed expert, but you might consider labelling the expressions
with the option -e, like:
sed -e "s/^Build-Depends: .*$$/\0, libldap-dev/" \
-e "s/^Package: bind9$$/\0-sdb-ldap/" \
-e "...
That way, make's substitution of newlines with whitespace in one large string
does not affect sed's separation of commands.
Alternately, since you do not need special make-specific variables or such, you might
consider packing all the commands into a single file (using normal newlines, nothing
to be escaped), and using 'sed -f <command-file>' with identical IO-redirection.HTH,
Johan
[EMAIL PROTECTED] wrote:
I can't get this sed script into a makefile. sed won't accept lines ending with backslashes, but they are required by make for to express multiline commands.
These lines don't work:
[...] control: control-stamp control-stamp: mv debian/control debian/control.orig sed "s/^Build-Depends: .*$$/\0, libldap-dev/ \ s/^Package: bind9$$/\0-sdb-ldap/ \ T \ : loop \ n \ s/^Conflicts: .*$$/\0, bind9\nProvides: bind9/ \ t \ s/^$$/\0/ \ T loop" < debian/control.orig > debian/control touch control-stamp ...
-- JB Enterprises - Johan Bezem Tel: +49 172 5463210 Software Architect - Project Manager Fax: +49 172 50 5463210 Realtime / Embedded Consultant Email: [EMAIL PROTECTED] Design - Development - Test - QA Web: http://www.bezem.de
_______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/help-make
