[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $am_aux_dir fix for MacOS X
From: |
Akim Demaille |
Subject: |
Re: $am_aux_dir fix for MacOS X |
Date: |
13 Sep 2001 09:38:21 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) |
| Comments on this one?
| Lars J
|
| Index: ChangeLog
| ===================================================================
| RCS file: /cvs/autoconf/ChangeLog,v
| retrieving revision 1.1660
| diff -u -n -r1.1660 ChangeLog
| a0 7
| 2001-09-12 Lars J. Aas <address@hidden>
|
| * m4/auxdir.m4 (AM_AUX_DIR_EXPAND): Divert output from 'cd' to
| /dev/null to avoid filling $am_aux_dir with garbage that propagates
| into sed-scripts in config.status. Problem triggers on MacOS X when
| srcdir equals builddir.
|
| Index: m4/auxdir.m4
| ===================================================================
| RCS file: /cvs/autoconf/m4/auxdir.m4,v
| retrieving revision 1.1
| diff -u -F^m4_define\|A[CU]_DEFINE -u -r1.1 auxdir.m4
| --- m4/auxdir.m4 2001/08/27 07:12:17 1.1
| +++ m4/auxdir.m4 2001/09/12 12:43:42
| @@ -37,8 +37,12 @@
| # Another solution, used here, is to always expand $ac_aux_dir to an
| # absolute PATH. The drawback is that using absolute paths prevent a
| # configured tree to be moved without reconfiguration.
| +#
| +# Note that "cd $auxdir" will output the path on MacOS X, and must be
| +# redirected to /dev/null to avoid filling am_aux_dir with garbage that
| +# ends up destroying the sed scripts in config.status.
|
| AC_DEFUN([AM_AUX_DIR_EXPAND], [
| # expand $ac_aux_dir to an absolute path
| -am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
| +am_aux_dir=`CDPATH=:; cd $ac_aux_dir &>/dev/null && pwd`
| ])
Hi Lars!
It doesn't seem right to me as it's a workaround, not a fix: we don't
know exactly what causes this behavior. And Alexandre Oliva once told
that some hosts choke when cd's output is redirected --that's why this
simple solution has always been rejected, and CDPATH is preferred.
I never saw evidence of this though.
Still, AFAIK, on MacOS /bin/sh is Zsh 3.1.6, and Autoconf neutralizes
CDPATH properly. So it seems to me that it is the CDPATH=: which
breaks everything and is to be removed here: Autoconf knows better
than Automake what is to be done, and has already done it in
configure's prologue.
Since that macro is from Automake, I suggest
if test "${CDPATH+set}" = set; then
CDPATH=${ZSH_VERSION+.}: # as recommended in autoconf.texi
fi
am_aux_dir=`cd $ac_aux_dir && pwd`
but in the future, when Automake require Autoconf, this line shall be
removed.
Could you please track all these lines in *.m4 files and submit
correction to both Autoconf and Automake? Of course, please make sure
my diagnosis is correct :)