Mon 17 Apr 2006 10:30:36 PM UTC, original submission:
Submitted by J David Bryan <jdbryan@acm.org>
With this makefile:
------------
files := $(shell dir /b *.c)
all:
@echo $(files)
------------
...and presuming that "touch a.c b.c" is done initially, then running make-3.81 under Windows XP SP2 with the -n option fails as follows:
F:\>make --version
GNU Make 3.81
[...]
This program built for Windows32
F:\>make
a.c b.c
F:\>make -n
process_begin: CreateProcess(NULL, "", ...) failed.
echo
Running the same commands with the same makefile under Unix succeeds:
$ make --version
GNU Make 3.81
[...]
This program built for sparc-sun-solaris2.9
$ make
a.c b.c
$ make -n
echo a.c b.c
This is a regression from 3.81 rc1 to rc2:
F:\>make-rc1 --version
GNU Make 3.81rc1
[...]
This program built for Windows32
F:\>make-rc1
a.c b.c
F:\>make-rc1 -n
echo a.c b.c
F:\>make-rc2 --version
GNU Make 3.81rc2
[...]
This program built for Windows32
F:\>make-rc2
a.c b.c
F:\>make-rc2 -n
process_begin: CreateProcess(NULL, "", ...) failed.
echo
I believe that the problem is with this change:
2006-02-18 Eli Zaretskii <eliz@gnu.org>
* job.c (construct_command_argv_internal): Don't create
a temporary script/batch file if we are under -n.
That corrected a problem with -n invocations leaving batch files behind (they were created in "construct_command_argv_internal", but because they weren't executed, they weren't subsequently deleted). However, the change causes batch file creation to be omitted under all circumstances if -n is specified. What is wanted instead is omission for commands in rules but not for $(shell) function invocations.
|