www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/01/04:30:39

Date: Tue, 1 Sep 1998 11:29:42 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Jesús Martín Oya <jmo AT gsi DOT dit DOT upm DOT es>
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: <Pine.SUN.3.91.980901112916.26794E-100000@is>
MIME-Version: 1.0

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.

- Raw text -


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