[Top][All Lists]

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

Re: [Bug-gnulib] bison.m4 breaks build on systems without Bison

From: Derek Robert Price
Subject: Re: [Bug-gnulib] bison.m4 breaks build on systems without Bison
Date: Mon, 03 May 2004 12:18:16 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413

Hash: SHA1

Bruno Haible wrote:

>Derek Robert Price wrote:
>>I suggest calling AM_MISSING_PROG(YACC, bison -y) from bison.m4 rather
>>than just naively setting and substing.
>Why? What's the effect/benefit?

I've gotten several reports since updating CVS to use the most current
getdate module from GNULIB that our build now breaks on various
systems which lack Bison.  Calling AM_MISSING_PROG this way causes
failed calls to Bison to issue a warning message but the "missing"
wrapper does not exit with an error code and thus fails to break make.

If you glance at AM/configure generated Makefiles, you should note
that this is how the Makefiles call the autotools, so that when a
casual user is building the source, missing autotools and
uncooperative timestamps do not break the build.

>AM_MISSING_PROG is not a documented automake macro. As such, it can
>disappear from any automake release without prior notice. I wouldn't
>want to use such a macro.

If I could persuade the Automake team to document the macro would you
consider it?

>>+       * modules/getdate (EXTRA_DIST): List getdate.c so that
systems without
>>+       Bison may build the object file.
>Strange. For gettext, I've listed the bison-built files only in
>not in EXTRA_DIST, and the distributions contain these files. How
come that
>this doesn't work for you? Which version of automake are you using? Have
>you overridden the automake generated 'distdir' target?

This one was my fault.  I assumed that BUILT_SOURCES wasn't included
in dist targets without looking into it.  I just checked my generated
Makefiles and you are correct, Automake included them,

On further inspection of the Automake documentation, however, it
appears that getdate.c does not need to be included in the

>    `BUILT_SOURCES' is actually a bit of a misnomer, as any file which
> must be created early in the build process can be listed in this
> variable.  Moreover, all built sources do not necessarily have to be
> listed in `BUILT_SOURCES'.  For instance a generated `.c' file doesn't
> need to appear in `BUILT_SOURCES' (unless it is included by another
> source), because it's a known dependency of the associated object.

I confirmed this by removing getdate.c from both BUILT_SOURCES &
MAINTAINERCLEANFILES in my Makefile.am and getdate.c still appears in
my Makefile.in's DIST_COMMON variable and in the
maintainer-clean-generic target:

> maintainer-clean-generic:
>         @echo "This command is intended for maintainers to use"
>         @echo "it deletes files that may require special tools to
> rebuild."
>         -rm -f getdate.c
>         -test -z "$(MAINTAINERCLEANFILES)" || rm -f
>         -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)


- --

Email: address@hidden

Get CVS support at <http://ximbiot.com>!
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


reply via email to

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