From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "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 Message-ID: References: <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 Xref: reader02.eternal-september.org comp.lang.ada:62074 List-Id: On 5/31/21 6:59 PM, Stephen Leake wrote: > AdaMagica 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