|From:||Williams, James P|
|Subject:||"Advanced Auto-Dependency Generation" and lex/yacc (again)|
|Date:||Thu, 26 Jan 2006 09:21:21 -0600|
I'm trying to implement automatic dependency generation using the excellent idea posted here.
The following email seems to describe the problem I'm having.
In my case, however, I'm trying to implement this in a general way that can be #included by Makefiles from many different applications. Also, files other than lex.c files can #include yacc.h. So the dependency graph could look like this.
prog.exe: goo.o lex.o yacc.o
goo.o: goo.c yacc.h
lex.o: lex.c yacc.h
yacc.c yacc.h: yacc.y
And just because there's a lex.l doesn't mean there's an associated yacc.y.
How can I teach make these dependencies in a general way without having to write them by hand, using "Advanced Auto-Dependencies"? I don't see a way to detect the goo.o/yacc.h dependency because it requires that yacc be run first. I'm coming to the conclusion that I must return to automatically building the dependency files using implicit rules, i.e., "Basic Auto-Dependencies" (see first link above), with all of the problems that introduces. Is that really the best way to do this?
|[Prev in Thread]||Current Thread||[Next in Thread]|