Paul D. Smith wrote:

%% bertold <[EMAIL PROTECTED]> 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) $^



Ok. So i fix it to
.INTERMEDIATE: %.tab.h
%.tab.c %.tab.h : %.y
$(BS) $(BSFLAGS) $^

It is still deletes only C file.


_______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to