comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
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
Date: 2012-07-29T15:46:11-04:00	[thread overview]
Message-ID: <wcc6296cpvg.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: op.wh7xsqqmka8ora@aspire.local

"Vasiliy Molostov" <molostoff@gmail.com> writes:

> Ludovic Brenta <ludovic@ludovic-brenta.org> яПНяПНяПНяПНяПН(яПН) яПН яПНяПНяПНяПНяПН яПНяПНяПНяПНяПНяПН 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



  parent reply	other threads:[~2012-08-02 12:25 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
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 [this message]
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