bug-make
[Top][All Lists]
Advanced

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

[bug #56449] job.c (construct_command_argv_internal): Must use shell if


From: Christian Eggers
Subject: [bug #56449] job.c (construct_command_argv_internal): Must use shell if '%' character is present in recipe line
Date: Fri, 30 Aug 2019 08:42:24 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #7, bug #56449 (project make):

Hi, I'm the original author of this bug. It's some time ago I wrote this, so
maybe I've forgotten some details...

[comment #2 comment #2:]
> I see that this bug was fixed and closed, but looking at the result, I'm not
sure the fix is correct.  If I invoke a Windows program from the cmd.exe
prompt with %% as argument, the program gets "%%" as its argv[1], not just a
single %.
> 
> So I guess I don't understand why the OP expected to get a single %
character.  Am I missing something?

I guess that cmd.exe may distinguish between "interactive mode" and "script
mode".
So in interactive mode it will not change double % to a single %. But in
script mode it does. For this moment I have no windows machine, but on
wineconsole I get different output when I 

- type "echo %%"                         --> I get double %
- insert "echo %%" into a test.cmd file  --> I get single %

I also remember that using *echo* is not a good idea for demonstration with
*make*. As make recognizes echo as a shell builtin it always invokes this via
a shell.
That is the reason why I sent the demo program.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56449>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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