comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
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
Date: 2012-07-29T17:35:51+02:00	[thread overview]
Message-ID: <87sjcaoa08.fsf@ludovic-brenta.org> (raw)
In-Reply-To: jv3g7h$ib4$1@speranza.aioe.org

"Nasser M. Abbasi" <nma@12000.org> 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.



  reply	other threads:[~2012-08-06 14:34 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-29  9:31 how to tell gnatmake to send executables to a different directory when compiling multi source? Nasser M. Abbasi
2012-07-29 10:00 ` Dmitry A. Kazakov
2012-07-29 11:35   ` Nasser M. Abbasi
2012-07-29 12:29     ` Patrick
2012-07-29 13:02       ` Nasser M. Abbasi
2012-07-29 13:49         ` Ludovic Brenta
2012-07-29 14:09           ` Nasser M. Abbasi
2012-07-29 15:35             ` Ludovic Brenta [this message]
2012-07-29 15:42               ` Patrick
2012-07-29 16:41                 ` Ludovic Brenta
2012-07-29 16:46                   ` Patrick
2012-07-29 17:35               ` Vasiliy Molostov
2012-07-29 19:40                 ` Dmitry A. Kazakov
2012-07-29 22:22                   ` Vasiliy Molostov
2012-07-29 19:46                 ` Robert A Duff
2012-07-30  0:20                   ` Vasiliy Molostov
2012-07-30  3:01                     ` Nasser M. Abbasi
2012-07-30  4:48                       ` Nasser M. Abbasi
2012-07-30 21:05                         ` Robert A Duff
2012-07-30  5:50                       ` Dmitry A. Kazakov
2012-07-30 11:16                       ` Vasiliy Molostov
2012-07-30 12:25                         ` Georg Bauhaus
2012-07-30 12:59                           ` Vasiliy Molostov
2012-07-30 14:07                             ` Georg Bauhaus
2012-07-30 13:03                           ` Nasser M. Abbasi
2012-07-30 14:02                             ` Georg Bauhaus
2012-07-30 19:40                             ` J-P. Rosen
2012-08-01  7:32                               ` Miles Bader
2012-08-01  9:37                                 ` Ludovic Brenta
2012-08-02  5:01                                   ` Miles Bader
2012-08-01 15:15                                 ` J-P. Rosen
2012-08-02 15:08                                   ` Robert A Duff
2012-08-02 16:37                                     ` J-P. Rosen
2012-07-30 19:50                             ` Ludovic Brenta
2012-07-30  3:21                     ` Nasser M. Abbasi
2012-07-30  8:19                       ` Simon Wright
2012-07-30  6:12                     ` Dirk Heinrichs
2012-07-30  6:40                     ` Ludovic Brenta
2012-07-30 10:31                       ` Vasiliy Molostov
2012-07-30 11:05                         ` Ludovic Brenta
2012-07-30 11:33                           ` Simon Wright
2012-07-30 12:16                           ` Vasiliy Molostov
2012-07-30 12:48                             ` Ludovic Brenta
2012-07-30 13:09                               ` Vasiliy Molostov
2012-07-30  6:06                 ` Dirk Heinrichs
2012-07-29 12:31     ` Nasser M. Abbasi
2012-07-29 13:46       ` Ludovic Brenta
2012-07-29 14:15         ` Simon Wright
2012-07-29 13:54     ` Dmitry A. Kazakov
2012-07-29 14:16       ` Nasser M. Abbasi
2012-07-29 14:32         ` Dmitry A. Kazakov
2012-07-30  5:57     ` General purpose build tools (was: Re: how to tell gnatmake to send executables to a different directory when compiling multi source?) Dirk Heinrichs
2012-07-30 10:50       ` Vasiliy Molostov
2012-07-30 11:10         ` Ludovic Brenta
2012-07-30 12:39           ` Vasiliy Molostov
2012-08-30 10:49           ` General purpose build tools Stephen Leake
2012-07-29 18:33 ` how to tell gnatmake to send executables to a different directory when compiling multi source? björn lundin
2012-07-29 19:06 ` onox
2012-07-31 11:12 ` Patrick
2012-07-31 11:30   ` Dmitry A. Kazakov
2012-07-31 11:31     ` Dmitry A. Kazakov
2012-07-31 11:34       ` Patrick
2012-07-31 12:33   ` Ludovic Brenta
2012-07-31 15:14     ` Patrick
2012-07-31 16:04       ` Ludovic Brenta
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox