Hi. That's a strange result, isn't it? Do you happen
to have a build log you could send me? I'd like to
look at your defines.
Yes, I did try using BATCH_MODE_ONLY_SHELL. Unless
I did something brain dead, it seems to have made
no difference whatsoever. What is the expected
result?
I took a long look at main.c -- it's quite difficult
to read unless you're a preprocessor. Lots of
#ifdef platform forking (which is sadly necessary to
get make to limp along on DOS/Win), but it ideally
should be separated out into separate files. Not that
I'm volunteering, of course. :)
c
At 12:25 PM 8/31/2000 +1100, you wrote:
>Hi,
>
>Your Makefile outputs cmd.exe for me, but uses sh.exe to do it.
>make-3.79.1, Intel C++ compiler, HAVE_CYGWIN_SHELL=1.
>
>Have you tried using BATCH_MODE_ONLY_SHELL instead?
>
>I had a quick look at the code. Process_begin() in sub_proc.c tries to do
>all kinds of magic stuff to the command line. My view is that is should
>probably leave it alone, or only change it if told. The whole area looks
>like it needs a rethink to me.
>
>Jan Mikkelsen.
>
>-----Original Message-----
>From: Chad Loder <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>Date: Thursday, 31 August 2000 6:32
>Subject: Setting and using SHELL variable
>
>
>>Hello. I've read the GNU Make Manual and looked around in the help
>>archives for anything related to this problem, but can't find anything.
>>
>>I am running on Windows NT and I want my shell commands to be interpreted
>>by cmd.exe instead of sh.exe. I set the SHELL environment variable from
>>within the makefile as follows:
>>
>>######begin makefile#################
>>SHELL=cmd.exe
>>
>>all:
>> echo $(SHELL)
>>######end makefile###################
>>
>>When I execute this makefile, it echos "C:/bin/sh.exe" instead of
>>cmd.exe. I have experimented with quite a few variations on this makefile,
>>including:
>>
>>1) Setting SHELL using simple variable syntax (SHELL := ...)
>> ^^
>>
>>2) Setting SHELL and/or MAKESHELL
>>
>>3) Using the full path to cmd.exe (with backslashes and with forward
>> slashes).
>>
>>4) Renaming sh.exe to something else (so it isn't found)
>>
>>5) Setting SHELL via the environment and then using the -e flag to make
>>
>>6) Setting/unsetting/messing with the COMSPEC environment variable
>>
>>...and a few other permutations, with no luck.
>>
>>The only thing that comes even remotely close to the behavior I'd expect
>>is when I pass a SHELL definition on the make command line:
>>
>>make SHELL=cmd.exe all
>>
>>This will spawn cmd.exe all right, but the shell command from the makefile
>>isn't executed, and the cmd.exe is not closed (so I have to type 'exit'
>>several times after the makefile finishes to get back to my original
>>shell).
>>
>>I am using make 3.79 compiled with VC++ 6.0 on Windows 2000.
>>
>>Does anyone have any suggestions?
>>
>>Thanks,
>> Chad Loder
>>
>>
>>
>>
>