autoconf-patches
[Top][All Lists]
Advanced

[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.

> PACKAGE_CONFIG="AS_ESCAPE(AC_PACKAGE_STRING)$PACKAGE_APPEND"

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.

>        [CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS],
>                 [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
commas).

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: 
http://www.nabble.com/AS_ESCAPE-cleanups-tp20487887p20489202.html
Sent from the Gnu - Autoconf - Patches mailing list archive at Nabble.com.





reply via email to

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