Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

You are false data.


devel / comp.lang.ada / Suggestion about best practice with .gpr files

SubjectAuthor
* Suggestion about best practice with .gpr filesmockturtle
+* Re: Suggestion about best practice with .gpr filesStephen Leake
|`- Re: Suggestion about best practice with .gpr filesSimon Wright
+- Re: Suggestion about best practice with .gpr filesDmitry A. Kazakov
+* Re: Suggestion about best practice with .gpr filesJeffrey R. Carter
|+* Re: Suggestion about best practice with .gpr filesAdaMagica
||`* Re: Suggestion about best practice with .gpr filesStephen Leake
|| `* Re: Suggestion about best practice with .gpr filesJeffrey R. Carter
||  `* Re: Suggestion about best practice with .gpr filesBjörn Lundin
||   +- Re: Suggestion about best practice with .gpr filesDmitry A. Kazakov
||   +* Re: Suggestion about best practice with .gpr filesJeffrey R. Carter
||   |`- Re: Suggestion about best practice with .gpr filesBjörn Lundin
||   `* Re: Suggestion about best practice with .gpr filesSimon Wright
||    `- Re: Suggestion about best practice with .gpr filesBjörn Lundin
|`- Re: Suggestion about best practice with .gpr filesShark8
+* Re: Suggestion about best practice with .gpr filesMaxim Reznik
|`- Re: Suggestion about best practice with .gpr filesStephen Leake
`- Re: Suggestion about best practice with .gpr filesPer Sandberg

1
Suggestion about best practice with .gpr files

<f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5239&group=comp.lang.ada#5239

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:570a:: with SMTP id 10mr11673634qtw.360.1622396241812;
Sun, 30 May 2021 10:37:21 -0700 (PDT)
X-Received: by 2002:a25:da8a:: with SMTP id n132mr25847692ybf.504.1622396241581;
Sun, 30 May 2021 10:37:21 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sun, 30 May 2021 10:37:21 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=93.41.2.250; posting-account=9fwclgkAAAD6oQ5usUYhee1l39geVY99
NNTP-Posting-Host: 93.41.2.250
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
Subject: Suggestion about best practice with .gpr files
From: framefri...@gmail.com (mockturtle)
Injection-Date: Sun, 30 May 2021 17:37:21 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: mockturtle - Sun, 30 May 2021 17:37 UTC

Dear.all,
I have a problem that I solved in a fairly acceptable way, but I would like to hear from you if there are some kind of "better practices" that I could use.

The problem is this: sometimes, while writing some software, I develop some packages that could be used elsewhere, so I "extract" them in a library of their own with their own project file that is "with-ed" inside the project file of the larger software.

When I "isolate" the package into its own library, I like also to add some testing code. The problem is that if I declare the project to be a library project (which is just natural) I cannot have an executable.

In the past, I solved this problem by declaring the project to be a non-library one; nowadays I declare it to be a library project and then add a folder test/ with its src/ folder with the test programs and a specific project file that "with-s" the library project.

Let me try drawing a picture relative to a library "foo"

foolib/
....|
....+-- foolib.gpr
....+-- src/
....+-- obj/
....+-- test/
...........|
...........+--foolib_test.gpr
...........+--obj/
...........+--src/
.................|
................+-- foo_test_1.adb
................+-- foo_test_2.adb
................+-- foo_test_3.adb

I hope you got the idea.

Do you have any suggestion about a different organization? Do there exist some kind of "best practice" for this?

Thank you in advance for your help

Riccardo

Re: Suggestion about best practice with .gpr files

<86a6oci076.fsf@stephe-leake.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5240&group=comp.lang.ada#5240

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!pBWEO6hi52oGFheO/GY5ag.user.gioia.aioe.org.POSTED!not-for-mail
From: stephen_...@stephe-leake.org (Stephen Leake)
Newsgroups: comp.lang.ada
Subject: Re: Suggestion about best practice with .gpr files
Date: Sun, 30 May 2021 10:46:37 -0700
Organization: Aioe.org NNTP Server
Lines: 30
Message-ID: <86a6oci076.fsf@stephe-leake.org>
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
NNTP-Posting-Host: pBWEO6hi52oGFheO/GY5ag.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: abuse@aioe.org
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:Za9mT77isszV5mOW66OkJOJeA4g=
 by: Stephen Leake - Sun, 30 May 2021 17:46 UTC

mockturtle <framefritti@gmail.com> writes:

> foolib/
> ...|
> ...+-- foolib.gpr
> ...+-- src/
> ...+-- obj/
> ...+-- test/
> ..........|
> ..........+--foolib_test.gpr
> ..........+--obj/
> ..........+--src/
> ................|
> ...............+-- foo_test_1.adb
> ...............+-- foo_test_2.adb
> ...............+-- foo_test_3.adb
>
> I hope you got the idea.

I do something similar; I put both foolib_test.gpr and foolib.gpr in a
build directory with a Makefile, and they share an obj directory.

> Do you have any suggestion about a different organization? Do there
> exist some kind of "best practice" for this?

Certainly hiding the test code from the client is essential; other than
that I don't think it matters much.

--
-- Stephe

Re: Suggestion about best practice with .gpr files

<s90jkq$om9$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5241&group=comp.lang.ada#5241

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Suggestion about best practice with .gpr files
Date: Sun, 30 May 2021 19:56:44 +0200
Organization: Aioe.org NNTP Server
Lines: 30
Message-ID: <s90jkq$om9$1@gioia.aioe.org>
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
NNTP-Posting-Host: 5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.10.2
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Dmitry A. Kazakov - Sun, 30 May 2021 17:56 UTC

On 2021-05-30 19:37, mockturtle wrote:

> Let me try drawing a picture relative to a library "foo"
>
> foolib/
> ...|
> ...+-- foolib.gpr
> ...+-- src/
> ...+-- obj/
> ...+-- test/
> ..........|
> ..........+--foolib_test.gpr
> ..........+--obj/
> ..........+--src/
> ................|
> ...............+-- foo_test_1.adb
> ...............+-- foo_test_2.adb
> ...............+-- foo_test_3.adb
>
> I hope you got the idea.
>
> Do you have any suggestion about a different organization? Do there exist some kind of "best practice" for this?

I do just same, except for the src subdirectories. I put sources in the
corresponding root where the *.gpr is.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Suggestion about best practice with .gpr files

<ly1r9o10ir.fsf@pushface.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5243&group=comp.lang.ada#5243

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!aioe.org!yy9MKEJN2ULhWGfnfq4v5w.user.gioia.aioe.org.POSTED!not-for-mail
From: sim...@pushface.org (Simon Wright)
Newsgroups: comp.lang.ada
Subject: Re: Suggestion about best practice with .gpr files
Date: Sun, 30 May 2021 20:31:40 +0100
Organization: Aioe.org NNTP Server
Lines: 9
Message-ID: <ly1r9o10ir.fsf@pushface.org>
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
<86a6oci076.fsf@stephe-leake.org>
NNTP-Posting-Host: yy9MKEJN2ULhWGfnfq4v5w.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: abuse@aioe.org
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:MRs8/SneSxTKJW9LcAlu2X/FGJc=
 by: Simon Wright - Sun, 30 May 2021 19:31 UTC

Stephen Leake <stephen_leake@stephe-leake.org> writes:

> I do something similar; I put both foolib_test.gpr and foolib.gpr in a
> build directory with a Makefile, and they share an obj directory.

ISTR that it was forbidden for GPRs to share an object directory?

You're not alone in sharing them, GNAT-LLVM does the same. Personally I
do as OP does.

Re: Suggestion about best practice with .gpr files

<s90s5l$b3d$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5244&group=comp.lang.ada#5244

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.not.acm.org (Jeffrey R. Carter)
Newsgroups: comp.lang.ada
Subject: Re: Suggestion about best practice with .gpr files
Date: Sun, 30 May 2021 22:22:13 +0200
Organization: Also freenews.netfront.net; news.tornevall.net;
news.eternal-september.org
Lines: 15
Message-ID: <s90s5l$b3d$1@dont-email.me>
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 30 May 2021 20:22:13 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8b247beaf147f171cf06542a056cc93f";
logging-data="11373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FTEMlmzlA7ZFxQGQxaN3t8za3RK6d/6s="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.8.1
Cancel-Lock: sha1:8Cm192S01Cji7omJNiu82A7iHl0=
In-Reply-To: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
Content-Language: en-US
 by: Jeffrey R. Carter - Sun, 30 May 2021 20:22 UTC

On 5/30/21 7:37 PM, mockturtle wrote:
>
> Do there exist some kind of "best practice" for this?

The best practice is not to use project files. When everything is is Ada, they
only add unnecessary and non-portable complexity. Unnecessary complexity is a
sign of incompetence.

The same is true of build directory structures.

--
Jeff Carter
"It's all right, Taggart. Just a man and a horse being hung out there."
Blazing Saddles
34

Re: Suggestion about best practice with .gpr files

