This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: [PATCH] automake rules fail to make y.tab.h if y.tab.c exists
- From: Alexandre Duret-Lutz <duret_g at lrde dot epita dot fr>
- To: Bernd Jendrissek <berndj at prism dot co dot za>
- Cc: automake at gnu dot org
- Date: Wed, 05 Jun 2002 18:41:50 +0200
- Subject: Re: [PATCH] automake rules fail to make y.tab.h if y.tab.c exists
- References: <20020415160117.A15316@prism.co.za>
[Reviving an unanswered email from mid April]
>>> "Bernd" == Bernd Jendrissek <berndj@prism.co.za> writes:
[...]
Bernd> Whether it's considered a feature, bug, or limitation, I
Bernd> don't know, but having yacc-generated headers in a
Bernd> project is a little fragile.
Bernd> Stock automake spots the use of "AM_YFLAGS = -d" in
Bernd> Makefile.am, and emits a rule that y.tab.h (placeholder
Bernd> name) depends on y.tab.c; this is not formally correct.
Bernd> When y.tab.h is missing but y.tab.c is present (or
Bernd> y.tab.c is touched for some reason), make thinks it can
Bernd> rebuild y.tab.h from y.tab.c - a false assumption since
Bernd> there is no rule.
I have a pending patch for this at
http://mail.gnu.org/pipermail/automake-patches/2002-May/000823.html
Basically, it just replaces the `y.tab.h: y.tab.c' dependency by
y.tab.h: y.tab.c
if test ! -f $@; then \
rm -f y.tab.c; \
$(MAKE) y.tab.c; \
fi
(Automake does something similar in the handling of config.h
already.)
What do you think? Would this be enough for you?
[...]
--
Alexandre Duret-Lutz