[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
can't get sed script into makefile
From: |
ms419 |
Subject: |
can't get sed script into makefile |
Date: |
Tue, 9 Nov 2004 13:57:26 -0800 |
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
[...]
They produce this error:
tor:~> debian/rules control
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
sed: -e expression #1, char 41: unknown option to `s'
make: *** [control-stamp] Error 1
Exit 2
tor:~>
They don't work from the shell either:
sh-3.00$ 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
sed: -e expression #1, char 48: unknown option to `s'
sh-3.00$
But these do:
sh-3.00$ 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
sh-3.00$
Only, they don't work in a makefile:
[...]
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
[...]
They produce this error:
tor:~> debian/rules control
mv debian/control debian/control.orig
sed "s/^Build-Depends: .*$/\0, libldap-dev/
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [control-stamp] Error 2
Exit 2
tor:~>
Am I stuck between a rock & a hard place?
Thanks!
Jack
- can't get sed script into makefile,
ms419 <=