automake
[Top][All Lists]
Advanced

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

Re: [PATCH] automake rules fail to make y.tab.h if y.tab.c exists


From: Alexandre Duret-Lutz
Subject: Re: [PATCH] automake rules fail to make y.tab.h if y.tab.c exists
Date: Wed, 05 Jun 2002 18:41:50 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu)

[Reviving an unanswered email from mid April]

>>> "Bernd" == Bernd Jendrissek <address@hidden> 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




reply via email to

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