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: Mon, 21 Jun 2004 08:19:51 +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> Ok. So i fix it to
 b> .INTERMEDIATE: %.tab.h

You cannot use pattern matching in prerequisites of .INTERMEDIATE.  This
line says that a file named, literally, '%.tab.h' is to be treated as
intermediate.

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

 b> It is still deletes only C file.

This is because somewhere in your makefile you actually use xxx.tab.h as
a prerequisite or target, while the same is not true of the .c file.

I believe, i am not using H file as a prerequisite.
My source is Makefile:

include make.rules
(where previously mentioned rule. now, without use of
INTERMEDIATE)

LSRCS = $(wildcard *.l)
BSRCS = $(wildcard *.y)
SRCS = $(wildcard *.c)
SRCS += $(patsubst %.y,%.tab.c,$(BSRCS))
SRCS += $(patsubst %.l,%.c,$(LSRCS))
OBJS = $(patsubst %.c,%.o,$(SRCS))

$(TARGETS): $(OBJS)
<linking>

The only place where that H file mentioned is include
directive in Flex file (L file).




reply via email to

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