GNU bug report logs -
#8718
error when using nested conditionals
Previous Next
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
View this message in rfc822 format
Hi Stefano,
> Cannot you simply initialize the
> automake conditionals you might need and that you know might be called
> conditionally to (possibly dummy) defaults in gl_INIT or gl_EARLY or
> something like that?
No, I cannot do that. The gnulib users write code like this:
=================================== foo.m4 ====================================
AC_DEFUN([gl_FOO],
[
if test 7 = 7; then
use_variant_a=true
else
use_variant_a=false
fi
AM_CONDITIONAL([USE_VARIANT_A], [$use_variant_a])
])
=================================== foo.mk ====================================
if USE_VARIANT_A
libgnu_a_SOURCES += foo_a.c
else
libgnu_a_SOURCES += foo_b.c
endif
===============================================================================
on which I have no influence, and from which I cannot extract/collect the
USE_VARIANT_A identifier.
> autoconf
> knows nothing about the Makefile.am files, and the current autotools
> "layerization" does not allow autoconf to use any sort of "callback" to
> automake to get such information
But when autoconf's generated configure file produces the error
configure: error: conditional "USE_VARIANT_A" was never defined.
it must have gotten the info "please check that USE_VARIANT_A is defined".
From Automake, when it scanned the Makefile.am.
What I'm asking for is that
- Automake's scanning of Makefile.am keeps track of which conditionals
are enabled at each line.
- Automake passes to Autoconf the info "please check that either USE_FOO
has the value 'false' or USE_VARIANT_A is defined".
> it could be easily done with
> a new m4 macro, say 'AM_IGNORE_UNDEFINED_CONDITIONALS'.
Or with an Automake option that I add to the Makefile.am. I don't mind which
way.
Bruno
--
In memoriam Johanna Kirchner <http://en.wikipedia.org/wiki/Johanna_Kirchner>
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.