bugmake - Bugs: bug #30730, SHELL does not work correctly on...

 
 

bug #30730: SHELL does not work correctly on Windows

Submitted by:  Krzysztof Malinowski <raspy>
Submitted on:  Tue 10 Aug 2010 04:08:27 PM UTC  
 
Severity: 1 - WishItem Group: Enhancement
Status: LaterPrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 3.81Operating System: MS Windows
Fixed Release: NoneTriage Status: Major Effort

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 27 Apr 2013 05:18:12 PM UTC, comment #1:

Make on Windows currently supports only the default Windows shell cmd.exe or compatible replacements, or ports of Unixy shells, such as the ported Bash.

Volunteers are welcome to contribute code for other shells, including PowerShell.

Eli Zaretskii <eliz>
Project Member
Tue 10 Aug 2010 04:08:27 PM UTC, original submission:

When setting a different SHELL than standard Windows shell, it is not being executed when recipe is about to be made. This is related to bug #30714 - shell is not being invoked if the command is a shell built-in and is not recognized.

Consider the following Makefile:

SHELL := C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe

foo: bar
Copy-Item $< $@

bar:
New-Item -type file $@

The result is:

$> make -d -r
[...]
find_and_set_shell() setting default_shell = C:/WINDOWS/system32/WindowsPowerShell/v1.0/powershell.exe
Updating makefiles....
Considering target file `Makefile'.
Looking for an implicit rule for `Makefile'.
No implicit rule found for `Makefile'.
Finished prerequisites of target file `Makefile'.
No need to remake target `Makefile'.
Updating goal targets....
Considering target file `foo'.
File `foo' does not exist.
Considering target file `bar'.
File `bar' does not exist.
Finished prerequisites of target file `bar'.
Must remake target `bar'.
Invoking recipe from Makefile:7 to update target `bar'.
New-Item -type file bar
CreateProcess(NULL,New-Item -type file bar,...)
process_begin: CreateProcess(NULL, New-Item -type file bar, ...) failed.
Putting child 0095DF18 (bar) PID 9834824 on the chain.
Live child 0095DF18 (bar) PID 9834824
Main thread handle = 000007D8
make (e=2): The system cannot find the file specified.
Reaping losing child 0095DF18 PID 9834824
make: *** [bar] Error 2
Removing child 0095DF18 PID 9834824 from chain.

This is against the documentation which says:

"When it is time to execute recipes to update a target, they are executed by invoking a new subshell for each line of the recipe, unless the .ONESHELL special target is in effect (see Using One Shell) (In practice, make may take shortcuts that do not affect the results.)"

The shortcut taken is not to run shell and this makes setting $(SHELL) useless.

This is also reproducible on 3.82.

Krzysztof Malinowski <raspy>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by eliz (Posted a comment)
  • -unavailable- added by raspy (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 27 Apr 2013 05:18:12 PM UTCelizSeverity3 - Normal=>1 - Wish
      Item GroupBug=>Enhancement
      StatusNone=>Later
      Triage StatusNone=>Major Effort

    Back to the top


    Powered by Savane 3.1-cleanup