[Top][All Lists]

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

Re: AS_ESCAPE cleanups

From: Eric Blake
Subject: Re: AS_ESCAPE cleanups
Date: Thu, 13 Nov 2008 12:46:52 -0800 (PST)

> > Also, since AS_ESCAPE is (so far) undocumented, we might 
> > be able to get away with such a semantics change, [...]
> FYI, and FWIW, it has been around for a long time, and it is used a bit
> outside of Autoconf:

I did a similar search myself.


Safe (provided AC_PACKAGE_STRING doesn't expand to an unquoted comma);
there is no late expansion if you didn't pass the macro name quoted.

>                 [AS_ESCAPE([$(EMBED_META.CFLAGS)])], [+])

Not obvious from context; CFLAGS is probably not a macro, but
EMBED_META might be.  But looking at the file in google code search,
EMBED_META doesn't appear anywhere else, so probably safe.

> AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
>                                [:.*])))/stamp-h[]_AM_STAMP_Count])

Safe (supposing that $1 and _AM_DIRNAME don't expand to
any unquoted commas).

> But there are some others as well:
>   cs_dir=`AS_DIRNAME([$2])`
>           AS_ESCAPE(AS_MKDIR_P([$cs_dir]), [$`\])])])

Safe (supposing that AS_MKDIR_P doesn't expand to any unquoted

In other words, most clients of AS_ESCAPE in the wild are
already expanding the macro in advance (which they should be,
if the macro expands to any characters that need quoting).
And if they expanded in advance, then double-quoting won't
change the output.

Eric Blake

View this message in context:
Sent from the Gnu - Autoconf - Patches mailing list archive at

reply via email to

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