Date: Tue, 1 Sep 1998 11:29:42 +0300 (IDT) From: Eli Zaretskii To: Jesús Martín Oya cc: djgpp AT delorie DOT com, oya AT tid DOT es Subject: Re: Problems with .d files In-Reply-To: <35EAC306.9C8B932C@gsi.dit.upm.es> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 8bit Precedence: bulk On Mon, 31 Aug 1998, Jesús Martín Oya wrote: > MAKEDEPEND = gcc -MM -MG $(EXTRAINCLUDES) -I$(ARIESINC) [snip] > $(ODIR)/%.d: $(SDIR)/%.c > -@if [ ! -d $(ODIR) ]; then mkdir -p $(ODIR); fi > @$(MAKEDEPEND) $^ | $(FILTER) > $@ Using these rules, when $MAKEDEPEND is run, GCC doesn't know that the object file will be in $ODIR, since you don't tell that. You only tell GCC to do that in the compilation command line, by rules like this: > $(ODIR)/%.o: $(SDIR)/%.c > $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ But this rule isn't used by $MAKEDEPEND. You need to either change the definition of MAKEDEPEND, or add some more magic to your Sed filter.