From: "Björn Lundin" <b.f.lundin@gmail.com>
Subject: Re: Suggestion about best practice with .gpr files
Date: Fri, 4 Jun 2021 09:48:03 +0200 [thread overview]
Message-ID: <s9clrk$tdq$1@dont-email.me> (raw)
In-Reply-To: <s94ut2$s16$1@dont-email.me>
Den 2021-06-01 kl. 11:33, skrev Jeffrey R. Carter:
> The compiler knows the dependencies among the units that make up a
> project, and every compiler I've used has the ability to do a build,
> recompiling units that need it, so there is no need for an additional
> tool to do this, as there is with C.
I can tell that you never used Alsys Ada on Aix then.
It would tell you if a file was obsolete - which it became by
* changing it
* compile its spec (if it was a body)
* compile a spec which it directly or indirectly is dependent on
so - just by compiling some spec, you would obsolete another body.
And there was no such thing as recompilation.
So the whole system was built with korn-shell files stating
ada compile file_a_spec.ada
ada compile file_b_spec.ada
ada compile file_c_spec.ada
ada compile file_a_body.ada
ada compile file_b_body.ada
ada compile file_c_body.ada
and if file_a_spec.ada later on did a 'with' on file_b_spec.ada
you would need to change that korn-shell script to read
ada compile file_b_spec.ada
ada compile file_a_spec.ada
ada compile file_c_spec.ada
...
instead
For windows we had Object Ada (7.?)
It would recompile all file if they belonged to the same object libraray.
We have a hierchal structrure so we can compile code (common utilities)
into a root object librery, and application specific code to children of
that root
if you did changed in application layer, it would recompile changes in
that layer - but not in the root layer.
So - we had to have corresponding bat files stating
ada compile file_a_spec.ada
....
So migrating to Gnat was a great relief.
We did use the -i switch of gnatmake and 2000 lines of tcl-glue code
to get the object files where we wanted them; to krep the hierchal
structure. Worked very well for 15 years, then project files were
good enough to support all our requirements.
We now have basically just a bash-script calling on gprbuild with 15-20
gprfiles. much simpler.
And the syntax for setting switches is great
we support
AIX 5,6,7
Win 2003,2008,20012,2016,2019 32/64 bit
Linux debain/ubuntu/redhat/centos on intel64 and arm64
and some playing around with
Freeebsd/macp-pc32/mac-intel64
on that we support Oracle/Postgressql/MS-sql-server
And 3 different ways of doing IPC (pipes/sem+shared mem/rabbitMQ)
and 15-20 different flavours of gnat (mostly pro, but also GPL and FSF
on some platforms)
Sofar we only deliver on gnat pro, but I test with GPL and FSF as well.
So - the scenario handling of gpr file is just great,
the above will give you quite some combinations.
and some code cannot be compiled on all platforms,
like big-endian/little-endian record layouts.
Controlling source-file directories via gpr is much easier than anything
we had before.
So - yes if you have small projects - fine you don't need project files.
if you have millions of lines of code - then you tend to like them.
--
Björn
next prev parent reply other threads:[~2021-06-04 7:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-30 17:37 Suggestion about best practice with .gpr files mockturtle
2021-05-30 17:46 ` Stephen Leake
2021-05-30 19:31 ` Simon Wright
2021-05-30 17:56 ` Dmitry A. Kazakov
2021-05-30 20:22 ` Jeffrey R. Carter
2021-05-31 7:42 ` AdaMagica
2021-05-31 16:59 ` Stephen Leake
2021-06-01 9:33 ` Jeffrey R. Carter
2021-06-04 7:48 ` Björn Lundin [this message]
2021-06-04 8:14 ` Dmitry A. Kazakov
2021-06-04 9:18 ` Jeffrey R. Carter
2021-06-04 9:47 ` Björn Lundin
2021-06-04 12:52 ` Simon Wright
2021-06-04 14:53 ` Björn Lundin
2021-06-01 14:38 ` Shark8
2021-05-31 15:02 ` Maxim Reznik
2021-05-31 17:07 ` Stephen Leake
2021-05-31 20:14 ` Per Sandberg
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox