comp.lang.ada
 help / color / mirror / Atom feed
From: anon@anon.org (anon)
Subject: Re: to gnat make or not to gnat make (Was: ada compiler?)
Date: Tue, 13 Nov 2007 22:46:24 GMT
Date: 2007-11-13T22:46:24+00:00	[thread overview]
Message-ID: <4Pp_i.21603$if6.6417@bgtnsc05-news.ops.worldnet.att.net> (raw)
In-Reply-To: 47396fb1$1@news.post.ch

You better learn how things work:

'gnat compile' is equivalent to using 'gnatmake -f -u' but it does not 
call 'gnatmake' program.

Plus, 'gnatmake' perform it compiling in serial only. But a user can 
executes multiple 'gnat compile' in background which speeds up compiling. 
Which means using 'gnatmake' can be considered as inefficient execution 
which is against the RM. Using multiple compiles alone is worth the time 
to use 'gnat compile'.



Resource usage:

The 'gnat compile' program requires the execution of 
    'gcc' which requires 'gnat1' and 'as' (4 programs in memory)

'gnatbind' is stand-alone partition. (1 programs in memory)

Then the 'gnatlink' program requires the execution of 
    'gcc' which requires 'gnat1' and 'as' afterwards use ld
    (5 programs in memory)


Now the 'gnatmake' program requires the execution of
    'gcc' which requires 'gnat1' and 'as' also, an additional
    copy of the "gcc-gnat1-as' for each additional package 
    executed. (7 programs in memory)

    Then 'gnatmake' executes the 'gnatbind' (2 programs in memory)

    Then 'gnatmake' executes the 'gnatlink' which executes
    'gcc' which requires 'gnat1' and 'as' afterwards use ld
     (6 programs in memory)

Which means that 'gnatmake' requires the resources of at least 7 programs 
while 'gnat compile' requires 4.  Which proves that 'gnat compile' is more 
efficient to use.  You could in the "GNU GCC" system reduces the 
resources to 3 by using 'gcc -c <name>.ad[b|s]'. But that even strengthen 
the concept that 'gnatmake' should never be used.  


And just to be funny about it. Why blame the computer when the boss 
see you goofing-off. Finish the job early and take the next day off 
with pay. Use parallel compiling!



In <47396fb1$1@news.post.ch>, Martin Krischik <krischik@users.sourceforge.net> writes:
>anon schrieb:
>> -- You have to learn to crawl before you can walk and learn the rules 
>> -- to walk before you should run.
>
>Indeed - only I think that using the GPS is crawling, "gnat make" is
>walking, "gnat compile" / "gnat bind" / "gnat link" is hurdles and "gcc
>-x ada" / "ld" steeplechase [1].
>
>The reason you learn to craws first is because crawling is easier then
>walking. And using the GPS is the easiest way to compile/bind/link an
>Ada program using - well - gnat.
>
>> First, GNAT may be the only Ada 2005 compiler at the movement but that 
>> may change if other posters arecorrect. Second, GNAT is not the only 
>> compiler in use today, people are still using Ada 95 from other vendors. 
>> Software vedors like GHS, IBM, and Janas have Ada compilers and not one 
>> of them use "gnatmake".  But all vendors including Adacore uses a version 
>> of the three steps to build an Ada partition.
>
>Well, ObjectAda has an IDE and uses some form of project manager.
>
>> And if you check with the Ada LRM you will see that the LM promotes a 
>> concept of not wasting or hogging resources.  Since "gnatmake" is a 
>> resource hog the concept states that it should not be used. And as most 
>> poster say the Ada LRM is the final word.
>
>I see, you have not dug deep enough into the workings of "gnat". Have a
>look at the help page:
>
>----------------------------------------------------------------------
>GNAT GPL 2007 (20070405-41)
>
>Copyright 1996-2007, Free Software Foundation, Inc.
>
>
>
>List of available commands
>
>
>
>gnat bind               gnatbind
>
>gnat chop               gnatchop
>
>gnat clean              gnatclean
>
>gnat compile            gnatmake -f -u -c
>
>gnat check              gnatcheck
>
>gnat elim               gnatelim
>
>gnat find               gnatfind
>
>gnat krunch             gnatkr
>
>gnat link               gnatlink
>
>gnat list               gnatls
>
>gnat make               gnatmake
>
>gnat metric             gnatmetric
>
>gnat name               gnatname
>
>gnat preprocess         gnatprep
>
>gnat pretty             gnatpp
>
>gnat stack              gnatstack
>
>gnat stub               gnatstub
>
>gnat xref               gnatxref
>
>
>
>Commands find, list, metric, pretty, stack, stub and xref accept project
>file switches -vPx, -Pprj an
>d -Xnam=val
>
>
>
>----------------------------------------------------------------------
>
>"gnat compile" is an alias name for "gnatmake -f -u -c" - So the only
>way to avoid "gnatmake" is using "gcc -x ada".
>
>> Plus, if Adacore is sold and gutted, goes out of business, or falls out of 
>> favor with other companies.  The newbees need to know the concept of 
>> how an Ada partition is generated.  
>
>But they don't need to use the actual commands - they are too different
>between two compilers systems anyway. (I use DecAda as well).
>
>> Now just to be funny. Adacore would love to hear this but, the boss's blood 
>> pressure might hit the roof. That is, if the programmer said, "I do not know 
>> how to build a Ada program without using 'gnatmake' ".  
>
>I know in theory how to compile an Ada program using "gcc -x ada" - but
>I can live without turning that theoretical knowledge into practical use.
>
>Martin
>
>[1] http://en.wikipedia.org/wiki/Steeplechase_%28athletics%29
>-- 
>mailto://krischik@users.sourceforge.net
>Ada programming at: http://ada.krischik.com




  reply	other threads:[~2007-11-13 22:46 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 22:25 ada compiler? Bill Cunningham
2007-11-09 22:39 ` anon
2007-11-09 22:59   ` Bill Cunningham
2007-11-09 23:28     ` anon
2007-11-09 23:50 ` Jeffrey R. Carter
2007-11-10  0:32   ` anon
2007-11-10  4:15     ` Jeffrey Creem
2007-11-10  5:08     ` tmoran
2007-11-10  6:12       ` anon
2007-11-10  8:35         ` tmoran
2007-11-10 20:20           ` anon
2007-11-10 22:15             ` Jeffrey Creem
2007-11-11  1:01               ` anon
2007-11-11  1:14                 ` (see below)
2007-11-11  2:21                 ` Georg Bauhaus
2007-11-11  4:08                   ` Jeffrey R. Carter
2007-11-13 13:24                     ` Ludovic Brenta
2007-11-14  7:00                       ` Jacob Sparre Andersen
2007-11-14  9:15                         ` Georg Bauhaus
2007-11-14 10:26                           ` Ludovic Brenta
2007-11-14 12:25                             ` Georg Bauhaus
2007-11-14 15:09                               ` Ludovic Brenta
2007-11-14 16:03                                 ` Georg Bauhaus
2007-11-14 16:36                                   ` Ludovic Brenta
2007-11-14 17:39                                     ` Georg Bauhaus
2007-11-14 20:40                                       ` Ludovic Brenta
2007-11-15  9:59                                         ` Georg Bauhaus
2007-11-14 17:52                                     ` Georg Bauhaus
2007-11-16  1:07                                     ` Samuel Tardieu
2007-11-16  1:58                                       ` tmoran
2007-11-16  9:41                                       ` Stack checking in GNAT (was: ada compiler?) Ludovic Brenta
2007-11-16 10:56                                         ` Stack checking in GNAT Samuel Tardieu
2007-11-16 13:04                                           ` Ludovic Brenta
2007-11-17  7:24                                             ` anon
2007-11-29  0:32                                         ` Robert A Duff
2007-11-17  1:37                                       ` ada compiler? Randy Brukardt
2007-11-17  1:18                                     ` Randy Brukardt
2007-11-29  0:41                                     ` Robert A Duff
2007-11-14 21:31                                 ` Niklas Holsti
2007-11-17  1:50                                   ` Randy Brukardt
2007-11-14 18:33                         ` anon
2007-11-12  5:13                   ` anon
2007-11-11 14:15                 ` Jeffrey Creem
2007-11-13  7:11                 ` Martin Krischik
2007-11-13  8:47                   ` anon
2007-11-13  9:34                     ` to gnat make or not to gnat make (Was: ada compiler?) Martin Krischik
2007-11-13 22:46                       ` anon [this message]
2007-11-13 23:14                         ` to gnat make or not to gnat make Simon Wright
2007-11-14  9:21                         ` to gnat make or not to gnat make (Was: ada compiler?) Georg Bauhaus
2007-11-13 22:41                     ` ada compiler? Simon Wright
2007-11-17  2:07                     ` Randy Brukardt
2007-11-17  7:51                       ` anon
2007-11-17  9:00                         ` Pascal Obry
2007-11-17 12:24                         ` Ludovic Brenta
2007-11-19 21:35                           ` Randy Brukardt
2007-11-10 15:03         ` (see below)
2007-11-12 16:38       ` Adam Beneschan
2007-11-13  3:16         ` John W. Kennedy
2007-11-13 16:46           ` Adam Beneschan
2007-11-10  3:07 ` Georg Bauhaus
2007-11-13  0:20 ` adaworks
2007-11-13 22:27   ` Simon Wright
2007-11-14 17:32   ` Britt Snodgrass
replies disabled

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