<c5a4504a-d3dd-4809-97de-a08f01af2b08n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5246&group=comp.lang.ada#5246

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:2ec:: with SMTP id a12mr14635806qko.92.1622446924537;
Mon, 31 May 2021 00:42:04 -0700 (PDT)
X-Received: by 2002:a25:6d02:: with SMTP id i2mr29592190ybc.309.1622446924345;
Mon, 31 May 2021 00:42:04 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Mon, 31 May 2021 00:42:04 -0700 (PDT)
In-Reply-To: <s90s5l$b3d$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=94.31.98.170; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf
NNTP-Posting-Host: 94.31.98.170
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com> <s90s5l$b3d$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c5a4504a-d3dd-4809-97de-a08f01af2b08n@googlegroups.com>
Subject: Re: Suggestion about best practice with .gpr files
From: christ-u...@t-online.de (AdaMagica)
Injection-Date: Mon, 31 May 2021 07:42:04 +0000
Content-Type: text/plain; charset="UTF-8"
 by: AdaMagica - Mon, 31 May 2021 07:42 UTC

Jeffrey R. Carter schrieb am Sonntag, 30. Mai 2021 um 22:22:16 UTC+2:
> The best practice is not to use project files.
That's a bit extreme. I remember that APEX and ObjAda both had their own ways to define their library structures for source and object files. And so has GNAT.
I don't think that there is a universal way.
> When everything is is Ada, they
> only add unnecessary and non-portable complexity. Unnecessary complexity is a
> sign of incompetence.
>
> The same is true of build directory structures.

Re: Suggestion about best practice with .gpr files

<966aa783-a803-46ea-bdac-3092bc8ad418n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5248&group=comp.lang.ada#5248

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a0c:c3d1:: with SMTP id p17mr17378049qvi.44.1622473324971; Mon, 31 May 2021 08:02:04 -0700 (PDT)
X-Received: by 2002:a25:fc1c:: with SMTP id v28mr31729308ybd.277.1622473324368; Mon, 31 May 2021 08:02:04 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Mon, 31 May 2021 08:02:04 -0700 (PDT)
In-Reply-To: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a03:7380:380d:3b:71c8:7ef7:9378:7f50; posting-account=K1cP1QoAAAD_GR6kW2Td0NqGqGBLRE8h
NNTP-Posting-Host: 2a03:7380:380d:3b:71c8:7ef7:9378:7f50
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <966aa783-a803-46ea-bdac-3092bc8ad418n@googlegroups.com>
Subject: Re: Suggestion about best practice with .gpr files
From: rezni...@gmail.com (Maxim Reznik)
Injection-Date: Mon, 31 May 2021 15:02:04 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 27
 by: Maxim Reznik - Mon, 31 May 2021 15:02 UTC

We use a dedicated folder `gnat/` to keep project files there. This has several a advantages:

* you doesn't pollute the root directory with extra files (as you see you need at least two project file - for library and for tests)
* a user is able to observe all project files in one place and pick up needed one
* if you tend to use the repo as mono-repo (or if you split the library into two), you will get much more project files (see Matreshka or VSS). So keep them in order is important
* people who don't use project files don't see them :D

The layout becomes

foolib/
....|
....+-- Makefile
....+--alire.toml
....+-- docs
....+-- gnat
....|
.......+-- foo.gpr
.......+-- foo_tests.gpr
....+-- source
....+-- testsuite

To simplify a new repository creation I made a template repo and keep common files there. Take a look, perhaps you find something useful there.

https://github.com/reznikmm/matreshka
https://github.com/AdaCore/VSS
https://github.com/reznikmm/template

Best regards,

Re: Suggestion about best practice with .gpr files

<861r9met5p.fsf@stephe-leake.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5250&group=comp.lang.ada#5250

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!pBWEO6hi52oGFheO/GY5ag.user.gioia.aioe.org.POSTED!not-for-mail
From: stephen_...@stephe-leake.org (Stephen Leake)
Newsgroups: comp.lang.ada
Subject: Re: Suggestion about best practice with .gpr files
Date: Mon, 31 May 2021 09:59:14 -0700
Organization: Aioe.org NNTP Server
Lines: 72
Message-ID: <861r9met5p.fsf@stephe-leake.org>
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
<s90s5l$b3d$1@dont-email.me>
<c5a4504a-d3dd-4809-97de-a08f01af2b08n@googlegroups.com>
NNTP-Posting-Host: pBWEO6hi52oGFheO/GY5ag.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: abuse@aioe.org
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt)
Cancel-Lock: sha1:zhF66GmPzcOzQZMS0G/A/4dPPqs=
X-Notice: Filtered by postfilter v. 0.9.2
 by: Stephen Leake - Mon, 31 May 2021 16:59 UTC

AdaMagica <christ-usch.grein@t-online.de> writes:

