On 3/6/19 2:31 AM, Matthieu Poullet wrote: > Hello, > > I've just updated a bunch of configure.ac with autoupdate 2.69 and it > removes all spaces after commas in the AC_INIT macro and only in this > macro, e.g. > > diff --git a/flaim-ch8-10/configure.ac b/flaim-ch8-10/configure.ac > index baa0a1c..a724bbc 100644 > --- a/flaim-ch8-10/configure.ac > +++ b/flaim-ch8-10/configure.ac > @@ -1,8 +1,8 @@ > # -*- Autoconf -*- > # Process this file with autoconf to produce a configure script. > > -AC_PREREQ([2.62]) > -AC_INIT([flaim-projects], [1.0]) > +AC_PREREQ([2.69]) > +AC_INIT([flaim-projects],[1.0]) > AM_INIT_AUTOMAKE([-Wall -Werror foreign]) > LT_PREREQ([2.2]) > LT_INIT([dlopen]) > > So my questions are: > - is it a bug? Not a functional bug. Due to m4 quoting rules (where unquoted spaces after , when collecting macro arguments are stripped), the following are identical in behavior: AC_INIT([a], [b]) AC_INIT([a],[b]) But as it does look different, a patch to avoid the reformatting would be accepted (however, I suspect such a patch would be extremely difficult to write, as autoupdate is using m4 to figure out which macros to rewrite, and m4 doesn't track how many spaces it discarded, for you to know how many spaces to add back). > - is it a feature/a best practice? if yes, does it mean that autoconf > recommends not using spaces after commas and why does it not touch the > other macros then? Style-wise, space after comma is more legible, but it is not required. As for why other macros are untouched, it is because autoupdate uses m4 to look for a select handful of macros, and intentionally ignores all other macros - the spaces are only eaten on the macros that autoupdate is looking for, and AC_INIT happens to be one of those macros. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf