[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make with 4NT as SHELL

From: Bill McCarthy
Subject: Re: Make with 4NT as SHELL
Date: Tue, 13 Jun 2006 14:07:24 -0500

On Tue 13-Jun-06 1:06pm -0600, Eli Zaretskii wrote:

>> Date: Tue, 13 Jun 2006 07:25:30 -0500
>> From: Bill McCarthy <address@hidden>
>> -------------------------------------
>> .PHONY: clean
>> clean:
>>         @echo SHELL     = $(SHELL)
>>         @echo COMSPEC   = $(COMSPEC)
>>         address@hidden /?
>> -------------------------------------
>> If I just type make, the output is:
>> -------------------------------------
>> SHELL     = sh.exe
>> COMSPEC   = C:\util\4nt\4nt.exe
>> The help info for CMD's del
>> -------------------------------------
>> Running: make SHELL=4nt.exe
>> -------------------------------------
>> SHELL     = 4nt.exe
>> COMSPEC   = C:\util\4nt\4nt.exe
>> The help info for CMD's del
>> -------------------------------------
>> Everything I've tried thus far, results in CMD.EXE being
>> used as my SHELL.
>> Is there a way, that works, to choose the shell desired?
> With Make 3.80, there's no way to do that.  It simply didn't support
> any shells other than sh.exe and cmd.exe.

That seems to be supported by my experience so far.

> With Make 3.81, it should be possible (looking at the code, I don't
> have 4nt installed to actually try that), but Make will treat anything
> that isn't cmd.exe as a Unixy shell, so the commands might not work as
> you expect.  For example, I expect Make to invoke shell commands with
> "4nt -c COMMAND", not "4nt /c COMMAND".  I don't know what that will
> do to 4nt.
> To have a proper support for 4nt part of Make, someone who knows
> enough intimate details about 4nt will have to submit a patch that
> sets sh_chars and sh_cmds (in job.c) to the correct values, and also
> make sure that the code in
> job.c:construct_command_argv_internal does
> the right thing for 4nt.

4NT is basically an enhanced CMD.  It accepts CMD .bat
files, so make should use the same rules as for CMD (but not
use make's internal emulations of CMD commands).  4NT adds
new commands, functions and aliases and new options on most
of the CMD commands.

In other words, make should treat a 4nt shell just like a
CMD shell.

Thanks for your comments, Eli.  I hope those working on 3.81
read this and enable make to work with 4NT.

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]