URL: <http://savannah.gnu.org/bugs/?30714>
Summary: List of shell commands is outdated/Fallback to shell Project: make Submitted by: raspy Submitted on: Mon 09 Aug 2010 12:53:19 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: List of known shell commands is hardcoded in GNU make's source code. This leads to problems when trying to run a command which is not on the list. Consider the following Makefile: foo: bar move /y $< $@ bar: copy nul $@ When running such Makefile it fails: $> make copy nul bar 1 file(s) copied. move /y bar foo process_begin: CreateProcess(NULL, move /y bar foo, ...) failed. make (e=2): The system cannot find the file specified. make: *** [foo] Error 2 'copy' command is recognized and is being run through shell, while 'move' command is not on the list and is being passed to Windows with hope that system will somehow know how to run it. Unfortunately this is a built-in command and it cannot be run outside of shell. There is a short-term and a long-term resolution for that. In the short-term the list of known commands should be updated (http://ss64.com/nt/ has a quite good list of what's built-in). But in order to work really reliably, the algorithm should be changed: when an unknown command is met, run the shell and pass the command through shell instead of operating system. Current implementation is limited when it comes to shell support: suppose that somebody changes shell by setting SHELL to something different, i.e. PowerShell. There can be completely different commands, so hardcoded list of commands will not be suitable; all commands are routed to Windows, totally bypassing $(SHELL) which in turn appears to be useless. The issue is also reproducible on 3.82. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?30714> _______________________________________________ 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