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 Received: by 10.180.96.42 with SMTP id dp10mr299176wib.2.1343910302096; Thu, 02 Aug 2012 05:25:02 -0700 (PDT) Received: by 10.236.79.98 with SMTP id h62mr12506111yhe.16.1343910068425; Thu, 02 Aug 2012 05:21:08 -0700 (PDT) Path: n2ni4564522win.0!nntp.google.com!feed-C.news.volia.net!volia.net!news2.volia.net!feed-A.news.volia.net!7no3959055wig.0!news-out.google.com!a15ni721qag.0!nntp.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border1.nntp.ams.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!goblin3!goblin.stu.neva.ru!gegeweb.org!news.glorb.com!news-out.readnews.com!transit3.readnews.com!panix!newsfeed-00.mathworks.com!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff 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 15:46:11 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <214bbd15-f7cb-4710-a6a7-64f37923bf4e@googlegroups.com> <87wr1moexq.fsf@ludovic-brenta.org> <87sjcaoa08.fsf@ludovic-brenta.org> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1343591171 20876 192.74.137.71 (29 Jul 2012 19:46:11 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sun, 29 Jul 2012 19:46:11 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:kRV/24kdE4tsnPzVOW5TQDR784Q= X-Received-Bytes: 4508 Content-Type: text/plain; charset=iso-8859-5 Content-Transfer-Encoding: 8bit Date: 2012-07-29T15:46:11-04:00 List-Id: "Vasiliy Molostov" writes: > Ludovic Brenta �����(�) � ����� ������ Sun, >> Been there, done that. Believe me: recursive make is the devil. It is >> insidious and perverse; it creates problems and cunningly hides them >> from you. You don't even know they exist until they come and bite you. >> And of course, when they do you don't know where they come from. The >> irony is: just like the devil, you've created this mess yourself. > > Why people so warring against tools used by others? I wonder. Well, I don't see any need for "war" here. ;-) But anyway, I agree with Ludovic that recursive make causes a lot of trouble, and is best avoided. I can sympathize with the OP not wanting to learn about .gpr files for simple projects, but in that case, a simple 'make' file (non-recursive!) that invokes gnatmake can work well. If you can't figure out how to get gnatmake to put the executables where you want them, you can write some 'make' rules to copy them there. > It is well known that appropriate tool utilization can give appropriate > result, and vise versa. I'm not sure what you mean by "vice versa" in this case, but appropriate tool *choice* is also a good idea. Learning about .gpr files isn't trivial, but it won't kill you. And you might want to look at 'gprbuild', which can deal with multi-language projects -- .gpr is not just for Ada. > Most open-source gnu c software are built using autotools with recursive > make use, and it is ok. I disagree that it is OK. In my experience, recursive make leads to complications and inefficiencies. For small projects, the inefficiencies might not matter, but I once converted a large project from recursive make to non-recursive, and went from over-10-hour builds to under-1-hour builds in the from-scratch case, and even better speedups in the incremental re-build case. Even for small projects, the difference between "few seconds" and "go get a cup of coffee" involves forgetting one's train of thought. As for autotools, I think they are a nightmare, and totally unnecessary for a language like Ada. Gnat itself is built that way (because it's part of gcc), and it's nothing but trouble. > More productive is recursive and parallel make. How about parallel gnatmake, or parallel gprbuild? It's easy to write race conditions using parallel make, but parallel gnatmake/gprbuild doesn't have that problem. >...And of course - handling > "inter-goal" dependencies between subprojects > in such recursive configuration is complex to describe in terms of > makefile, but still possible. Hmm. I don't know any good way to deal with ``"inter-goal" dependencies between subprojects'' via recursive 'make'. Could you please outline your techniques? I don't much like 'make', but if I can learn some better 'make' techniques, that's a good thing, since I have to deal with it all the time! - Bob