> Jeffrey R. Carter schrieb am Sonntag, 30. Mai 2021 um 22:22:16 UTC+2:
>> The best practice is not to use project files.

> That's a bit extreme. I remember that APEX and ObjAda both had their
> own ways to define their library structures for source and object
> files. And so has GNAT.

If you don't define the source and object paths in the .gpr file, you
have to define them somewhere else; not using a .gpr file does not
eliminate that complexity, it just moves it elsewhere.

You also need a place to put compiler and linker options

Using environment variables to control what a .gpr file does, for
example release vs debug, is more complex. But in a real development
environment, those are needed also.

> I don't think that there is a universal way.

Right; porting code to another compiler/build system is often not
trivial.

>> When everything is is Ada, they
>> only add unnecessary and non-portable complexity.

Examples, please? I don't think any of the complexity in my .gpr files
is unnecessary. I agree it complicates porting to another compiler/build
system.

>> Unnecessary complexity is a sign of incompetence.

This I agree with.

>> The same is true of build directory structures.

I have some sympathy for this; my directory trees are quite flat, but
not absolutely flat. The Java directory convention is just horrible.

I suppose if _all_ files are in one directory, that eliminates the need
for source and object paths.

But then every file must have a unique name. GNAT already requires the
package name in the file name (by default), so that's not too bad for
most Ada code, _if_ each project uses a unique root package (which is
recommended practice).

But I find it convenient to use "test_all_harness.adb" as the file name
of the main test driver for all projects; the directory determines which
project it is for, and Emacs knows what the current project is, so it
knows how to find the right "test_all_harness.adb". Similarly for
Makefile, rules.make, notes.text, etc.

Hmm. Relaxing that to "all files for one project should be in one
directory" might work well. I do have some small projects that are
structured that way. except the object dir is still separate, for
simplicity in the version control ignore file. And there are still
dependent projects, so that still requires a source or project path. And
keeping the test files separate from the main project source helps when
using tools like grep.

I also sometimes have a "devel" directory and gpr file; it contains test
utilities for client packages to use. For example, wisitoken.ads defines
several types, and wisitoken-aunit.ads defines "Check" procedures for
those types. ada-mode uses wisitoken, so an ada-mode test probably needs
wisitoken-aunit.ads, but not the wisitoken tests. So ada_mode_test.gpr
withs wisitoken_devel.gpr, which includes wisitoken/devel, but not
wisitoken/test.

--
-- Stephe

Re: Suggestion about best practice with .gpr files

<86wnrede7g.fsf@stephe-leake.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5251&group=comp.lang.ada#5251

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!news.niel.me!aioe.org!pBWEO6hi52oGFheO/GY5ag.user.gioia.aioe.org.POSTED!not-for-mail
From: stephen_...@stephe-leake.org (Stephen Leake)
Newsgroups: comp.lang.ada
Subject: Re: Suggestion about best practice with .gpr files
Date: Mon, 31 May 2021 10:07:31 -0700
Organization: Aioe.org NNTP Server
Lines: 32
Message-ID: <86wnrede7g.fsf@stephe-leake.org>
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
<966aa783-a803-46ea-bdac-3092bc8ad418n@googlegroups.com>
NNTP-Posting-Host: pBWEO6hi52oGFheO/GY5ag.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: abuse@aioe.org
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:VID/44uPJ2Jz/Es/KPRTt9zAhpw=
 by: Stephen Leake - Mon, 31 May 2021 17:07 UTC

Maxim Reznik <reznikmm@gmail.com> writes:

> foolib/
> ...|
> ...+-- Makefile
> ...+--alire.toml
> ...+-- docs
> ...+-- gnat
> ...|
> ......+-- foo.gpr
> ......+-- foo_tests.gpr
> ...+-- source
> ...+-- testsuite

I used to maintain a project that was compiled with gnat for general
development and initial testing, and ObjectAda for final testing and
release. So there was an "object_ada" directory parallel to the "gnat"
directory. But I also found that the Makefiles differed enough that they
were in those directories as well; shared rules are in a "rules.make"
file.

Similar issues arise when maintaining distribution files for several OS
versions.

And "docs" are source, just in a different language. Why are they in a
separate directory?

If you are grepping for all occurences of variable "foo", you want to
search the .texi and .ad[sb] files at the same time.

--
-- Stephe

Re: Suggestion about best practice with .gpr files

