mirror of
git://git.sv.gnu.org/autoconf
synced 2025-02-23 14:09:51 +08:00
Document sh -e problem with subcommands.
This commit is contained in:
parent
278cbdd51f
commit
4b794c38d7
@ -1,3 +1,9 @@
|
||||
2004-05-16 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* doc/autoconf.texi (Limitations of Make): Note that BSD make
|
||||
(until 2004) invoked subcommands with sh -e, contra POSIX.
|
||||
Reported by Kevin Ryde.
|
||||
|
||||
2004-05-10 Eric Sunshine <sunshine@sunshineco.com>
|
||||
|
||||
* programs.m4 (_AC_PROG_GREP): Fixed bug where PATH argument handed to
|
||||
|
@ -11608,6 +11608,7 @@ of which are listed here. First of all, remember that since commands
|
||||
are executed by the shell, all its weaknesses are inherited@enddots{}
|
||||
|
||||
@table @asis
|
||||
|
||||
@item @code{$<}
|
||||
@acronym{POSIX} says that the @samp{$<} construct in makefiles can be
|
||||
used only in inference rules and in the @samp{.DEFAULT} rule; its
|
||||
@ -11615,6 +11616,19 @@ meaning in ordinary rules is unspecified. Solaris 8's @command{make}
|
||||
for instance will replace it with the empty string. OpenBSD (3.0 and
|
||||
later) @command{make} will diagnose these uses and error out.
|
||||
|
||||
@item Command execution
|
||||
Since 1992 @acronym{POSIX} has required that @command{make} must invoke
|
||||
each command with the equivalent of @samp{sh -c} subshell. However,
|
||||
many @command{make} implementations, including BSD make through circa
|
||||
2004, use @samp{sh -e -c} instead, and the @option{-e} option causes the
|
||||
subshell to exit immediately if a subsidiary simple-command fails. For
|
||||
example, the command @samp{touch T; rm -f U} will always attempt to
|
||||
remove @file{U} with @acronym{POSIX} make, but incompatible
|
||||
@command{make} implementations skip the @command{rm} if the
|
||||
@command{touch} fails. One way to work around this is to reword the
|
||||
affected simple-commands so that they always succeed, e.g., @samp{touch
|
||||
T || :; rm -f U}.
|
||||
|
||||
@item Leading underscore in macro names
|
||||
Some @command{make}s don't support leading underscores in macro names,
|
||||
such as on NEWS-OS 4.2R.
|
||||
|
Loading…
Reference in New Issue
Block a user