On 1/30/06, Boris Kolpackov <[EMAIL PROTECTED]> wrote:
> Philip Guenther <[EMAIL PROTECTED]> 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


_______________________________________________
Help-make mailing list
Help-make@gnu.org
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to