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.78.205 with SMTP id m13mr5989556qak.7.1344263649006; Mon, 06 Aug 2012 07:34:09 -0700 (PDT) Received: by 10.180.98.234 with SMTP id el10mr1175518wib.3.1344262798222; Mon, 06 Aug 2012 07:19:58 -0700 (PDT) Path: c6ni64817180qas.0!nntp.google.com!r1no8217126qas.0!news-out.google.com!n2ni72413970win.0!nntp.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!border1.nntp.ams2.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!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 17:35:51 +0200 Organization: A noiseless patient Spider Message-ID: <87sjcaoa08.fsf@ludovic-brenta.org> References: <214bbd15-f7cb-4710-a6a7-64f37923bf4e@googlegroups.com> <87wr1moexq.fsf@ludovic-brenta.org> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="38cf13a3fe89469cc7bfc9026f7b3336"; logging-data="15184"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+gMHdpZbjtPX2jGa8WaleG" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:TSltfKn5JKf5LTZCNOqEOltjCZI= sha1:QTxqEU7ieLe2YpfYGb92vgF+b6U= Content-Type: text/plain; charset=us-ascii Date: 2012-07-29T17:35:51+02:00 List-Id: "Nasser M. Abbasi" writes: > On 7/29/2012 8:49 AM, Ludovic Brenta wrote: >>> Here is very simple note on using recusive Make >>> >>> http://12000.org/my_notes/cheat_sheets/make_notes/index.htm > >> And here is a very detailed note about why *not* to use recursive Make: >> >> http://miller.emu.id.au/pmiller/books/rmch/ > > I know about this, and read it. It is a 'popular' link every time one > says recursive make. > > All what it boils to, is that recursive make is not efficient. Ok. Big > deal. I can wait 5 more seconds. I have an 8 quad PC and lots of ram > :) No. The most important point is that recursive make defeats dependency management. This makes it virtually impossible to guarantee safe compilation, *especially* with languages other than Ada, which do not guarantee or enforce the consistency of source files with object files, or of object files with one another. > I have been using recursive make for years, never seen a problem. So I > do not need a 'paper' written 15 years ago to tell it is a bad idea. You have been hiding potential problems for years, then. No wonder you didn't see them. > I run make from the top of my tree, go make coffee, check my mail, or > take a short nap, and then it is done. It is really never been an > issue for me. so why fix what is not broken :) Running recursive make from the top of the tree is only half the solution. The full solution is to delete all files produced during the recursive make, then re-launch it again. This is a solution to a totally artificial problem (i.e. defeating dependency management) created by recursive make. And, of course, the solution of deleting all products of the compilation (object files, .ali files, executables, shared libraries, documentation, etc) *cannot* be implemented by recursive make, since recursive make creates the *problem*. > But this is for my personal use. May be for a large company with > millions of lines of code, then it is an issue. I do not know. There > are always things one can do to improve anything they do I > suppose. The problem is to pick the stuff that is most important to > improve on. 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. -- Ludovic Brenta.