bug-automake
[Top][All Lists]
Advanced

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

Some warnings of type `unsupported' don't cause "automake -Werror" to fa


From: Stefano Lattarini
Subject: Some warnings of type `unsupported' don't cause "automake -Werror" to fail
Date: Sun, 18 Apr 2010 18:17:29 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.2; i686; ; )

Hello automakers.

Recently, I stumbled upon a weird behaviour of automake: apparently,
even when given the `-Werror' flag, it doesn't fail on warnings of type 
`unsupported' which concern the copresence of `configure.ac' and 
`configure.in'.  On the other hand, aclocal fails as expected in a 
similar situation.  Also, automake seems to fail correctly on other 
warnings of type `unsupported'.

-*-*-

The following script demonstrate the problem:

  $ cat showbug.sh

  set -e -x

  rm -rf showbug.tmpdir
  mkdir showbug.tmpdir
  cd showbug.tmpdir

  AUTOMAKE="${AUTOMAKE-automake} --foreign -Werror -a -c"
  ACLOCAL="${ACLOCAL-aclocal} -Werror"

  : >Makefile.am

  cat >configure.ac <<'EOF'
  AC_INIT([foo],[1.0])
  AM_INIT_AUTOMAKE
  AC_CONFIG_FILES([Makefile])
  EOF

  : > configure.in
  $ACLOCAL && exit 1
  rm -f configure.in
  $ACLOCAL

  : > configure.in
  $AUTOMAKE && exit 1
  rm -f configure.in
  $AUTOMAKE

The script fails with both the installed automake/aclocal (1.11.1, 
from debian package) and the latest automake/aclocal from the git
repo, with traces similar to these ones:

  $ sh showbug.sh
  + rm -rf showbug.tmpdir
  + mkdir showbug.tmpdir
  + cd showbug.tmpdir
  + AUTOMAKE='automake --foreign -Werror -a -c'
  + ACLOCAL='aclocal -Werror'
  + :
  + cat
  + :
  + aclocal -Werror
  aclocal: `configure.ac' and `configure.in' both present.
  aclocal: proceeding with `configure.ac'.
  + rm -f configure.in
  + aclocal -Werror
  + :
  + automake --foreign -Werror -a -c
  automake: `configure.ac' and `configure.in' both present.
  automake: proceeding with `configure.ac'.
  configure.ac:2: installing `./install-sh'
  configure.ac:2: installing `./missing'
  + exit 1

-*-*-

On the contrary, the following script works as expected:

  $ cat nobug.sh

  set -e -x

  rm -rf nobug.tmpdir
  mkdir nobug.tmpdir
  cd nobug.tmpdir

  AUTOMAKE="${AUTOMAKE-automake} --foreign -Werror -a -c"
  ACLOCAL="${ACLOCAL-aclocal} -Werror"

  cat >Makefile.am <<'EOF'
  if COND
  AUTOMAKE_OPTIONS = no-dist
  endif
  EOF

  cat >configure.ac <<'EOF'
  AC_INIT([foo],[1.0])
  AM_INIT_AUTOMAKE
  AC_CONFIG_FILES([Makefile])
  AM_CONDITIONAL([COND],[:])
  EOF

  $ACLOCAL
  $AUTOMAKE && exit 1
  :

and here are its traces:
 
  $ sh nobug.sh
  + rm -rf nobug.tmpdir
  + mkdir nobug.tmpdir
  + cd nobug.tmpdir
  + AUTOMAKE='automake --foreign -Werror -a -c'
  + ACLOCAL='aclocal -Werror'
  + cat
  + cat
  + aclocal -Werror
  + automake --foreign -Werror -a -c
  configure.ac:2: installing `./install-sh'
  configure.ac:2: installing `./missing'
  Makefile.am:2: `AUTOMAKE_OPTIONS' cannot have conditional contents
  + :

Apparently, the warning here seems to be emitted by the subroutine
`check_defined_unconditionally' in Automake::Variable, which uses the
`unsupported' warning type (and in fact, if the flag `-W no-unsupported'
is added to the automake call in `nobug.sh', the script fails).

-*-*-

I couldn't figure out the reasons of this weird behaviour.  Any idea of what's 
happening?

And obviously, let me know if you need more details.

Regards,
    Stefano




reply via email to

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