This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/rfc] Generate makefile dependencies
Andrew Cagney wrote:
So what about using the output of gcc -MM (or one of the other -M
>options?) to generate dependencies in the source directory, like BFD
>does?
How is embedding this stuff in the source directory better?
Because it doesn't need to rely on assumptions about the GDB coding
style, and it doesn't require parsing all the source files when we
configure?
Er, that's a postive - the dependency list is guarenteed to always match
the shipped source.
Might be too big a step, depending on how expensive it is.
I think this has been experimented with before, and was abandoned
because there are a lot of header files on which -everything- depends.
If the makefile dependencies are -too- correct, then touching any
of those files causes everything to rebuild. Sometimes you want
that -- but sometimes you don't.
Can I suggest maybe having a separate make target for
generating the dependencies? And maybe a second one for
reverting them? Then you could choose when to do it.
It's like regenerating configure; we try not to run
autoconf during the build process, and not just because autoconf is so
finicky.
Andrew