comp.lang.ada
 help / color / mirror / Atom feed
From: "Vasiliy Molostov" <molostoff@gmail.com>
Subject: Re: how to tell gnatmake to send executables to a different directory when compiling multi source?
Date: Mon, 30 Jul 2012 14:31:23 +0400
Date: 2012-07-30T14:31:23+04:00	[thread overview]
Message-ID: <op.wh88uluwka8ora@aspire.local> (raw)
In-Reply-To: 87k3xlbvkz.fsf@ludovic-brenta.org

Ludovic Brenta <ludovic@ludovic-brenta.org> писал(а) в своём письме Mon,  
30 Jul 2012 10:40:28 +0400:

> No, even in C an object file corresponds to not one but *several* input
> files: one or possibly several *.c and many *.h files.  Make was
> invented to compensate for the deficiencies of C, which does not track
> dependencies, and Make does a bad job of that, even in simple projects.

As we can see from predefined make rules

%.o: %.c

which means that C input source file has a direct correspondence to a  
resulting object file, and which is not applicable to gnat ada sources at  
all. Make is a general tool supporting that strict input-output pairing  
correspondence approach.

As for dependencies of C code and header files (*.h) they are come from  
gcc autogenerated dependencies, lately included into makefile as a part.  
And indeed it is a helper, since a hand intervention is still might be  
required to express an author wish.

The way it works is similar to all C stuff, someone has even named it as  
dancing with a blade. Is it danger? Perhaps. Is it devil?

>> But why the "recursive" is devil? Usual project contains many files
>> that needs to be built, not only source code, but data, man pages and
>> docs,  configurations, all these are separate and usually built via
>> recursive  makefiles.
>
> Just because many lemmings are wrong doesn't make them right.  Read the
> paper; it explains very well how recursive makefiles defeat dependency
> management completely.  This is the cause for the biggest and most
> insidious problems.

I have read them in a count that is inappropriate for the moment, many  
papers expressing novice opinion about danger of any thing, similar to  
warnings about smoking and fugu fish eating. None of them are good,  
because make (fish, smoke) still exist and widely used and happily  
consumed. And used mush more widely than Ada or Java.

If someone fills that people in danger with that tool, please be so kind  
to correct existing or to write a better tool, which is the right way, but  
as for me I am sick and tired from advices about devil things (like  
ada.calendar.time), those came from personal desire, and produce only  
warring about a need (a requirement!) of restrictive use, without  
constructive movement forward.

>> Why to name a good time-proven tool as devil? I see no reason, only
>> tendentious and imperatively expressed opinion.
>
> Make and especially recursive make have been time-proven to be fragile,
> unmaintainable, error-prone and inefficient.

Do you plan to rewrite all these old good debian packages?

> It is possible and recommended to
> use make the same way, i.e. by means of include Makefiles instead of
> recursive.

You can suppose here that make can include not complete makefiles but  
dependency info collected by a separate tool.

> This is a valid point.  The problem is that Make doesn't know about
> dependencies between Ada units like gnatmake does; therefore Make
> violates the Ada Reference manual.  In short, when compiling Ada you
> *must* use gnatmake or its equivalent for another compiler than GNAT.
> And yo *must* use whatever configuration file is appropriate for
> gnatmake.

*must* should better sounds with *can*, since this approach relates to  
GNAT only. And as a consequence the GNAT compilation model approach can  
not turn makefile into a devil thing. This is the same as personal haircut  
can not turn outer world into an ambiguous state.

> Ada has none of these deficiencies.
>
>> For Ada with gnat these are not appropriate enough of course, but it
>> is not due to recursively calling make, or autotools by itself. They
>> are just other tools for doing another things, and nothing
>> else. Regarding autotools and ada, take a look at AWS source - I dont
>> know why but you still need to 'configure' it. Would you like to know
>> why?
>
> I know why.  The configure in AWS is not constructed with autoconf, it
> is written by hand and is minimalistic.  The things that need
> configuring are: whether or not to support SSL or GNU TLS,
> etc. i.e. which libraries other than AWS are present on the system and
> should be used.  And AWS does not use automake either.

So here we can see when "none of these deficiencies" becomes a need to  
establish environment capabilities in "tls/ssl and etc" dependencies. So  
the correct answer here is that GNAT Ada has some deficiencies but in  
general they are different from C approach.

And no devil, indeed.
-- 
Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/



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