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: bertold
Subject: Re: var used by implicit rule
Date: Sun, 20 Jun 2004 17:39:12 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040608

Paul D. Smith wrote:

%% bertold <address@hidden> writes:

 b> I did rule for bison files, cause '-d' flag needed.  It is creates
 b> the header file also. Now, make deletes the C source file, but not
 b> the header.  Is there way to force make to do it?

Make will delete any file it considers to be an "intermediate file".
You can look up the term "intermediate" in the index of the GNU make
manual to learn about it.

You can force make to consider a target to be intermediate by making it
a prerequisite of the .INTERMEDIATE special target.

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




reply via email to

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