On Wed, 2015-09-02 at 20:41 -0700, [email protected] wrote:
> Is there any way to induce Gnu Make to write the recipe to a file
> and then 'bash -c' the file?

There is currently no way to get make to do this.  However you can do it
yourself if you have GNU make 4.0 or above, using the $(file ...)
function to write content to a file then having your recipe execute the
file via $(SHELL) or whatever.

BTW, make always uses /bin/sh (unless you reset SHELL explicitly) never
bash.  On some systems /bin/sh is the same thing as bash, but on other
systems it's not.  If you want your makefile to be portable you should
either explicitly set SHELL = /bin/bash or else use POSIX sh features
only and avoid bash extensions.


_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to