* Re: Is there a "makedepend" equivalent that works with GNAT?
1998-12-16 0:00 Is there a "makedepend" equivalent that works with GNAT? Michael Bates
@ 1998-12-16 0:00 ` David C. Hoos
1998-12-17 0:00 ` Michael Bates
1998-12-16 0:00 ` Simon Wright
1998-12-19 0:00 ` maegaard
2 siblings, 1 reply; 6+ messages in thread
From: David C. Hoos @ 1998-12-16 0:00 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Is there a "makedepend" equivalent that works with GNAT?
@ 1998-12-16 0:00 Michael Bates
1998-12-16 0:00 ` David C. Hoos
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Michael Bates @ 1998-12-16 0:00 UTC (permalink / raw)
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?
Thanks,
Mike Bates
FlightSafety Simulation
Broken Arrow, OK
mikeb@ssd.fsi.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is there a "makedepend" equivalent that works with GNAT?
1998-12-16 0:00 Is there a "makedepend" equivalent that works with GNAT? Michael Bates
1998-12-16 0:00 ` David C. Hoos
@ 1998-12-16 0:00 ` Simon Wright
1998-12-19 0:00 ` maegaard
2 siblings, 0 replies; 6+ messages in thread
From: Simon Wright @ 1998-12-16 0:00 UTC (permalink / raw)
Michael Bates <mbates@ionet.net> writes:
> 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.
gnatmake -M perhaps? for 3.10p,
-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 -q 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is there a "makedepend" equivalent that works with GNAT?
1998-12-16 0:00 ` David C. Hoos
@ 1998-12-17 0:00 ` Michael Bates
1998-12-18 0:00 ` Stephen Leake
0 siblings, 1 reply; 6+ messages in thread
From: Michael Bates @ 1998-12-17 0:00 UTC (permalink / raw)
David C. Hoos wrote:
>
> 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?
Yes -- I should have mentioned that in my initial message -- and it
won't
work for two reasons:
1. I need to know the dependencies so that I can make the library
-- specifically so that I can check spec and subunit files out of
RCS when they are needed to compile a body.
2. The main procedure of the program I'm building is not written in
Ada. The Ada I'm compiling is a library of modules to be called from
legacy software. gnatmake -M won't work unless you have a main program.
So the question remains: Is there something that does for GNAT what
makedepend does for C?
Thanks,
Mike Bates
FlightSafety Simulation
Broken Arrow, OK
mikeb@ssd.fsi.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is there a "makedepend" equivalent that works with GNAT?
1998-12-17 0:00 ` Michael Bates
@ 1998-12-18 0:00 ` Stephen Leake
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Leake @ 1998-12-18 0:00 UTC (permalink / raw)
Michael Bates <mikeb@ssd.fsi.com> writes:
> > Have you tried gnatmake -M <main-unit-name> on an up-to-date library?
>
> Yes -- I should have mentioned that in my initial message -- and it
> won't
> work for two reasons:
>
> 1. I need to know the dependencies so that I can make the library
> -- specifically so that I can check spec and subunit files out of
> RCS when they are needed to compile a body.
So use gnatmake to build the library once, run gnatmake -M, and save
the results.
> 2. The main procedure of the program I'm building is not written in
> Ada. The Ada I'm compiling is a library of modules to be called from
> legacy software. gnatmake -M won't work unless you have a main program.
Write a dummy main to force gnatmake to do what you need, then
manually delete it from the final makefile. You could probably
automate this process in your favorite scripting language.
> So the question remains: Is there something that does for GNAT what
> makedepend does for C?
It might be possible to modify gnatmake to not require a main; try
reading the sources. It clearly does most of what you need!
-- Stephe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is there a "makedepend" equivalent that works with GNAT?
1998-12-16 0:00 Is there a "makedepend" equivalent that works with GNAT? Michael Bates
1998-12-16 0:00 ` David C. Hoos
1998-12-16 0:00 ` Simon Wright
@ 1998-12-19 0:00 ` maegaard
2 siblings, 0 replies; 6+ messages in thread
From: maegaard @ 1998-12-19 0:00 UTC (permalink / raw)
In article <3677F5DF.4D8F@ssd.fsi.com>,
mbates@ionet.net wrote:
> 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.
>
> So my question is: Does anyone have a script or program to generate
> such dependency rules?
You might want to take a look at Adamakegen at
http://www.ics.uci.edu/~softtest/adamakegen.html
I previously used it on a project where the build-in make facility of the Oden
Ada83 compiler did not fully meet our needs.
It is provided tailored for the VADS/SunAda but I don't recall it as major
work to target it for the Oden compiler. Whether it is suitable for an Ada95
compiler like Gnat, you will have to discover yourself.
Christian Maegaard
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1998-12-19 0:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-16 0:00 Is there a "makedepend" equivalent that works with GNAT? Michael Bates
1998-12-16 0:00 ` David C. Hoos
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox