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 -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org