delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/19/15:00:21

Message-ID: <3B2F9AF2.2F342792@cyberoptics.com>
From: Eric Rudd <rudd AT cyberoptics DOT com>
Organization: CyberOptics
X-Mailer: Mozilla 4.72 [en] (Win95; U)
X-Accept-Language: en,pdf
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: make and autodependency thing
References: <3B2ED16B DOT ADE81A9B AT galacticasoftware DOT com> <9gnme8$7mb$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
Lines: 34
Date: Tue, 19 Jun 2001 13:33:22 -0500
NNTP-Posting-Host: 38.196.93.9
X-Trace: client 992975605 38.196.93.9 (Tue, 19 Jun 2001 14:33:25 EDT)
NNTP-Posting-Date: Tue, 19 Jun 2001 14:33:25 EDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hans-Bernhard Broeker wrote:

> > Under borland there is the .autodepend statement in a Makefile but does
> > such a thing exist under DJGPP?
>
>         info gcc invoking preprocessor
>
> (the '-M' family of options).

I use the Borland make program as well as GNU make, and I have found valuable
things that each program does that the other doesn't, so I keep them both
around.

In the Borland make, the .autodepend statement causes the make program to
examine #include statements to figure out dependencies in C programs
automatically, even if there are recursive #includes.  It also digs into .LIB
library file headers for information about the dates of library members (as
opposed to the date of the .LIB file itself).  This works only for Intel OMF
libraries, as far as I know, so the .autodepend feature can't be used with
Unix-style archives such as are used in DJGPP compilations.  I found the
.autodepend statement a lot more convenient than using -M during compilation
and having a bunch of extra files to include, and wish GNU make had something
comparable.

On the other hand, GNU make allows one to say

%.exe: %.c

which allows generic targets to be compiled with a single make file, which
Borland can't do.

-Eric Rudd
rudd AT cyberoptics DOT com

- Raw text -


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