[Omake] Compiling Ada code
Dirk Heinrichs
ext-dirk.heinrichs at nokia.com
Thu Oct 19 23:42:31 PDT 2006
Am Freitag, 20. Oktober 2006 04:09 schrieb ext David Brown:
> My first question would be: what are you trying to do that gnatmake
> doesn't solve? Generally a makefile can just invoke gnatmake with the
> main module and it will build the rest.
What about using libraries? gnatmake wil take all packages and create one
big, statically linked executable from them. If you want to create and use
shared libraries, you start writing .gpr files for gnatmake
(gnatmake's "makefiles"). Unfortunately, gnatmake as a build tool is too
limited. This is the reason why I don't use gnatmake at all.
> Attempts to do this with another
> dependency manager wll almost always be wrong.
No, I don't think so. In the end, you can do the same as with C/C++. Compile
the source files one by one, then link them to get either a shared lib or
an executable.
> The rules in Ada are
> rather compilcated, and even depend on compile time options (enabling
> inlining creates a dependency on the body, instead of just the spec, for
> example).
I'm no friend of inlining anyway. However, even this could be programmed
into an omake function.
> GNAT's dependecies aren't really any different than they are for C.
> (Most other Ada compilers do this very differently). However, GNAT was
> designed around their tool gnatmake which knows how to parse the
> dependency information generated by compilation. There is nothing to
> scan before a file is compiled.
That's exactly the problem I'm trying to solve.
> The build-prerequisites would typically be generated source files. These
> are going to have to be specified manually, anyway.
No, why? I have some simple OMakefiles with just a few lines of code which
simply utilize the directory structure to find out what to build, i.e.
creating a new directory below "programs" and filling it with C files will
result in compiling all those source files and link them to a binary with
the same name as the directory they're in. I can even create programs/libs
which are created from both C and Ada sources.
This works fine so far for both C and Ada programs using makepp. However,
makepp is dog slow compared to omake and introducing a new dep scanner to
makepp is way too complicated, so I decided to switch build tools.
Bye...
Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs at capgemini.com
Hambornerstraße 55 | Web: http://www.capgemini.com
D-40472 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.metaprl.org/pipermail/omake/attachments/20061020/43a7680a/attachment.bin
More information about the Omake
mailing list