delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/19/10:30:12

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: make and autodependency thing
Date: 19 Jun 2001 14:09:12 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 25
Message-ID: <9gnme8$7mb$1@nets3.rz.RWTH-Aachen.DE>
References: <3B2ED16B DOT ADE81A9B AT galacticasoftware DOT com>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 992959752 7883 137.226.32.75 (19 Jun 2001 14:09:12 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 19 Jun 2001 14:09:12 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Adam Majer <adamm AT galacticasoftware DOT com> wrote:

> Does anyone know how to make "make" understand that a new version of
> file.o is already there (ie. time is earlier than file.c, for ex) and
> not to invoke the rule to compile it again, and again, and again....

Two choices: get your own hands out of make's way, and let it do what
it knows best, unhindered. Or explicity tell it what to do --- but
that means you take responsibility for what you wrote into the Makefile.

> Under borland there is the .autodepend statement in a Makefile but does
> such a thing exist under DJGPP?

Yes, but it's a bit more complicated than that. You have to tell GCC
to create dependency information files as a byproduct or in a separate
run, and then you have to tell Make to go look for them and .include
them into the Makefile, as they become available. The tricks needed
are described in the GCC manual:

	info gcc invoking preprocessor

(the '-M' family of options).
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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