[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sed bug precludes use of a or i in Makefile
From: |
Dan Jacobson |
Subject: |
sed bug precludes use of a or i in Makefile |
Date: |
30 Oct 2001 15:14:11 +0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Gentlemen, it has been pointed out that gnu sed has a bug.
It was supposedly crossposted here but no...
[sorry I left the Chinese in from my screen. for no chinese perhaps hit:]
http://groups.google.com/groups?frame=right&th=8523db0a2b3ec04e&seekm=n6k7xjpvjw.fsf%40ogion.it.jyu.fi
Message 1 in thread
寄件者:[1]Dan Jacobson (address@hidden)
主旨:how to use sed's a or i in a Makefile?
新聞群組:[3]comp.unix.shell
[4]View this article only
日期:2001-10-23 16:28:56 PST
Is it really possible to use
sed '3a\
hello!'
in a Makefile?
--
[5]http://www.geocities.com/jidanni Tel+886-4-25854780
[6]Post a follow-up to this message
Message 2 in thread
寄件者:[7]David Masterson (address@hidden)
主旨:Re: how to use sed's a or i in a Makefile?
新聞群組:[9]comp.unix.shell
[10]View this article only
日期:2001-10-23 17:32:45 PST
>>>>> Dan Jacobson writes:
> Is it really possible to use
> sed '3a\
> hello!'
> in a Makefile?
Yes -- if you get the number of backslashes correct.
--
David Masterson dmaster AT synopsys DOT com
Sr. R&D Engineer Synopsys, Inc.
Software Engineering Sunnyvale, CA
[11]Post a follow-up to this message
Message 3 in thread
寄件者:[12]Dan Jacobson (address@hidden)
主旨:Re: how to use sed's a or i in a Makefile?
新聞群組:[14]comp.unix.shell
[15]View this article only
日期:2001-10-25 08:01:30 PST
Dan> Is it really possible to use
Dan> sed '3a\
Dan> hello!'
Dan> in a Makefile?
Dave> Yes -- if you get the number of backslashes correct.
With 1 backslash:
seq 1 4|sed '2a\
iiii'
sed: -e expression #1, char 4: Extra characters after command
make: *** [pa] Error 1
With 2 backslashes:
Makefile:3: *** missing separator. Stop.
With 3 backslashes:
seq 1 4|sed '2a\\\
iiii'
sed: -e expression #1, char 4: Extra characters after command
make: *** [pa] Error 1
With 4 backslashes:
Makefile:3: *** missing separator. Stop.
With 5 backslashes:
seq 1 4|sed '2a\\\\\
iiii'
sed: -e expression #1, char 4: Extra characters after command
make: *** [pa] Error 1
and 0 backslashes also fails... so, how did you get the number of
backslashes correct please?
--
[16]http://www.geocities.com/jidanni/ Tel+886-4-25854780 ?n??¥§
[17]Post a follow-up to this message
Message 4 in thread
address@hidden (address@hidden)
主旨:Re: how to use sed's a or i in a Makefile?
新聞群組:[20]comp.unix.shell, gnu.utils.bugs
[21]View this article only
日期:2001-10-25 09:17:49 PST
Dan Jacobson <address@hidden> writes:
> With 1 backslash:
>
> seq 1 4|sed '2a\
> iiii'
> sed: -e expression #1, char 4: Extra characters after command
> make: *** [pa] Error 1
That is interesting. In an HP-UX 11i box I find that it works just
fine with a single backslash using HP's make, but breaks as you
describe with Gnu make. (No difference between HP sed and Gnu sed.)
Looks like a bug in Gnu sed to me.
--
Tapani Tarvainen
-----
GNU sed version 3.02
--
http://www.geocities.com/jidanni Tel+886-4-25854780
- sed bug precludes use of a or i in Makefile,
Dan Jacobson <=