bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #30714] List of shell commands is outdated/Fallback to shell


From: Krzysztof Malinowski
Subject: [bug #30714] List of shell commands is outdated/Fallback to shell
Date: Tue, 10 Aug 2010 08:21:13 +0000
User-agent: Mozilla/5.0 (Windows; Windows NT 5.1; rv:2.0b2) Gecko/20100720 Firefox/4.0b2 ( .NET CLR 3.5.30729; .NET4.0E)

Follow-up Comment #2, bug #30714 (project make):

Well, the documentation states:

"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.)"

So basically it means, that every recipe line should go through a shell. And
in practice make takes shortcut which DOES affect the result - doesn't run the
command through shell, although the shell would have no problems with
executing the command.

As for MOVE being external program in Windows 9x: please note that Windows 9x
uses command.com, while NT line uses cmd.exe - the list of known commands
should be set depending on which shell is used. Please also note that you
already have cmd.exe's specific commands on the list (like setlocal/endlocal).
Furthermore, I was talking about falling back to shell when the command is not
found - in case that MOVE is actually expanded to move.exe it should be run
directly anyway, but even if not, the shell would still expand MOVE command on
its own.

One more issue that I have found is that current implementation ignores the
fact, that Windows shells are case-insensitive. Therefore if the Makefile
actually looks like this:

foo: bar
        move /y $< $@

bar:
        COPY NUL $@

then make fails even sooner, on creating bar, since it doesn't recognize COPY
as a built-in command:

$> make
COPY NUL bar
process_begin: CreateProcess(NULL, COPY NUL bar, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [bar] Error 2

Again, falling back to running shell would keep such problems away.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?30714>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]