[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why is this "quadrigraph" necessary?
From: |
Bert Wesarg |
Subject: |
Re: Why is this "quadrigraph" necessary? |
Date: |
Mon, 24 Nov 2014 08:16:24 +0100 |
Hi,
On Sun, Nov 23, 2014 at 10:38 PM, Bruce Korb <address@hidden> wrote:
>
> AC_DEFUN([INVOKE_AG_MACROS_LAST],[
> [if test X${INVOKE_AG_MACROS_LAST_done} != Xyes ; then]
> GUILE_FLAGS
> [ag_gv=$( exec 2>/dev/tty ; set -x
> gdir=$(pkg-config --cflags-only-I guile-${GUILE_EFFECTIVE_VERSION})
> gdir=$(echo ${gdir#-I})
> gdir=$(awk '/SCM_MICRO_VERSION/{ print @S|@3 }'
> ${gdir}/libguile/version.h)
> printf '%u%02u%03u' ${GUILE_EFFECTIVE_VERSION%\.*}
> ${GUILE_EFFECTIVE_VERSION#*\.} ${gdir}
> )]
>
> If I change that "@S|@" thingy to "$" it and the following "3" disappear.
> Why?
Because '$3' will be recognize by M4 as a parameter. It will be
replaced by the third argument to INVOKE_AG_MACROS_LAST. Thus it needs
quoting, be it by "@S|@" or "$[]3"
does not matter though.
Bert
> (And, yes, this fragment only works on recent POSIX shells.)
>