bug-make
[Top][All Lists]
Advanced

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

Re: Windows shell discovery (was: Re: Incorrect path and shell script er


From: Loch Brandon
Subject: Re: Windows shell discovery (was: Re: Incorrect path and shell script error)
Date: Fri, 8 May 2020 14:42:31 +0000

Sorry I wasn't clear. I added the following command
SHELL := C:\Windows\System32\cmd.exe (which is what i meant by adding the path to cmd.exe)

I don't believe that it would be an issue with the escape characters because there are other developers that use this same makefile and have no issues with getting it to work. My windows profile was recreated which I believe lead to this issue. I'm not quite sure I know the impact that this had to my computer and other programs, since I have nothing to compare it to. 

The error I sent in the last email is what I get when adding the SHELL variable into the makefile.

Thanks,
Brandon

From: Eli Zaretskii <address@hidden>
Sent: Friday, May 8, 2020 1:22 AM
To: Loch Brandon <address@hidden>
Cc: address@hidden <address@hidden>; address@hidden <address@hidden>
Subject: Re: Windows shell discovery (was: Re: Incorrect path and shell script error)
 
> From: Loch Brandon <address@hidden>
> CC: "address@hidden" <address@hidden>
> Date: Thu, 7 May 2020 19:47:58 +0000
>
> Alright so I added the path to the cmd.exe and I now see a different error.

I didn't say to add the path to cmd.exe.  I meant to write exactly
this line in the beginning of the Makefile:

  SHELL = cmd.exe

> This is the output while running make.
>
> C:\Users\bl68969.JDNET\Projects\HHP2\Code\M2_501\ProgramSpecific\MakeFileBuild>make
> echo ------------------------------------------------------------------------------
> A subdirectory or file C:\Users\BL6896~1.JDN\AppData\Local\Temp\make75042.sh already exists.
> Error occurred while processing: C:\Users\BL6896~1.JDN\AppData\Local\Temp\make75042.sh.
> make: *** [dirs] Error 1

This probably means your old version of Make doesn't support
"SHELL = cmd.exe".  I guess I've misremembered when this was added.
The bottom line is that your Make is too old to handle the situation
with PATH and Unix shell availability on your system.

So my suggestion is to do either of the following:

  . find out what changed on your system that this Makefile started
    failing (Paul's hypothesis about Git for Windows making sh.exe
    appear on PATH sounds in the right direction), and fix it

  . rewrite your Makefile to invoke cmd.exe explicitly.  For example,
    instead of

      @if not exist $(OUTPUTDIR) $(MKDIR) $(OUTPUTDIR)

    write something like

      @cmd.exe /c if not exist $(OUTPUTDIR) $(MKDIR) $(OUTPUTDIR)

  . upgrade to a newer version of Make, where SHELL = cmd.exe should
    fix the problem.

In general, as Paul said, your problems happen because the Makefile
commands are supposed to be run by cmd.exe, but for some reason Make
invokes sh.exe to run them.  If none of the above advice helps,
finding out why Make calls sh.exe now where it didn't before should
provide a clue for how to fix the problem.

reply via email to

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