From mboxrd@z Thu Jan 1 00:00:00 1970 From: stus@deimus.com.au (Stuart Summerville) To: help-gcc@gnu.org Subject: dmake, GNU make, gcc, and auto-dependencies Date: Mon, 06 Dec 1999 04:43:00 -0000 Message-id: <384ba7f4.91964227@vic.nnrp.telstra.net> X-SW-Source: 1999-12/msg00074.html 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: stus@deimus.com.au (Stuart Summerville) To: help-gcc@gnu.org Subject: dmake, GNU make, gcc, and auto-dependencies Date: Fri, 31 Dec 1999 22:24:00 -0000 Message-ID: <384ba7f4.91964227@vic.nnrp.telstra.net> X-SW-Source: 1999-12n/msg00074.html Message-ID: <19991231222400.gw_8A3sV8fGya3xOp8hx2mwTz1yZaVwN5pIm9gwyqgg@z> 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.