URL: <https://savannah.gnu.org/bugs/?56449>
Summary: job.c (construct_command_argv_internal): Must use shell if '%' character is present in recipe line Project: make Submitted by: None Submitted on: Thu 06 Jun 2019 11:13:33 AM UTC Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: SCM Operating System: MS Windows Fixed Release: None Triage Status: None _______________________________________________________ Details: The slow path must be taken if a shell escape character ('%') is present in the command line. Otherwise escaped characters on the command line will not be properly unescaped by the shell. Demo: ====== argv1.c: --------%<---------------------- #include <stdio.h> int main(int argc, char *argv[]) { puts(argv[1]); return 0; } -------->%---------------------- > gcc -Wall -o argv1.exe argv1.c Makefile: --------%<---------------------- $ cat Makefile .PHONY: all SHELL = cmd.exe all: @argv1 %% @argv1 "%%" @argv1 %% > con -------->%---------------------- *** Please run mingw32-make from cmd.exe, not from Msys shell *** > mingw32-make.exe %% %% % Expected result: % % % Result after applying attached patch: % % % _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Thu 06 Jun 2019 11:13:33 AM UTC Name: 0001-src-job.c-construct_command_argv_internal-Use-shell-.patch Size: 2KiB By: None <http://savannah.gnu.org/bugs/download.php?file_id=47045> _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?56449> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make