This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
dmake, GNU make, gcc, and auto-dependencies
- To: help-gcc at gnu dot org
- Subject: dmake, GNU make, gcc, and auto-dependencies
- From: stus at deimus dot com dot au (Stuart Summerville)
- Date: Mon, 06 Dec 1999 12:36:57 GMT
- Newsgroups: gnu.gcc.help,gnu.utils.help
- Organization: Deimus Enterprises
- Reply-To: stus at deimus dot com dot au
- Xref: wodc7nx0 gnu.gcc.help:2085 gnu.utils.help:341
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.