bug-make
[Top][All Lists]
Advanced

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

[bug #23922] On XP 64 with sh.exe installed in "Program Files (x86)" gma


From: Sam Liddicott
Subject: [bug #23922] On XP 64 with sh.exe installed in "Program Files (x86)" gmake generates a stack overflow exception.
Date: Thu, 10 Sep 2015 10:31:44 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0

Follow-up Comment #3, bug #23922 (project make):

This was fixed by git commit b5c06541

This change has broken my makefiles.

I think it is appropriate to extra-quote commands passed to the shell, but not
those in the SHELL definition itself.

Whoever defines SHELL can be presumed to know what they mean by it.

Surely it doesn't matter if SHELL has characters special to the shell, unless
it is being invoked by the shell, in which case can we limit the escaping to
the circumstance when it is actually invoked by the shell, and not by execve
?

If we insist on doing this, can we have an option to disable it? Or to enforce
that it be invoked by the shell instead of execve?

Detail:

Some make files, generated using a literate programming tool fangle
(https://savannah.nongnu.org/p/fangle) have SHELL defined thus:

SHELL:=bash -c 'exec $(SHELL) "$${@//\$$''' 12'''/$$''' 12'''}"' --

as you see, there are many shell-special characters there, but they are
already quoted appropriately. 

This fix now extra quotes characters like $ preventing their proper
interpretation by the shell.

The SHELL contrivance above is to permit use of  continuations at the end of a
recipe line but preserving the n to the shell, avoiding the need of the common
but painful ;  construct which is not valid in many embedded commands, e.g.
sed invocations with complex rules as part of the make recipe.

.ONESHELL does a similar thing but without the selective control of the
trailing  (as well as other harm by difficult-to-control stripping of @ - in
the middle of the recipe).



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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