<VsbtI.3946$ea3.1814@fx10.ams1>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5255&group=comp.lang.ada#5255

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!fx10.ams1.POSTED!not-for-mail
Subject: Re: Suggestion about best practice with .gpr files
Newsgroups: comp.lang.ada
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
From: per.s.sa...@bahnhof.se (Per Sandberg)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.10.1
MIME-Version: 1.0
In-Reply-To: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 67
Message-ID: <VsbtI.3946$ea3.1814@fx10.ams1>
X-Complaints-To: abuse@usenet.se
NNTP-Posting-Date: Mon, 31 May 2021 20:14:45 UTC
Organization: usenet.se
Date: Mon, 31 May 2021 22:14:44 +0200
X-Received-Bytes: 3159
 by: Per Sandberg - Mon, 31 May 2021 20:14 UTC

Well that's the way I have been doing it for 20+ years with some small
twists.
GPR_PROJECT_PATH points here:
!foolib/
!...|
!...+-- foolib.gpr
!...+-- src/
!........|foolib.ads
!...+-- lib/
!...+-- .obj/
!...+-- test/
!..........|
!..........+--foolib-test.gpr
!..........+-- .obj/
!..........+-- bin/
!..........+-- src/
!................|
!...............+-- foolib-tests-test_1.adb
!...............+-- foolib-tests-test_2.adb
!...............+-- foolib-tests-test_3.adb
!foxlib/
!application1/
!application2/

Then the experience i quite similar to what you get with an "eclipse
workspace".
But with the capability to a lot of other structural exercises, such as
having a baseline ReadOnly workspace and then using GPR_PROJECT_PATH to
point first to a private workspace and then the baseline.

/Persan

On 30/05/2021 19:37, mockturtle wrote:
> Dear.all,
> I have a problem that I solved in a fairly acceptable way, but I would like to hear from you if there are some kind of "better practices" that I could use.
>
> The problem is this: sometimes, while writing some software, I develop some packages that could be used elsewhere, so I "extract" them in a library of their own with their own project file that is "with-ed" inside the project file of the larger software.
>
> When I "isolate" the package into its own library, I like also to add some testing code. The problem is that if I declare the project to be a library project (which is just natural) I cannot have an executable.
>
> In the past, I solved this problem by declaring the project to be a non-library one; nowadays I declare it to be a library project and then add a folder test/ with its src/ folder with the test programs and a specific project file that "with-s" the library project.
>
> Let me try drawing a picture relative to a library "foo"
>
> foolib/
> ...|
> ...+-- foolib.gpr
> ...+-- src/
> ...+-- obj/
> ...+-- test/
> ..........|
> ..........+--foolib_test.gpr
> ..........+--obj/
> ..........+--src/
> ................|
> ...............+-- foo_test_1.adb
> ...............+-- foo_test_2.adb
> ...............+-- foo_test_3.adb
>
> I hope you got the idea.
>
> Do you have any suggestion about a different organization? Do there exist some kind of "best practice" for this?
>
> Thank you in advance for your help
>
> Riccardo
>

Re: Suggestion about best practice with .gpr files

<s94ut2$s16$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5264&group=comp.lang.ada#5264

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.not.acm.org (Jeffrey R. Carter)
Newsgroups: comp.lang.ada
Subject: Re: Suggestion about best practice with .gpr files
Date: Tue, 1 Jun 2021 11:33:21 +0200
Organization: Also freenews.netfront.net; news.tornevall.net;
news.eternal-september.org
Lines: 44
Message-ID: <s94ut2$s16$1@dont-email.me>
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
<s90s5l$b3d$1@dont-email.me>
<c5a4504a-d3dd-4809-97de-a08f01af2b08n@googlegroups.com>
<861r9met5p.fsf@stephe-leake.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 1 Jun 2021 09:33:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="67b3d285d97ee37cb34f4368aa973394";
logging-data="28710"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+IABqayGJfZrHa7NSmgdrTvqvS2FAcILw="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.8.1
Cancel-Lock: sha1:73MCAxM0YvPSJr4+oaM5ItE0T80=
In-Reply-To: <861r9met5p.fsf@stephe-leake.org>
Content-Language: en-US
 by: Jeffrey R. Carter - Tue, 1 Jun 2021 09:33 UTC

On 5/31/21 6:59 PM, Stephen Leake wrote:
> AdaMagica <christ-usch.grein@t-online.de> writes:
>
>> Jeffrey R. Carter schrieb am Sonntag, 30. Mai 2021 um 22:22:16 UTC+2:
>
>>> When everything is is Ada, they
>>> only add unnecessary and non-portable complexity.
>
> Examples, please? I don't think any of the complexity in my .gpr files
> is unnecessary. I agree it complicates porting to another compiler/build
> system.

To develop S/W in Ada, you have to know

* Ada
* the CLI/shell syntax
* the compiler syntax and options

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.

