URL: <https://savannah.gnu.org/bugs/?61154>
Summary: (w32/sub_proc.c) make_command_line should also quote full_exec_path. Project: make Submitted by: None Submitted on: Tue 14 Sep 2021 03:02:34 AM UTC Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 4.3 Operating System: MS Windows Fixed Release: None Triage Status: None _______________________________________________________ Details: This bug occurs under win32 when make tries to execute a shell script whose full path contains spaces. The current code at http://git.savannah.gnu.org/cgit/make.git/tree/src/w32/subproc/sub_proc.c#n1360 construct a command line that is obviously wrong when full_exec_path contains spaces. The shell then searches for a script whose name is the truncation of full_exec_path at its first white space and reports a file-not-found error. Example: Under MSYS. $ mkdir "/c/dir with space/" $ cd "/c/dir with space/" $ cat > script.sh <<EOF #!/bin/sh echo Hello "$@" EOF $ cat > Makefile <<EOF all: <tab>./script.sh World EOF $ make ./script.sh World sh: c:\dir: No such file or directory make: *** [Makefile:2: all] Error 127 but $ make SHELLFLAGS='-x -c' ./script.sh World + ./script.sh World Hello World $ _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?61154> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/