[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Forcing complete expansion of a PATH variable
From: |
Andreas Schwab |
Subject: |
Re: Forcing complete expansion of a PATH variable |
Date: |
Thu, 24 Apr 2003 15:37:23 +0200 |
User-agent: |
Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 (gnu/linux) |
Guido Draheim <address@hidden> writes:
|> > 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 whitespace before each argument is ignored by m4. It's rather the
$1 that is removed.
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- 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, 2003/04/24
- Re: Forcing complete expansion of a PATH variable,
Andreas Schwab <=