If I have a project Project, it will be in directory Project, which contains the
source code and the compiler artifacts. It will also contain a one-line script
that invokes the compiler to build Project with the desired options.

This works fine and is mostly compiler agnostic. Avoiding the unnecessary
complexity of a build-directory structure is essential to this approach.

Adding an additional tool (gprbuild) with its own syntax (project files) to this
is clearly adding unnecessary complexity.

If Project is a library, and there are more than a few test programs, I will
also have a Test subdirectory for them and their build script(s).

I see no need for a compilation-order tool such as make or grpbuild, since the
compiler already does that. (Gprbuild is supposed to be a better alternative to
make, so using both seems like insanity to me.)

--
Jeff Carter
"Violence is the last refuge of the incompetent."
Foundation
151

Re: Suggestion about best practice with .gpr files

<65a6061f-e16d-4921-a73f-00bc93f272a1n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5270&group=comp.lang.ada#5270

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:668d:: with SMTP id d13mr7614511qtp.178.1622558288970;
Tue, 01 Jun 2021 07:38:08 -0700 (PDT)
X-Received: by 2002:a25:5ec2:: with SMTP id s185mr40894893ybb.303.1622558288727;
Tue, 01 Jun 2021 07:38:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Tue, 1 Jun 2021 07:38:08 -0700 (PDT)
In-Reply-To: <s90s5l$b3d$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=146.5.2.231; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC
NNTP-Posting-Host: 146.5.2.231
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com> <s90s5l$b3d$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <65a6061f-e16d-4921-a73f-00bc93f272a1n@googlegroups.com>
Subject: Re: Suggestion about best practice with .gpr files
From: onewinge...@gmail.com (Shark8)
Injection-Date: Tue, 01 Jun 2021 14:38:08 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Shark8 - Tue, 1 Jun 2021 14:38 UTC

On Sunday, May 30, 2021 at 2:22:16 PM UTC-6, Jeffrey R. Carter wrote:
> On 5/30/21 7:37 PM, mockturtle wrote:
> >
> > Do there exist some kind of "best practice" for this?
> The best practice is not to use project files. When everything is is Ada, they
> only add unnecessary and non-portable complexity. Unnecessary complexity is a
> sign of incompetence.

True; Ada's structuring is such that a project-file is *almost* unnecessary.. I remember reading, when doing some research on build-systems, someone remarking that "build-systems are the consequence of using a language not meant for engineering." -- Given this, the general lack of needing a "build-system" for Ada is a good sign, and a testament to how Ada really *is* meant for Software Engineering.

That said, the place where Ada isn't quite up to the task is configurations, which is primarily what GPR files are used for; I've done some initial work on re-purposing Ada's generics as a "project file". (It could use a restricted set of acceptable parameters and "ASIS-processing" them such that user-inputs could be queried/provided automatically [hence the restriction on formal-parameter types].)

>
> The same is true of build directory structures.

I have come to deeply despise using the file-system as the repository for sources, along with "magic" environment-variables.
There are TONS of advantages that could be had with a database-based system; see: http://users.ece.utexas.edu/~perry/work/papers/icsm87.pdf and https://www.mindprod.com/project/scid.html
Yes, more design-work up-front, but it yields better properties... just like how sorting a collection allows you to have search-functions that are faster than one-at-a-time linear.

Re: Suggestion about best practice with .gpr files

<s9clrk$tdq$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5303&group=comp.lang.ada#5303

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: b.f.lun...@gmail.com (Björn Lundin)
Newsgroups: comp.lang.ada
Subject: Re: Suggestion about best practice with .gpr files
Date: Fri, 4 Jun 2021 09:48:03 +0200
Organization: A noiseless patient Spider
Lines: 92
Message-ID: <s9clrk$tdq$1@dont-email.me>
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
<s90s5l$b3d$1@dont-email.me>
<c5a4504a-d3dd-4809-97de-a08f01af2b08n@googlegroups.com>
<861r9met5p.fsf@stephe-leake.org> <s94ut2$s16$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 4 Jun 2021 07:48:04 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7aa8efa425d76d53ba0326c306e9ed9a";
logging-data="30138"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18pEnMvW2eWaSoo7f5RK9MG"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0)
Gecko/20100101 Thunderbird/78.10.2
Cancel-Lock: sha1:liSp7/TF3yojPej2yw1M7BGAS0A=
In-Reply-To: <s94ut2$s16$1@dont-email.me>
Content-Language: en-US
 by: Björn Lundin - Fri, 4 Jun 2021 07:48 UTC

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

Re: Suggestion about best practice with .gpr files

<s9cne1$1h1q$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5304&group=comp.lang.ada#5304

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Suggestion about best practice with .gpr files
Date: Fri, 4 Jun 2021 10:14:58 +0200
Organization: Aioe.org NNTP Server
Lines: 12
Message-ID: <s9cne1$1h1q$1@gioia.aioe.org>
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
<s90s5l$b3d$1@dont-email.me>
<c5a4504a-d3dd-4809-97de-a08f01af2b08n@googlegroups.com>
<861r9met5p.fsf@stephe-leake.org> <s94ut2$s16$1@dont-email.me>
<s9clrk$tdq$1@dont-email.me>
NNTP-Posting-Host: 5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Dmitry A. Kazakov - Fri, 4 Jun 2021 08:14 UTC

On 2021-06-04 09:48, Björn Lundin wrote:

> 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.

I fully agree. Also when on top of that you have multiple targets. gpr
is really great help.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Suggestion about best practice with .gpr files

<s9cr4j$uc8$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5305&group=comp.lang.ada#5305

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.not.acm.org (Jeffrey R. Carter)
Newsgroups: comp.lang.ada
Subject: Re: Suggestion about best practice with .gpr files
Date: Fri, 4 Jun 2021 11:18:09 +0200
Organization: Also freenews.netfront.net; news.tornevall.net;
news.eternal-september.org
Lines: 28
Message-ID: <s9cr4j$uc8$1@dont-email.me>
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
<s90s5l$b3d$1@dont-email.me>
<c5a4504a-d3dd-4809-97de-a08f01af2b08n@googlegroups.com>
<861r9met5p.fsf@stephe-leake.org> <s94ut2$s16$1@dont-email.me>
<s9clrk$tdq$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 4 Jun 2021 09:18:11 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="799e05eeac4f1faaa7a1924053eff7e0";
logging-data="31112"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lD4KAsNIL3N3g+VLflcLc79Sl3+1VlD0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.8.1
Cancel-Lock: sha1:MqVqhc85Vov9xxt4IIclFnvAzso=
In-Reply-To: <s9clrk$tdq$1@dont-email.me>
Content-Language: en-US
 by: Jeffrey R. Carter - Fri, 4 Jun 2021 09:18 UTC

On 6/4/21 9:48 AM, Björn Lundin wrote:
>
> I can tell that you never used Alsys Ada on Aix then.

It's true I never used Alsys on Aix. My only use of Alsys was to supply some
existing units to test an early version of the PC compiler (which discovered a
compiler error).

I have used a wide variety of compilers in the last 37 years, and all of them
had the ability to automatically build, recompiling obsolete units, without an
extra compilation-order tool.

I have also worked on a number of very large projects, and all of them that were
all-Ada could have been built solely using the compiler and simple shell scripts.

The important qualification in my claim is that the project must be all Ada.
When you decide to include things like

> on that we support Oracle/Postgressql/MS-sql-server
> And 3 different ways of doing IPC (pipes/sem+shared mem/rabbitMQ)

then you add complications that this approach cannot deal with.

--
Jeff Carter
"I soiled my armor, I was so scared."
Monty Python & the Holy Grail
71

Re: Suggestion about best practice with .gpr files

<s9csr2$954$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5306&group=comp.lang.ada#5306

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: b.f.lun...@gmail.com (Björn Lundin)
Newsgroups: comp.lang.ada
Subject: Re: Suggestion about best practice with .gpr files
Date: Fri, 4 Jun 2021 11:47:13 +0200
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <s9csr2$954$1@dont-email.me>
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
<s90s5l$b3d$1@dont-email.me>
<c5a4504a-d3dd-4809-97de-a08f01af2b08n@googlegroups.com>
<861r9met5p.fsf@stephe-leake.org> <s94ut2$s16$1@dont-email.me>
<s9clrk$tdq$1@dont-email.me> <s9cr4j$uc8$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 4 Jun 2021 09:47:14 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7aa8efa425d76d53ba0326c306e9ed9a";
logging-data="9380"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+pINc/waTO9YUQB5zH7UMc"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0)
Gecko/20100101 Thunderbird/78.10.2
Cancel-Lock: sha1:HXg3qevLAEK44NMVdTDkxhVHdzg=
In-Reply-To: <s9cr4j$uc8$1@dont-email.me>
Content-Language: en-US
 by: Björn Lundin - Fri, 4 Jun 2021 09:47 UTC

Den 2021-06-04 kl. 11:18, skrev Jeffrey R. Carter:
> he important qualification in my claim is that the project must be all
> Ada. When you decide to include things like
>
>> on that we support Oracle/Postgressql/MS-sql-server
>> And 3 different ways of doing IPC (pipes/sem+shared mem/rabbitMQ)
>
> then you add complications that this approach cannot deal with.

