xmjschm@mbcrrb.harvard.edu (Mike Schmelzer) (08/10/89)
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