GNU bug report logs - #13940
Spurious target redefinition warnings with Automake conditionals

Previous Next

Package: automake;

Reported by: Nick Bowler <nbowler <at> draconx.ca>

Date: Wed, 13 Mar 2013 01:42:02 UTC

Severity: normal

Tags: confirmed, help

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nick Bowler <nbowler <at> draconx.ca>
To: bug-automake <at> gnu.org
Subject: Spurious target redefinition warnings with Automake conditionals
Date: Tue, 12 Mar 2013 21:40:28 -0400
Consider the following:

  % cat >configure.ac <<'EOF'
AC_INIT([test], [0])

AM_INIT_AUTOMAKE([foreign])

AM_CONDITIONAL([FOO], [true])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF

  % cat >Makefile.am <<'EOF'
if FOO
all-local: bar
bar: ; @echo bar
endif

all-local: baz
baz: ; @echo baz
EOF

On this input, Automake is producing the following warning:

  Makefile.am:6: warning: all-local was already defined in condition
FOO, which is included in condition TRUE ...
  Makefile.am:2: ... 'all-local' previously defined here

This warning makes no sense, because there is no problem with this
Makefile.am as far as I can see.  However, the warnings seem to be just
noise as the generated Makefile.in appears correct and works fine.

The conditional there is important: Automake only appears to warn when
one of the all-local rules is inside a conditional and the other is not.




This bug report was last modified 4 years and 208 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.