help-make
[Top][All Lists]
Advanced

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

Re: var used by implicit rule


From: Paul D. Smith
Subject: Re: var used by implicit rule
Date: Sun, 20 Jun 2004 12:58:58 -0400

%% bertold <address@hidden> writes:

  b> Make does consider file produced by Bison to be intermediate,
  b> but i wrote implicit rule
  b> %.tab.c: %.y
  b>        $(BS) $(BSFLAGS) $^
  b> where BSFLAGS is `-d' and it will produce 2 files: C and H.
  b> I tried
  b> .INTERMEDIATE %.tab.h
  b> but no use.

Well, sure.  You've never told make which rule is creating a .tab.h
file, or even that you're ever creating one at all!  How can it know
when it should delete a file it knows nothing about?

You need to tell make that the invocation of bison builds both those
files, like this:

    %.tab.c %.tab.h: %.y
            $(BS) $(BSFLAGS) $^

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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