Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Difference between gprbuild and gnatmake

881 views
Skip to first unread message

Victor Porton

unread,
Jul 12, 2017, 2:50:50 PM7/12/17
to
From another thread:

> You should probably be using gprbuild, not gnatmake.

What is the difference? Is gprbuild a newer version of gnatmake? What are
their differences?

--
Victor Porton - http://portonvictor.org

Simon Wright

unread,
Jul 13, 2017, 2:03:52 AM7/13/17
to
Victor Porton <por...@narod.ru> writes:

> From another thread:
>
>> You should probably be using gprbuild, not gnatmake.
>
> What is the difference? Is gprbuild a newer version of gnatmake? What are
> their differences?

gnatmake is part of the compiler suite (it's used in the compiler
build). gprbuild is not part of the compiler; it used only to be
generally available in source form as part of GNAT GPL releases, but
nowadays it's on github[1].

From there, "GPRbuild is an advanced build system designed to help
automate the construction of multi-language systems."; it understands
multiple languages (C, C++, Fortran at least - I haven't tried Fortran).

GCC 6 said

warning: gnatmake -P is obsolete and will not be available in the
next release; use gprbuild instead

but in fact GCC 8.0.0's gnatmake will accept project files (to some
extent, anyway, on a simple test).

[1] https://github.com/AdaCore/gprbuild

Stephen Leake

unread,
Jul 13, 2017, 4:39:42 AM7/13/17
to
On Thursday, July 13, 2017 at 1:03:52 AM UTC-5, Simon Wright wrote:
> Victor Porton writes:
>
> > From another thread:
> >
> >> You should probably be using gprbuild, not gnatmake.
> >
> > What is the difference? Is gprbuild a newer version of gnatmake? What are
> > their differences?
>
> gnatmake is part of the compiler suite (it's used in the compiler
> build). gprbuild is not part of the compiler; it used only to be
> generally available in source form as part of GNAT GPL releases, but
> nowadays it's on github[1].

This is misleading. gprbuild is in the GNAT GPL and supported releases; since 2014 it's bundled with the compiler.

One feature of gprbuild is that it is multi-language; by default it knows how to build C, C++, and Ada programs, and you can teach it about compilers for other languages.

Simon Wright

unread,
Jul 13, 2017, 10:12:48 AM7/13/17
to
Stephen Leake <stephe...@stephe-leake.org> writes:

> On Thursday, July 13, 2017 at 1:03:52 AM UTC-5, Simon Wright wrote:

>> gnatmake is part of the compiler suite (it's used in the compiler
>> build). gprbuild is not part of the compiler; it used only to be
>> generally available in source form as part of GNAT GPL releases, but
>> nowadays it's on github[1].
>
> This is misleading. gprbuild is in the GNAT GPL and supported
> releases; since 2014 it's bundled with the compiler.

Agree that binary releases from AdaCore contain a matching gprbuild. But
other binary releases didn't; for example, Debian and my Mac releases
had to use the latest source from GNAT GPL.

If you build the compiler from sources there will be a gnatmake; but
there will not be a gprbuild, because gprbuild is not part of the
compiler itself.

Victor Porton

unread,
Jul 13, 2017, 11:01:56 AM7/13/17
to
"Will"?

gnatmake of my GCC 7.1.0 (not 8.0.0) does accept project files:

gnatmake -p -c -Plibrdf.gpr -XLIBRARY_KIND=static -XOBJ_DIR=./obj-static -
Xsoversion=librdf-ada.so.2.0.15 -XMODE=Install -XDEBUG_MODE=check

> [1] https://github.com/AdaCore/gprbuild

Simon Wright

unread,
Jul 13, 2017, 12:17:32 PM7/13/17
to
Victor Porton <por...@narod.ru> writes:

> Simon Wright wrote:

>> but in fact GCC 8.0.0's gnatmake will accept project files (to some
>> extent, anyway, on a simple test).
>
> "Will"?

In the sense of "is prepared to", equivalent to "does", near enough

> gnatmake of my GCC 7.1.0 (not 8.0.0) does accept project files:
>
> gnatmake -p -c -Plibrdf.gpr -XLIBRARY_KIND=static -XOBJ_DIR=./obj-static -
> Xsoversion=librdf-ada.so.2.0.15 -XMODE=Install -XDEBUG_MODE=check

But that may be because gnatmake is in fact invoking gprbuild; if
compilation logs look like

compile
[Ada] foo.adb

then they are from gprbuild.
0 new messages