comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos" <david.c.hoos.sr@ada95.com>
Subject: Re: Is there a "makedepend" equivalent that works with GNAT?
Date: 1998/12/16
Date: 1998-12-16T00:00:00+00:00	[thread overview]
Message-ID: <759gj9$rma@hobbes.crc.com> (raw)
In-Reply-To: 3677F5DF.4D8F@ssd.fsi.com


Michael Bates wrote in message <3677F5DF.4D8F@ssd.fsi.com>...
>Using GNAT 3.11b on SGI IRIX 6.5:
>
>Because I need to integrate Ada compilation into an existing system
>of makefiles which we use to compile C and Fortran source, I need
>something like "makedepend" to generate dependency rules for Ada files
>to match GNAT's compilation model.
>
>Before someone says, "just use gnatmake", let me say that there are
>things I need to be able to do with the source, object, and .ali files
>that gnatmake doesn't know how to do.  For example, I need the makefile
>to be smart enough to try to check a file it needs (e.g., an Ada spec,
>or a subunit) out of RCS if it doesn't see it in the current directory.
>
>So my question is:  Does anyone have a script or program to generate
>such dependency rules?


Have you tried gnatmake -M <main-unit-name> on an up-to-date library?

Here's what the GNAT User's Guide says on the subject:

-M
Check if all objects are up to date. If they are, output the object
dependences to stdout in a form that can be directly exploited in a
`Makefile'. By default, each source file is prefixed with its (relative or
absolute) directory name. This name is whatever you specified in the
various -aI and -I switches. If you use gnatmake -M -q (see below), only the
source file names, without relative paths, are output. If you just specify
the -M switch, dependencies of the GNAT internal system files are omitted.
This is typically what you want. If you also specify the -a switch,
dependencies of the GNAT internal files are also listed. Note that
dependencies of the objects in external Ada libraries (see switch -aLdir in
the following list) are never reported.







  reply	other threads:[~1998-12-16  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-16  0:00 Is there a "makedepend" equivalent that works with GNAT? Michael Bates
1998-12-16  0:00 ` David C. Hoos [this message]
1998-12-17  0:00   ` Michael Bates
1998-12-18  0:00     ` Stephen Leake
1998-12-16  0:00 ` Simon Wright
1998-12-19  0:00 ` maegaard
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox