[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trailing whitespace in make macros
From: |
Eric Blake |
Subject: |
Re: trailing whitespace in make macros |
Date: |
Sat, 22 Jan 2011 07:03:02 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
[dropping automake-patches]
On 01/22/2011 03:19 AM, Ralf Wildenhues wrote:
>> Good suggestion. They should be mentioned in the portability section of
>> autoconf.texi if they aren't already, and as ## comments in check.am.
>
> Proposed patches for Automake maint and Autoconf below.
In addition to Stefano's review...
>
>
> address@hidden Comments in Make Macros
> address@hidden Comments in Make Macros
> address@hidden Comments in @file{Makefile} macros
> address@hidden @file{Makefile} macros and comments
> +
> +Avoid putting comments in macro values as far as possible. Posix
> +specifies that the text starting from the @samp{#} sign until the end of
> +the line is to be ignored, which has the unfortunate effect of
> +disallowing them even quoted. Thus, the following might lead to a
s/even quoted/even within quotes/
> address@hidden
> +prints @samp{bar .}, which is usually not intended, and can expose
> address@hidden bugs as described below.
Should we also mention the converse issue of non-comments? That is,
Posix requires that # embedded in the middle of a rule (and not a macro)
is okay. Which is why gnulib's include-next module works - it
AC_SUBST's PRAGMA_COLUMNS as "#pragma COLUMNS 80" on some platforms, but
as long as it uses constructs like:
arpa/inet.h: ...
...
sed -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
...
then the resulting literal # in @PRAGMA_COLUMNS@ (and not
$(PRAGMA_COLUMNS)) works as intended. That is, gnulib prefers using
$(var), but must use @var@ if var contains a literal #.
But that's enough additional detail that you can propose it as a
followup patch, without holding this one up. So ACK to this one with
the nits fixed.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature