It may still be possible to work around these issues via e.g. the environment.

MAKEFLAGS='SHELL=//bin/sh’ make

This does two things:

1. By putting the setting in the environment it may survive through
intermediate scripts (I thought make did this internally anyway but am
not positive).
2. The extraneous slash in //bin/sh defeats the string match, making a
modification of the binary unnecessary.

On Wed, Oct 14, 2015 at 9:15 PM, Mark Galeck <mark_gal...@pacbell.net> wrote:
> All right, after all I will have to modify Make source code.
>
> David's idea is very good... for recursive Make systems.
>
> Unfortunately in practice, a system like does not just have Make calls
> itself recursively, that would be too simple :)
>
> It has Make call various scripts, which then may call Make and so on and so
> forth...  Really, the only fool-proof way in such cases, to change the
> shell, is to replace /bin/sh and, it looks like, hack Make a little bit to
> make it always call the shell.
>
> Paul gave me the hack, unfortunately, it is for 4.1, when I tried to do the
> similar thing for 3.81, it did not work.  I can't use 4.1 because it
> segfaults for me.
>
> Have to understand 3.81 code better...
>
> Thank you everybody for your help
>
>
>
>
> ________________________________
> From: David Boyce <d...@boyski.com>
> To: Mark Galeck <mark_gal...@pacbell.net>
> Cc: Reinier Post <reinp...@win.tue.nl>; "help-make@gnu.org"
> <help-make@gnu.org>
> Sent: Tuesday, October 13, 2015 12:23 PM
> Subject: Re: how to use a different /bin/sh with GNU Make?
>
> I haven’t followed this whole thread, so apologies if I missed
> something, but you should be able to simply override SHELL on the
> command line and it will propagate into child makes. Example below.
> Also, for the debugging you’re trying to do: there’s an old series
> called “Ask Mr Make” (google it) with lots of useful techniques. I
> think his article “Tracing Rule Execution”
> (http://www.cmcrossroads.com/article/tracing-rule-execution-gnu-make)
> might be illuminating about ways to do this without hacking make or
> /bin/sh.
>
>
>

_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to