Mail Archives: djgpp/1997/03/05/07:33:57
> > --- 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.
- Raw text -