ed script "here" document in a Makefile
Brian Fitzgerald
fitz at mml0.meche.rpi.edu
Wed Jan 9 06:34:31 AEST 1991
In article <}7W^DZ_ at rpi.edu> I meant to ask how to "embed" a "here"
document in a Makefile like this:
ed: $(DOC)
ed $(DOC) <<E_O_F
1,/^ *References$/-1w $(DOC).body
/^ *References$/+1,$w $(DOC).ref
q
E_O_F
With or without trailing backslashes, the second line gets run as a
shell command and I get "sh: *References-1w:" not found and so on. A
certain net-guru (who uses four rows of the keyboard to spell his
name!) has given me strong reason to suspect that there is no portable
way to do this but that SysV "augmented" make may. It's still up for
grabs if anyone is interested.
Brian Fitzgerald
More information about the Comp.unix.shell
mailing list