comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Installing .ads, best practices ?
Date: Mon, 30 Apr 2018 17:48:32 +0100
Date: 2018-04-30T17:48:32+01:00	[thread overview]
Message-ID: <lyk1soljxb.fsf@pushface.org> (raw)
In-Reply-To: 74e6a67b-092a-4059-82e9-b6f6838cf709@googlegroups.com

patrick@spellingbeewinnars.org writes:

> If we create our own C libraries on Linux(or similar posix) the best
> practice is to put the header in /usr/local/lib and not in /usr/lib
> where the original libraries installed by the package manager or at
> install time are located.
>
> On my system, most of the .ads spec files are located in:
> /usr/lib/gcc/x86_64-linux-gnu/4.6/rts-native/adainclude/

4.6? that's a bit ancient, isn't it?

> It doesn't seem to like a good idea to install my own spec files there
> for system wide use.

It would be a Very Bad Idea; that's the compiler's runtime.

When you say "for system wide use", do you mean that you want to make
your work available for other users of the system? or that you want to
avoid confusing other users of the system? (if there are any, of
course!)

> Would /usr/local/include be better? Do you use something like this? If
> so, do you have an environmental variable in your.bashrc so that
> gnatmake finds it without passing an argument ?

If this is just for yourself, I would:

a) learn how to use GNAT projects (.gpr)
b) use gprbuild instead of gnatmake
c) use gprinstall to install in a standard place; if you say
     gprinstall -p -P mylibrary.gpr --prefix=/usr/local
   then a reworked version of mylibrary.gpr will be installed in
   /usr/local/share/gpr/, with other files in appropriate places
   (e.g. /usr/local/include/mylibrary/, /usr/local/lib/mylibrary/)
d) add 'export ADA_PROJECT_PATH=/usr/local/share/gpr' to ~/.bashrc


  parent reply	other threads:[~2018-04-30 16:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30 13:17 Installing .ads, best practices ? patrick
2018-04-30 14:38 ` Niklas Holsti
2018-04-30 15:03 ` Dmitry A. Kazakov
2018-04-30 16:25   ` patrick
2018-04-30 16:53     ` Dmitry A. Kazakov
2018-04-30 16:48 ` Simon Wright [this message]
2018-04-30 17:21   ` patrick
2018-04-30 17:27     ` patrick
replies disabled

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