autoconf
[Top][All Lists]
Advanced

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

Re: ensure a VPATH build


From: Ralf Wildenhues
Subject: Re: ensure a VPATH build
Date: Sun, 19 Feb 2006 11:50:55 +0100
User-agent: Mutt/1.5.9i

Hi Julien,

* Julien Lecomte wrote on Sun, Feb 19, 2006 at 01:49:45AM CET:
>
> if ( ($1) || exit) >/dev/null 2>&1 && \
>   ( (cd $srcdir && $1) || exit) >/dev/null 2>&1; then
> 
> Note: the '|| exit' may seem like overkill, but I copied those two lines 
> from another autoconf macro. This may be to avoid a long lost documented 
> shell bug.

All I could find was (autoconf/lib/m4sh.m4):
| # _AS_UNSET_PREPARE
| # -----------------
| # AS_UNSET depends upon $as_unset: compute it.
| # Use MAIL to trigger a bug in Bash 2.01;
| # the "|| exit" suppresses the resulting "Segmentation fault" message.
| # Avoid 'if ((', as that triggers a bug in pdksh 5.2.14.
| m4_defun([_AS_UNSET_PREPARE],
| [# Support unset when possible.
| if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
|   as_unset=unset
| else
|   as_unset=false
| fi
| ])

So if there is no other, yet unknown reason to add `|| exit', and you
have not found a shell where both `pwd -W' and the others trigger a
segfault, _and_ the segfault may be suppressed with `|| exit', then you
may safely delete it.  No need to add to legends.

Going back to your original question: what about the much simpler
approach I suggested, which would avoid all of these issues?

Cheers,
Ralf




reply via email to

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