Re: Make on XP - shell selection?

Eli Zaretskii <[email protected]>
Newsgroups gmane.comp.gnu.make.windows
Message-ID <[email protected]>
> From: "grischka" <[email protected]>
> Cc: <[email protected]>
> Date: Sun, 21 Oct 2007 14:25:14 +0200
> 
> > Please suggest another way, if you can.  Whenever Make wants to use
> > the shell, it does this:
> >
> >     shell = allocated_variable_expand_for_file ("$(SHELL)", file);
> >
> > That is, it simply looks at its database of variables, and extracts
> > the value from there.  Unless we store there the full absolute file
> > name of the shell's executable when we see its definition, how will we
> > make sure Make uses that executable when the time comes to invoke
> > commands?
> 
> I don't see the problem. If make needs to examine or adjust the shell
> filename for technical reasons then it much better does that with the
> expanded result of SHELL. It can look for it in the PATH if neccessary,
> and decide from the filename whether it is comspec or sh-like or
> non-standard.
> 
> Basically, in job.c:construct_command_argv:
> 
>     shell = allocated_variable_expand_for_file ("$(SHELL)", file);
>     #ifdef WINDOWS32
>       w32_adjust_shell_and_set_mode_flags (&shell);
>     #endif

I'm not sure I follow: are you suggesting to write a function named
w32_adjust_shell_and_set_mode_flags that would search for SHELL along
PATH, like find_and_set_default_shell does now?  That'd be a terrible
cycle killer, because this function would be called on each command
invocation.

Or am I missing something?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.