From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,53ca16c587912bce X-Google-Attributes: gid103376,public From: gauthier@alphainfo.unilim.fr (Michel Gauthier) Subject: Re: Source files organisation using gnat Date: 1997/07/01 Message-ID: #1/1 X-Deja-AN: 253867381 References: <19970630185901.OAA27670@ladder02.news.aol.com> Organization: Universite de Limoges Newsgroups: comp.lang.ada Date: 1997-07-01T00:00:00+00:00 List-Id: In article <19970630185901.OAA27670@ladder02.news.aol.com>, laurentau@aol.com (Laurentau) wrote: >> I am a very beginer to gnat. I used Alsys (now Aonix) at work. It uses a >> library concept. So, I am used to work this way: our sources are in an >> Unix tree with several levels. >> >> When I had a look at gnat, the first thing that I saw was... a lot of >> files in the same directory (adainclude). I don't know how to say without >> hurting people but if I program this way at work, I may get beaten to >> death by my quality manager ;-) >> >> Can someone tell me how they organized there development tree ? I agree that keeping a big number of files require organising them, which is generally obtained by use of directories. I guess that a library structure could have been a better solution than throwing Ada into the same melting pot as other languages. The gnat choice wastes much time of useless recompilations, that would have been left aside with more information kept instead of rebuilt. However, it is no longer the question. How can we deal now with both a gnat compiler and a tree structure of the sef of source files ? Our solution was to use the shell variables that define sets of paths. Gnat uses some of them to indicate where the sources, and other files, can be found (I do not have the detail in mind, look at the documentation). In practice, each of our directories with Ada sources contain a suitable 'a9path' file, which is a script of 'a9pend directory' commands which establish the shell variables with their parameter, in a transitive manner. This a9path is built as part of the directory initialisation process. After that, two suitable commands replace the gcc and gnatmake with analogous commands using the local library dependencies. This has been used all last year by 50 students without any problem, including after the designer has gone away to another job. I am neither fluent in unix shells nor the creator of these scripts, but I can search for them if they can be useful for somebody. Any comment appreciated. ---------- ---------- ---------- ---------- Michel Gauthier / Laboratoire d'informatique 123 avenue Albert Thomas / F-87060 Limoges telephone + 33 5 55 43 69 73 fax +33 5 55 43 69 77 ---------- ---------- ---------- ---------- Si l'an 2000 est pour vous un mysticisme stupide, utilisez la base 9 If you feel year 2000 a stupid mystic craze, use numeration base 9 ---------- ---------- ---------- ----------