Date: Wed, 5 Mar 1997 07:24:05 -0500 Message-Id: <199703051224.HAA27696@delorie.com> From: DJ Delorie To: V DOT O DOT Myskin AT inp DOT nsk DOT su CC: djgpp AT delorie DOT com In-reply-to: <149344140@csd.inp.nsk.su> (V.O.Myskin@inp.nsk.su) Subject: Re: Another makefile question > > --- makefile --- > > all : depend main.exe > > > > depend : *.c *.cc *.h > > gcc -E -MD -o NUL *.c *.cc > > If I understand right, this makefile will cause recreation of *all* .d files > *every* time you run make, even if none of the sources has changed, because > there is no way to see that the 'depend' target is up-to-date (it doesn't > exist). Correct. For a more efficient way to check and generate dependencies, look at the djgpp libc makefiles - they use the -M family of options to check and generate dependencies on the fly, as files are compiled.