This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

dmake, GNU make, gcc, and auto-dependencies


Hi there,

I'm trying to get auto dependencies working amongst gnu make (V3.76 or
so), dmake (4) and gcc (ver?). The gnu make manual (at www.gnu.org)
suggests creating a pattern rule that will create a .d makefile
(containing dependencies for that file) for each source file, & then
"including" that .d file into the main makefile before the source is
built.

Question: How does one stop 'make' from including the .d files if
they're not built yet? For a small 1 file test project (could it be
smaller?), I include the .d file, but its either an old one, or isn't
even built yet.

Another question: The gcc manpage states that the -MD switch will
generate the corresponding .d file, *and* compile the source file. In
doing so, does the contents of the .d file not affect the compilation
of the source file? If not, does that not put the auto-generation of
the dependency rule one step behind in the compilation process? ie.
Shouldn't the generation of the .d file be done in one step, for
subsequent use by make in determining whether to compile the source?

Thanks for any help,

sTu.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]