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,UTF8 Received: by 10.66.85.37 with SMTP id e5mr1452637paz.31.1344316995102; Mon, 06 Aug 2012 22:23:15 -0700 (PDT) Path: g9ni2426777pbo.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!ctu-peer!ctu-gate!news.nctu.edu.tw!usenet.stanford.edu!postnews.google.com!glegroupsg2000goo.googlegroups.com!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: Mon, 30 Jul 2012 05:48:36 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <214bbd15-f7cb-4710-a6a7-64f37923bf4e@googlegroups.com> <87wr1moexq.fsf@ludovic-brenta.org> <87sjcaoa08.fsf@ludovic-brenta.org> <87k3xlbvkz.fsf@ludovic-brenta.org> <0ddccceb-c5ef-408a-b336-7cd2cd272ff8@googlegroups.com> NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 X-Trace: posting.google.com 1343652930 18742 127.0.0.1 (30 Jul 2012 12:55:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 30 Jul 2012 12:55:30 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Date: 2012-07-30T05:48:36-07:00 List-Id: Vasiliy Molostov wrote on comp.lang.ada: > Ludovic Brenta =D0=BF=D0=B8=D1=81=D0=B0=D0= =BB(=D0=B0) =D0=B2 =D1=81=D0=B2=D0=BE=D1=91=D0=BC =D0=BF=D0=B8=D1=81=D1=8C= =D0=BC=D0=B5 Mon, =20 >> Don't you see how wrong this approach is? >=20 > Perhaps it is not ideal, but exists. Yes. Just like the devil; he exists only because man created him. >> Add to that that Make dependencies do not take compiler flags >> into account (gnatmake does) and are therefore incomplete. >> For example: >>=20 >> >> all: foo >> foo: a.o b.o >> gcc -o $@ $< >> >>=20 >> is not good enough, even when supplemented by generated source >> dependencies. Why? Because when CFLAGS contains -O3 or some >> explicit option, cross-unit inlining comes into the picture, >> so a.o does not depend on "just" b.o, it depends on a b.o >> compiled with the *same compiler options*. Make simply does >> not capture this dependency information. >=20 > You can place compiler options into a separate dependant file. I prefer to use gnatmake which already does the job. >> The constructive movement forward is: use *existing* better >> tools. If you still *must* use make, do that non-recursively. >=20 > *can*. The choice is mine, not your. Sure. You can choose inferior tools, you can choose to shoot yourself in the foot, you can choose to ignore the devil, you can choose to spend your days tracking dependencies by hand and your nights debugging the ensuing dependency problems and you can choose to perpetuate the myth that glaring bugs in released software are a natural and unavoidable thing. But that will not make the devil disappear; it will have the opposite effect. And *I* choose to fight the devil. The first step is to know where he is. --=20 Ludovic Brenta.