[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Forcing complete expansion of a PATH variable
From: |
Tim Van Holder |
Subject: |
Re: Forcing complete expansion of a PATH variable |
Date: |
Thu, 24 Apr 2003 09:05:14 +0200 |
> > The code at http://ac-archive.sf.net/Miscellaneous/ac_subst_dir.html
> > says:
> >
> > AC_DEFUN([AC_SUBST_DIR], [
> > ifelse($2, , $1, $1="[$]$2")
> > $1=`(
> > test "x$prefix" = xNONE &&
> prefix="$ac_default_prefix"
> > test "x$exec_prefix" = xNONE &&
> exec_prefix="${prefix}"
> > eval echo \""[$]$1"\"
> > )`
> > AC_SUBST($1)
> > ])
> >
> > Try this instead:
> >
> > AC_DEFUN([AC_SUBST_DIR], [
> > ifelse($2,,,$1="[$]$2")
> > $1=`(
> > test "x$prefix" = xNONE &&
> prefix="$ac_default_prefix"
> > test "x$exec_prefix" = xNONE &&
> exec_prefix="${prefix}"
> > eval echo \""[$]$1"\"
> > )`
> > AC_SUBST($1)
> > ])
> >
> > - Hari
>
> spot the difference :-)=) ... the whitespace in the ifelse, right?
No, the $1 in the ifelse.
> I am modifying the macro in the ac-archive, plus sending a message
> to the author given for that macro. I wonder why that was never a
> problem before. Well, anyways, let's have that fixed. -- guido
Because most people will use
AC_SUBST_DIR(MUSICPATH, musicpath)
i.e. SUBST the expansion of the path in $musicpath as MUSICPATH
Because the second argument was omitted here (resulting in a lowercase
#define I'd expect - which is what you normally wouldn't want), the
bug was hit.
- Forcing complete expansion of a variable, Joshua Kwan, 2003/04/23
- Re: Forcing complete expansion of a PATH variable, Guido Draheim, 2003/04/23
- Re: Forcing complete expansion of a PATH variable, Joshua Kwan, 2003/04/23
- Re: Forcing complete expansion of a PATH variable, Raja R Harinath, 2003/04/23
- Re: Forcing complete expansion of a PATH variable, Joshua Kwan, 2003/04/23
- Re: Forcing complete expansion of a PATH variable, Guido Draheim, 2003/04/24
- Re: Forcing complete expansion of a PATH variable,
Tim Van Holder <=
- Re: Forcing complete expansion of a PATH variable, Andreas Schwab, 2003/04/24