From f0bbafed015258350f317558da62dd7be442be3c Mon Sep 17 00:00:00 2001
From: Björn Persson
Ada specifications, C headers and other source files that are needed for -compilation of other software that uses your libraries shall be placed under -Comfignat.Stage_Includedir by build project files, usually under a -separate subdirectory. Usage project files shall get the directory from the -preprocessor symbol Includedir.
Binary libraries shall be placed in Comfignat.Stage_Libdir by build project files. Usage project files shall get the directory from the preprocessor symbol Libdir.
Ada specifications, C headers and other source files that are needed for +compilation of other software that uses your libraries shall be placed under +Comfignat.Stage_Includedir by build project files, usually under a +separate subdirectory. Usage project files shall get the directory from the +preprocessor symbol Includedir. These files should normally be +architecture-independent.
If you have architecture-specific source files that you need to make +available to other software that uses your libraries, then you should refactor +your code to encapsulate the architecture-specific bits in the compiled code +and keep the API clean. But if you really must install such files, then you may +put them under a separate subdirectory of stage_archincludedir. +Usage project files shall get the directory from the preprocessor symbol +Archincludedir.
Comfignat puts usage project files in stage_gprdir.
Locale-specific message catalogs shall be placed in the appropriate @@ -341,10 +350,6 @@ target architecture.
Here's an example of what a directories project may look like:
abstract project System_Directories is @@ -369,18 +384,19 @@ Ada library information files. end case; Libdir := "/usr/" & Lib; - Bindir := "/usr/bin"; - Libexecdir := "/usr/libexec"; - Includedir := "/usr/include"; - Alidir := Libdir; + Bindir := "/usr/bin"; + Libexecdir := "/usr/libexec"; + Includedir := "/usr/include"; + Alidir := Libdir; + Archincludedir := Libdir & "/include"; end System_Directories;
This directories project belongs in a multiarch operating system where libraries are kept in either /usr/lib or /usr/lib64 depending on which architecture they are compiled for. The directories project -sets Libdir and Alidir -to the right directory for the target architecture based +sets Libdir, Alidir and Archincludedir +to the right directories for the target architecture based on an environment variable. A library project that uses this directories project will therefore automatically adapt to the current target architecture, so that 32-bit and 64-bit instances of the library can be installed in parallel -- cgit v1.2.3