delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/05/07:33:57

Date: Wed, 5 Mar 1997 07:24:05 -0500
Message-Id: <199703051224.HAA27696@delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019