Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.questions Subject: Re: parsing commands in a makefile Message-ID: <3766@solo9.cs.vu.nl> Date: 21 Oct 89 06:33:41 GMT References: <4782@ncar.ucar.edu> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 27 clyne@redcloud.ucar.edu (John Clyne) writes: \... \target: \ sed -e "/pattern/a\ \ text to append" < in_file > out_file \ \What sed gets passed is "/pattern/atext to append" Is there any way around \this? i.e how can I pass a new line to a command that is part of a make rule? Why don't you put the sed script into a file of its own? target: sed -f script.sed < in_file > out_file Else you could set an environment variable, to be used in the Makefile: $ NL=' ' $ export NL $ cat Makefile SHELL = /bin/sh target: sed -e '/pattern/a\$(NL)text to append' ... $ -- A symbolic link is a POINTER to a file, | Maarten Litmaath @ VU Amsterdam: a hard link is the file system's GOTO. | maart@cs.vu.nl, mcsun!botter!maart