Eric Blake writes:
> On 04/13/2015 04:24 PM, Arthur Schwarz wrote:
> > 
> > I am trying to echo:
> >    echo 'exit $status' >> file
> > 
> > from the Makefile generated by Makefile.am. What I get is:
> >    echo 'exit $status' >> file
> > 
> > in the Makefile, which is correct, but in execution (make check) I get
> >    exit tatus
> > 
> > in file. I have tried variations of $status to no avail. Any idea how I can
> > get the correct result in file?
> 
> The same as any other time you want a literal $ to be passed through to
> the shell when writing Makefile snippets: escape the $ with another $,
> so that 'make' won't try to treat it as an expansion of ${s} at make time:
> 
> foo:
>       echo 'exit $$status' >> file

Ah, I missed the type of expansion/quoting being desired.

H

Reply via email to