[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Advanced Auto-Dependency Generation" and lex/yacc (again)
From: |
Philip Guenther |
Subject: |
Re: "Advanced Auto-Dependency Generation" and lex/yacc (again) |
Date: |
Mon, 30 Jan 2006 13:33:43 -0700 |
On 1/30/06, Boris Kolpackov <address@hidden> wrote:
> Philip Guenther <address@hidden> writes:
>
> > # Require that the .tab.h file(s) exist before any .o files are built
> > %.o: | ${YACC_FILES:.y=.tab.h}
>
> FYI, this does not have any effect in GNU make.
Oops, right. You'll need to actually list the .o files for the
directory there, as you can't use a pattern rule to just add to the
dependency lists for a set of files.
In the actual set of makefiles where I use an order-only dependency
with .tab.h files it looks something like this:
GEN_H_SRC += ${YACC_FILES:.y=.tab.h}
OBJ += ${YACC_FILES:.y=.tab.o}
# ...more stuff that may add to GEN_H_SRC and OBJ
${OBJ}: | ${GEN_H_SRC}
Thank you to Boris for catching that error in my example.
Philip Guenther