Subject: bug#7673: Bad option precedence: AM_AUTOMAKE_INIT and AUTOMAKE_OPTIONS might win over command line

From: Stefano Lattarini <[email-masked]>
Date: Sat, 18 Dec 2010 15:12:17 +0100

Hello automakers

Currently, the strictness-related options specified with AM_INIT_AUTOMAKE
in configure.ac and with AUTOMAKE_OPTIONS in Makefile.am win over those
specified on the command line:

  $ touch install-sh missing COPYING README AUTHORS NEWS INSTALL
  $ cat > configure.ac <<'END'
  AC_INIT([foo], [1.0])
  AM_INIT_AUTOMAKE([gnu])
  AC_CONFIG_FILES([Makefile])
  END
  $ : > Makefile.am
  $ aclocal
  $ automake --foreign
  Makefile.am: required file `./ChangeLog' not found
  $ sed -i 's/^AM_INIT_AUTOMAKE.*/AM_INIT_AUTOMAKE/' configure.ac
  $ echo 'AUTOMAKE_OPTIONS = gnu' > Makefile.am
  $ automake --foreign
  Makefile.am: required file `./ChangeLog' not found

While this behaviour might have had its historical reasons, I think its
confusing, suboptimal, and inconsistent with that of pratically all the
sane Unix and GNU programs.

The right precedence for *every* option would IMHO be:

 "command line" wins over AUTOMAKE_OPTIONS wins over AM_INIT_AUTOMAKE

Regards,
   Stefano