URL: <http://savannah.gnu.org/bugs/?30730>
Summary: SHELL does not work correctly on Windows Project: make Submitted by: raspy Submitted on: Tue 10 Aug 2010 04:08:27 PM GMT Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 3.81 Operating System: MS Windows Fixed Release: None Triage Status: None _______________________________________________________ Details: 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. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?30730> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make