Article View: gnu.utils.bug
Article #354gnu-sed wont make depend
From: Mike Schmelzer
Date: Thu, 10 Aug 1989 16:59
Date: Thu, 10 Aug 1989 16:59
36 lines
1517 bytes
1517 bytes
I have a make depend that looks like this (I got it from a friend, so I
don't know its original source. But I'm sure it's pretty standard.)
depend:
cc -M ${COPTS} ${CFILES} | \
sed -e ':loop' \
-e 's/\.\.\/[^ /]*\/\.\./../' \
-e 't loop' | \
grep -v /usr/include | \
awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
else rec = rec " " $$2 } } \
END { print rec } ' > makedep
echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
echo '$$r makedep' >>eddep
echo 'w' >>eddep
cp Makefile Makefile.bak
ex - Makefile < eddep
rm eddep makedep
# DO NOT DELETE THIS LINE - make depend uses it
This works with a BSD sed, but with gnu-sed, it gives the error :
sed: Unknown option to 's'
and then the pipe breaks.
What's wrong? Any fixes?
Thanks in advance.
--
===== Mike Schmelzer ====== "Republicans think community service is something
= xmjschm@harvspha.BITNET = you are sentenced to after you're caught."
xmjschm@mbcrr.harvard.edu = - Ron Brown, Chairman of the DNC
=========================== "You make me PATHETIC." - Tom Burke
Technical Details
Message-ID:
<XMJSCHM.89Aug10125903@mbcrrb.harvard.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!iuvax!mailrus!ukma!husc6!xmjschmShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!iuvax!mailrus!ukma!husc6!xmjschm From: xmjschm@mbcrrb.harvard.edu (Mike Schmelzer) Newsgroups: gnu.utils.bug Subject: gnu-sed wont make depend Message-ID: <XMJSCHM.89Aug10125903@mbcrrb.harvard.edu> Date: 10 Aug 89 16:59:03 GMT Distribution: gnu Organization: The MBCRR Lines: 36