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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,163994d4f34e92d0 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.224.186.143 with SMTP id cs15mr11545595qab.3.1343791098199; Tue, 31 Jul 2012 20:18:18 -0700 (PDT) Received: by 10.68.220.230 with SMTP id pz6mr3774187pbc.3.1343789456134; Tue, 31 Jul 2012 19:50:56 -0700 (PDT) Path: a15ni14727975qag.0!nntp.google.com!4no2278321pbo.1!news-out.google.com!g9ni9632825pbo.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: how to tell gnatmake to send executables to a different directory when compiling multi source? Date: Sun, 29 Jul 2012 18:41:31 +0200 Organization: A noiseless patient Spider Message-ID: <87obmybjus.fsf@ludovic-brenta.org> References: <214bbd15-f7cb-4710-a6a7-64f37923bf4e@googlegroups.com> <87wr1moexq.fsf@ludovic-brenta.org> <87sjcaoa08.fsf@ludovic-brenta.org> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="38cf13a3fe89469cc7bfc9026f7b3336"; logging-data="6385"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+m5xmZYB2jQQMZyasbKgmr" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:+vH3rFpAVTYkOyHKtt8ePpR55QA= sha1:m/TUSM8Mpdp5N2wcY58TfVevtBE= Content-Type: text/plain; charset=us-ascii Date: 2012-07-29T18:41:31+02:00 List-Id: Patrick writes: > Is my super-ignorant shell script still a reasonably safe thing to do? I wouldn't call it safe because of entropy: "duplicated information eventually becomes different information". Copying object files around creates the potential problem that you compile against up-to-date sources but link against obsolete object files. I personally prefer to use GNAT project files. They can tell gnatmake how to link Ada object files with a library produced separately. When I must also compile the library from source languages other than Ada, then I use a single-level Makefile (not recursive) that builds the non-Ada part(s) into a library (or several libraries) then calls gnatmake to build the Ada parts and link against the library. I make it so that copying object files is never necessary. One of the reasons I choose Ada as a programming language is because it helps me write clean, maintainable, solid software. Sometimes I must use Makefiles but that is no excuse for writing dirty, messy, fragile build systems, now is it? Therefore, like for all software, I try to make my Makefiles as simple as possible and as complex as necessary. My Makefiles are under version control like everything else, and I write them with the same care as everything else. -- Ludovic Brenta.