Well, using a database and IPC mechanisms is not really unheard of in
systems development. Especially not when it is an administrative system,
and not embedded.

--
Björn

Re: Suggestion about best practice with .gpr files

<lyim2taj1s.fsf@pushface.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5309&group=comp.lang.ada#5309

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!yy9MKEJN2ULhWGfnfq4v5w.user.gioia.aioe.org.POSTED!not-for-mail
From: sim...@pushface.org (Simon Wright)
Newsgroups: comp.lang.ada
Subject: Re: Suggestion about best practice with .gpr files
Date: Fri, 04 Jun 2021 13:52:31 +0100
Organization: Aioe.org NNTP Server
Lines: 12
Message-ID: <lyim2taj1s.fsf@pushface.org>
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
<s90s5l$b3d$1@dont-email.me>
<c5a4504a-d3dd-4809-97de-a08f01af2b08n@googlegroups.com>
<861r9met5p.fsf@stephe-leake.org> <s94ut2$s16$1@dont-email.me>
<s9clrk$tdq$1@dont-email.me>
NNTP-Posting-Host: yy9MKEJN2ULhWGfnfq4v5w.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@aioe.org
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:ElSCivjF9w9SHSeenQ4MXuWizXs=
 by: Simon Wright - Fri, 4 Jun 2021 12:52 UTC

Björn Lundin <b.f.lundin@gmail.com> writes:

> So the whole system was built with korn-shell files stating

I once did some work porting a Solaris system to Unix. They had migrated
to GNAT, but compilation was managed using a set of c-shell scripts
whose maintainer (one of the project managers told me) had made them his
life's work.

This would have been about 1999, so I had to use gnatmake, and I'm not
even sure whether project files existed, but it was _such_ an
improvement.

Re: Suggestion about best practice with .gpr files

<s9dep1$7jk$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5310&group=comp.lang.ada#5310

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: b.f.lun...@gmail.com (Björn Lundin)
Newsgroups: comp.lang.ada
Subject: Re: Suggestion about best practice with .gpr files
Date: Fri, 4 Jun 2021 16:53:20 +0200
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <s9dep1$7jk$1@dont-email.me>
References: <f6b41bac-39d2-441d-a89d-3485bf3fa99bn@googlegroups.com>
<s90s5l$b3d$1@dont-email.me>
<c5a4504a-d3dd-4809-97de-a08f01af2b08n@googlegroups.com>
<861r9met5p.fsf@stephe-leake.org> <s94ut2$s16$1@dont-email.me>
<s9clrk$tdq$1@dont-email.me> <lyim2taj1s.fsf@pushface.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 4 Jun 2021 14:53:21 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7762ef340fe9d43eede3e7edc12e5313";
logging-data="7796"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+A6G/WGkD5b4zRdCZrqJOT"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0)
Gecko/20100101 Thunderbird/78.10.2
Cancel-Lock: sha1:UoMGNLZhxzUpsj1SCip4t7ZXw7o=
In-Reply-To: <lyim2taj1s.fsf@pushface.org>
Content-Language: en-US
 by: Björn Lundin - Fri, 4 Jun 2021 14:53 UTC

Den 2021-06-04 kl. 14:52, skrev Simon Wright:
> Björn Lundin <b.f.lundin@gmail.com> writes:
>
>> So the whole system was built with korn-shell files stating
>
> I once did some work porting a Solaris system to Unix. They had migrated
> to GNAT, but compilation was managed using a set of c-shell scripts
> whose maintainer (one of the project managers told me) had made them his
> life's work.

Yeah - but in our case everybody hated them.
Quite some of my colleges had worked on VAX/VMS and the DEC Ada compiler
They say it had 'recompile *' which worked.

This AIX port with Alsys did not.
It had some kind of internal database to keep state of compiled files.
And sometimes it locked up - and it was not fun to fiddle around to
unlock it just to be able to compile.
I MUCH prefer gnats file model - even if I know other here suggests a db
is better.

>
> This would have been about 1999, so I had to use gnatmake, and I'm not
> even sure whether project files existed, but it was _such_ an
> improvement.
>

I ported our system around 2003 to gnat - first AIX then windows.
And porting to other targets having the same compiler makes it so much
easier.

I do understand that maintainer.
My tcl glue was really good (he says shamelessly)
Taht means that it worked, and nobody needed to understand it.
Or learn tcl - which in the long run was one reason to move to gpr-files.

Sitting on a solution that nobody knows how to fix if it breaks is no fun.

--
Björn

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor