to gnat make or not to gnat make (Was: ada compiler?)



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@xxxxxxxxxxxxxxxxxxxxx
Ada programming at: http://ada.krischik.com
.



Relevant Pages

  • Re: Ada "library only" compiler ?
    ... Perl is an example of a language with a huge number of libraries that are not included in the default distribution, but are easy to get and install. ... lot of the Ada libraries. ... My experience from about 25 years of using Ada libraries and compilers has been generally positive. ... The innards of GNAT are irrelevant to an Ada programmer who just uses GNAT to compile the program. ...
    (comp.lang.ada)
  • Re: Current statu of ASIS for GNAT 2012, please ?
    ... GNAT 4.4; the package says it depends on ada-compiler. ... Ada 95 should do. ... No. Debian is a binary distribution and respects the Ada Reference ... of compilers and interpreters. ...
    (comp.lang.ada)
  • Re: Companies Only Offering Ada-95 Compilers
    ... is what I use on Linux and windows. ... There are many JVMs and many compilers. ... GNAT is certainly very good. ... GPL only and even if you use gcc Ada eventually that is going to cause ...
    (comp.lang.ada)
  • Re: ada compiler?
    ... GNAT is not the only ... compiler in use today, people are still using Ada 95 from other vendors. ... how to build a Ada program without using 'gnatmake' ". ...
    (comp.lang.ada)
  • Re: Extending discriminant types
    ... Because the poster states that he can compiler the code. ... I used Gnat 3.15p using Ada 95 specs. ... type Child is new KBase with null record; ...
    (comp.lang.ada)