From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Installing .ads, best practices ? Date: Mon, 30 Apr 2018 17:48:32 +0100 Organization: A noiseless patient Spider Message-ID: References: <74e6a67b-092a-4059-82e9-b6f6838cf709@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="bc79c6d5bebb87a763b31a7e39d67389"; logging-data="29453"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0wrfFczEKAFiwyTyRzzIL1zeY3ev2+VU=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:aKux9v/UgetRIqPvfiPT1fb5z2o= sha1:zRfNpoX0A8vorb3uGS75Yv3FKAU= Xref: reader02.eternal-september.org comp.lang.ada:51841 Date: 2018-04-30T17:48:32+01:00 List-Id: 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