GNU bug report logs - #8718
error when using nested conditionals

Previous Next

Package: automake;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Sun, 22 May 2011 22:31:02 UTC

Severity: normal

Tags: wontfix

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Peter Breitenlohner <peb <at> mppmu.mpg.de>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: bug-automake <at> gnu.org, 8718 <at> debbugs.gnu.org, Bruno Haible <bruno <at> clisp.org>,
	owner <at> debbugs.gnu.org
Subject: Re: bug#8718: error when using nested conditionals
Date: Fri, 10 Jun 2011 12:23:42 +0200 (CEST)
On Fri, 10 Jun 2011, Stefano Lattarini wrote:

> Nope, it gets the information from the fact each AM_CONDITIONAL invocation
> does this:
>
>  AC_CONFIG_COMMANDS_PRE(
>    [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
>      AC_MSG_ERROR([[conditional "$1" was never defined.
>      Usually this means the macro was only invoked conditionally.]])
>    fi])])

Hi Stefano, Bruno,

how about the following alternative (for all conditionals, or just for some
of them, e.g., those under the regime of AM_IGNORE_UNDEFINED_CONDITIONALS):
Replace the AC_MSG_ERROR() above by a warning and set both $1_TRUE and
$1_FALSE to something that, when not hidden in a false branch of the
Makefile, (1) triggers a make syntax error, and (2) contains sufficient info
to deduce the cause for that error.

That way there is a warning from configure (often overlooked and/or
ignored), but an error from make only if that conditional is actually
needed.

Regards
Peter




This bug report was last modified 13 years and 345 days ago.

Previous Next


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