From 9473da72d789c945d35e737cc3dff9582f158a43 Mon Sep 17 00:00:00 2001
From: Björn Persson <bjorn@rombobjörn.se>
Date: Sun, 15 Sep 2013 01:31:39 +0200
Subject: Added alidir to the documentation.

---
 INSTALL        | 10 ++++++++--
 manual.en.html | 16 ++++++++++++++--
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/INSTALL b/INSTALL
index 93b4650..9984671 100644
--- a/INSTALL
+++ b/INSTALL
@@ -119,8 +119,14 @@ are relevant during the build:
 
  libdir
     The directory for binary libraries to be used by other software, and the
-    top-level directory for other architecture-specific files, used only if no
-    directories project is provided. Default: <exec_prefix>/lib
+    top-level directory for other architecture-specific files, used for
+    libraries only if no directories project is provided.
+    Default: <exec_prefix>/lib
+
+ alidir
+    The parent of the library-specific directory for Ada library information
+    files for this library, used only if no directories project is provided.
+    Default: <libdir>
 
  gprdir
     The directory for GNAT project files to be used in the building of software
diff --git a/manual.en.html b/manual.en.html
index a9d125a..a8a46a8 100755
--- a/manual.en.html
+++ b/manual.en.html
@@ -290,8 +290,16 @@ preprocessor symbol <var>Includedir</var>.</p></li>
 by build project files. Usage project files shall get the directory from the
 preprocessor symbol <var>Libdir</var>.</p></li>
 
-<li><p>ALI files and other architecture-specific files shall usually be placed
-under a separate subdirectory of <var>Comfignat.Stage_Libdir</var>.</p></li>
+<li><p>Ada library information (ALI) files shall be placed under a separate
+subdirectory of <var>Comfignat.Stage_Alidir</var> by build project files. Usage
+project files shall get the directory from the preprocessor symbol
+<var>Alidir</var>.</p></li>
+
+<li><p>Other architecture-specific files shall usually be placed under a
+separate subdirectory of <var>stage_libdir</var>. (It may be the same
+subdirectory that ALI files are placed in when
+<var>alidir</var> = <var>libdir</var>.) Programs shall look for them under
+<var>Comfignat.Libdir</var>.</p></li>
 
 <li><p>Comfignat puts usage project files in <var>stage_gprdir</var>.</p></li>
 
@@ -340,6 +348,10 @@ software using libraries.</dd>
 <dt><var>Libdir</var></dt>
 <dd>The directory for binary libraries to be used by other software, and the
 top-level directory for other architecture-specific files.</dd>
+
+<dt><var>Alidir</var></dt>
+<dd>The parent of libraries' separate library-specific directories for
+Ada library information files.</dd>
 </dl>
 
 <p>Here's an example of what a directories project may look like:</p>
-- 
cgit v1.2.3


From 3dfe552131ed21d516263dae5efd89de29b17700 Mon Sep 17 00:00:00 2001
From: Björn Persson <bjorn@rombobjörn.se>
Date: Sun, 15 Sep 2013 10:51:08 +0200
Subject: Finished adding alidir to the documentation.

---
 INSTALL        |  1 +
 manual.en.html | 16 +++++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/INSTALL b/INSTALL
index 9984671..5833d80 100644
--- a/INSTALL
+++ b/INSTALL
@@ -190,6 +190,7 @@ invoke Gnatprep. You may need to define them if you run Gnatprep manually.
  Logdir
  Includedir
  Libdir
+ Alidir
  GPRdir
  Localedir
  Mandir
diff --git a/manual.en.html b/manual.en.html
index a8a46a8..1a9e249 100755
--- a/manual.en.html
+++ b/manual.en.html
@@ -147,7 +147,7 @@ that the project <var>Comfignat</var> defines.</p>
   <li><p>If your project file builds a library, then use a subdirectory of
   <var>Comfignat.Stage_Includedir</var> for <var>Library_Src_Dir</var>,
   <var>Comfignat.Stage_Libdir</var> for <var>Library_Dir</var>, and a
-  subdirectory of <var>Comfignat.Stage_Libdir</var> for
+  subdirectory of <var>Comfignat.Stage_Alidir</var> for
   <var>Library_ALI_Dir</var>.</p></li>
   </ul>
 </li>
@@ -159,8 +159,8 @@ project file without the "<samp>.gp</samp>" suffix. Make it import the project
 file that the preprocessor symbol <var>Directories_GPR</var> specifies, but
 only if <var>Directories_GPR</var> is defined. Do not import
 <var>comfignat.gpr</var>. Use the symbol <var>Includedir</var> in the value of
-<var>Source_Dirs</var>, and use <var>Libdir</var> for <var>Library_Dir</var>
-and as part of <var>Library_ALI_Dir</var>.</p></li>
+<var>Source_Dirs</var>, use <var>Libdir</var> for <var>Library_Dir</var>, and
+use <var>Alidir</var> as part of <var>Library_ALI_Dir</var>.</p></li>
 
 <li><p>Write a makefile that includes <var>comfignat.mk</var>. The makefile
 shall set the variable <var>build_GPRs</var> to the filename of the
@@ -187,7 +187,7 @@ library project Build_Example is
    for Object_Dir        use Comfignat.Objdir;
    for Library_Src_Dir   use Comfignat.Stage_Includedir &amp; "/example";
    for Library_Dir       use Comfignat.Stage_Libdir;
-   for Library_ALI_Dir   use Comfignat.Stage_Libdir &amp; "/example";
+   for Library_ALI_Dir   use Comfignat.Stage_Alidir &amp; "/example";
 end Build_Example;</pre></div>
 
 <div class="example file"><h5><code>example.gpr.gp</code></h5>
@@ -200,7 +200,7 @@ library project Example is
    for Library_Kind     use "dynamic";
    for Source_Dirs      use ($Includedir &amp; "/example");
    for Library_Dir      use $Libdir;
-   for Library_ALI_Dir  use $Libdir &amp; "/example";
+   for Library_ALI_Dir  use $Alidir &amp; "/example";
    for Externally_Built use "true";
 end Example;</pre></div>
 
@@ -296,7 +296,7 @@ project files shall get the directory from the preprocessor symbol
 <var>Alidir</var>.</p></li>
 
 <li><p>Other architecture-specific files shall usually be placed under a
-separate subdirectory of <var>stage_libdir</var>. (It may be the same
+separate subdirectory of <var>stage_libdir</var>. (It will be the same
 subdirectory that ALI files are placed in when
 <var>alidir</var> = <var>libdir</var>.) Programs shall look for them under
 <var>Comfignat.Libdir</var>.</p></li>
@@ -372,13 +372,15 @@ Ada library information files.</dd>
    Bindir     := "/usr/bin";
    Libexecdir := "/usr/libexec";
    Includedir := "/usr/include";
+   Alidir     := Libdir;
 
 end System_Directories;</pre>
 
 <p>This directories project belongs in a multiarch operating system where
 libraries are kept in either <var>/usr/lib</var> or <var>/usr/lib64</var>
 depending on which architecture they are compiled for. The directories project
-sets <var>Libdir</var> to the right directory for the target architecture based
+sets <var>Libdir</var> and <var>Alidir</var>
+to the right directory 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


From 779e60ca47698eca02da97cdc97ab96d4bfcc5fa Mon Sep 17 00:00:00 2001
From: Björn Persson <bjorn@rombobjörn.se>
Date: Sun, 15 Sep 2013 20:15:44 +0200
Subject: Implemented alidir.

---
 comfignat.gpr.gp | 17 +++++++++++++++--
 comfignat.mk     | 13 ++++++++++---
 2 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/comfignat.gpr.gp b/comfignat.gpr.gp
index e334f00..6e5d7a8 100644
--- a/comfignat.gpr.gp
+++ b/comfignat.gpr.gp
@@ -151,6 +151,13 @@ abstract project Comfignat is
       Libdir := Exec_Prefix & "/lib";
    #end if;
 
+   -- ALI files are under a library-specific subdirectory of Alidir.
+   #if Alidir'Defined then
+      Alidir := $Alidir;
+   #else
+      Alidir := Libdir;
+   #end if;
+
    -- GNAT project files are under GPRdir.
    #if GPRdir'Defined then
       GPRdir := $GPRdir;
@@ -268,12 +275,18 @@ abstract project Comfignat is
    #end if;
 
    -- Binary libraries shall be installed in Stage_Libdir.
-   -- ALI files shall be installed in a library-specific subdirectory of
-   -- Stage_Libdir.
    #if Stage_Libdir'Defined then
       Stage_Libdir := $Stage_Libdir;
    #else
       Stage_Libdir := Stagedir & Libdir;
    #end if;
 
+   -- ALI files shall be installed under a library-specific subdirectory of
+   -- Stage_Alidir.
+   #if Stage_Alidir'Defined then
+      Stage_Alidir := $Stage_Alidir;
+   #else
+      Stage_Alidir := Stagedir & Alidir;
+   #end if;
+
 end Comfignat;
diff --git a/comfignat.mk b/comfignat.mk
index 23e71aa..7b3ccce 100644
--- a/comfignat.mk
+++ b/comfignat.mk
@@ -101,6 +101,7 @@ cachedir   = ${localstatedir}/cache
 logdir     = ${localstatedir}/log
 includedir = ${prefix}/include
 libdir     = ${exec_prefix}/lib
+alidir     = ${libdir}
 gprdir     = ${datarootdir}/gpr
 localedir  = ${datarootdir}/locale
 mandir     = ${datarootdir}/man
@@ -150,6 +151,7 @@ stage_cachedir   = ${stagedir}${cachedir}
 stage_logdir     = ${stagedir}${logdir}
 stage_includedir = ${stagedir}${includedir}
 stage_libdir     = ${stagedir}${libdir}
+stage_alidir     = ${stagedir}${alidir}
 stage_gprdir     = ${stagedir}${gprdir}
 stage_localedir  = ${stagedir}${localedir}
 stage_mandir     = ${stagedir}${mandir}
@@ -239,7 +241,7 @@ configuration_variables += \
    dirgpr relocatable_package \
    prefix exec_prefix datarootdir localstatedir \
    bindir libexecdir datadir sysconfdir statedir cachedir logdir includedir \
-   libdir gprdir localedir mandir infodir miscdocdir runtimedir lockdir \
+   libdir alidir gprdir localedir mandir infodir miscdocdir runtimedir lockdir \
    objdir stagedir \
    install_cp_flags \
    ${options}
@@ -395,14 +397,17 @@ ifeq (${dirgpr},)
    all_directories += '-DLibexecdir="${call embed_pathname,${libexecdir}}"'
    all_directories += '-DIncludedir="${call embed_pathname,${includedir}}"'
    all_directories += '-DLibdir="${call embed_pathname,${libdir}}"'
+   all_directories += '-DAlidir="${call embed_pathname,${alidir}}"'
 
    all_directories += '-DStage_Bindir="${stage_bindir}"'
    all_directories += '-DStage_Libexecdir="${stage_libexecdir}"'
    all_directories += '-DStage_Includedir="${stage_includedir}"'
    all_directories += '-DStage_Libdir="${stage_libdir}"'
+   all_directories += '-DStage_Alidir="${stage_alidir}"'
 
    usage_directories = '-DIncludedir="${call usage_pathname,${includedir}}"' \
-                       '-DLibdir="${call usage_pathname,${libdir}}"'
+                       '-DLibdir="${call usage_pathname,${libdir}}"' \
+                       '-DAlidir="${call usage_pathname,${alidir}}"'
 
 else
 
@@ -417,10 +422,12 @@ else
    all_directories += '-DLibexecdir=${directories_project}.Libexecdir'
    all_directories += '-DIncludedir=${directories_project}.Includedir'
    all_directories += '-DLibdir=${directories_project}.Libdir'
+   all_directories += '-DAlidir=${directories_project}.Alidir'
 
    usage_directories = '-DDirectories_GPR="${dirgpr}"' \
                        '-DIncludedir=${directories_project}.Includedir' \
-                       '-DLibdir=${directories_project}.Libdir'
+                       '-DLibdir=${directories_project}.Libdir' \
+                       '-DAlidir=${directories_project}.Alidir'
 
 endif
 
-- 
cgit v1.2.3


From f0bbafed015258350f317558da62dd7be442be3c Mon Sep 17 00:00:00 2001
From: Björn Persson <bjorn@rombobjörn.se>
Date: Tue, 8 Oct 2013 20:05:56 +0200
Subject: Documented archincludedir.

---
 INSTALL        | 17 +++++++++++------
 manual.en.html | 48 ++++++++++++++++++++++++++++++++----------------
 2 files changed, 43 insertions(+), 22 deletions(-)

diff --git a/INSTALL b/INSTALL
index 5833d80..9353fe4 100644
--- a/INSTALL
+++ b/INSTALL
@@ -112,11 +112,6 @@ are relevant during the build:
  logdir
     The top-level directory for log files. Default: <localstatedir>/log
 
- includedir
-    The top-level directory for source files to be used in the compilation of
-    software using libraries, used only if no directories project is provided.
-    Default: <prefix>/include
-
  libdir
     The directory for binary libraries to be used by other software, and the
     top-level directory for other architecture-specific files, used for
@@ -128,6 +123,15 @@ are relevant during the build:
     files for this library, used only if no directories project is provided.
     Default: <libdir>
 
+ includedir
+    The top-level directory for source files to be used in the compilation of
+    software using libraries, used only if no directories project is provided.
+    Default: <prefix>/include
+
+ archincludedir
+    Like includedir but for architecture-specific source files, in case this
+    library must install such files. Default: <libdir>/include
+
  gprdir
     The directory for GNAT project files to be used in the building of software
     using libraries. If you set this to a directory that GPRbuild and Gnatmake
@@ -188,9 +192,10 @@ invoke Gnatprep. You may need to define them if you run Gnatprep manually.
  Statedir
  Cachedir
  Logdir
- Includedir
  Libdir
  Alidir
+ Includedir
+ Archincludedir
  GPRdir
  Localedir
  Mandir
diff --git a/manual.en.html b/manual.en.html
index 1a9e249..b27f463 100755
--- a/manual.en.html
+++ b/manual.en.html
@@ -280,12 +280,6 @@ to create the subdirectory under <var>stage_cachedir</var>.</p></li>
 install log files but you may want to create a separate subdirectory under
 <var>stage_logdir</var> if your program writes its own log files.</p></li>
 
-<li><p>Ada specifications, C headers and other source files that are needed for
-compilation of other software that uses your libraries shall be placed under
-<var>Comfignat.Stage_Includedir</var> by build project files, usually under a
-separate subdirectory. Usage project files shall get the directory from the
-preprocessor symbol <var>Includedir</var>.</p></li>
-
 <li><p>Binary libraries shall be placed in <var>Comfignat.Stage_Libdir</var>
 by build project files. Usage project files shall get the directory from the
 preprocessor symbol <var>Libdir</var>.</p></li>
@@ -301,6 +295,21 @@ subdirectory that ALI files are placed in when
 <var>alidir</var> = <var>libdir</var>.) Programs shall look for them under
 <var>Comfignat.Libdir</var>.</p></li>
 
+<li><p>Ada specifications, C headers and other source files that are needed for
+compilation of other software that uses your libraries shall be placed under
+<var>Comfignat.Stage_Includedir</var> by build project files, usually under a
+separate subdirectory. Usage project files shall get the directory from the
+preprocessor symbol <var>Includedir</var>. These files should normally be
+architecture-independent.</p></li>
+
+<li><p>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 <var>stage_archincludedir</var>.
+Usage project files shall get the directory from the preprocessor symbol
+<var>Archincludedir</var>.</p></li>
+
 <li><p>Comfignat puts usage project files in <var>stage_gprdir</var>.</p></li>
 
 <li><p>Locale-specific message catalogs shall be placed in the appropriate
@@ -341,10 +350,6 @@ target architecture.</dd>
 <dd>The top-level directory for programs that are intended to be run by other
 programs rather than by users.</dd>
 
-<dt><var>Includedir</var></dt>
-<dd>The top-level directory for source files to be used in the compilation of
-software using libraries.</dd>
-
 <dt><var>Libdir</var></dt>
 <dd>The directory for binary libraries to be used by other software, and the
 top-level directory for other architecture-specific files.</dd>
@@ -354,6 +359,16 @@ top-level directory for other architecture-specific files.</dd>
 Ada library information files.</dd>
 </dl>
 
+<dt><var>Includedir</var></dt>
+<dd>The top-level directory for architecture-independent source files to be
+used in the compilation of software using libraries.</dd>
+
+<dt><var>Archincludedir</var></dt>
+<dd>The parent of libraries' separate library-specific directories for
+architecture-specific source files to be used in the compilation of software
+using libraries, for any libraries that absolutely must install such
+files.</dd>
+
 <p>Here's an example of what a directories project may look like:</p>
 
 <pre class="example gpr">abstract project System_Directories is
@@ -369,18 +384,19 @@ Ada library information files.</dd>
    end case;
    Libdir := "/usr/" &amp; 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 &amp; "/include";
 
 end System_Directories;</pre>
 
 <p>This directories project belongs in a multiarch operating system where
 libraries are kept in either <var>/usr/lib</var> or <var>/usr/lib64</var>
 depending on which architecture they are compiled for. The directories project
-sets <var>Libdir</var> and <var>Alidir</var>
-to the right directory for the target architecture based
+sets <var>Libdir</var>, <var>Alidir</var> and <var>Archincludedir</var>
+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


From 1cd75d10b77fbf947957a32e7d79463ac92abf0c Mon Sep 17 00:00:00 2001
From: Björn Persson <bjorn@rombobjörn.se>
Date: Wed, 9 Oct 2013 17:17:00 +0200
Subject: Implemented archincludedir.

---
 comfignat.gpr.gp | 18 ++++++++++++++
 comfignat.mk     | 76 +++++++++++++++++++++++++++++++-------------------------
 2 files changed, 60 insertions(+), 34 deletions(-)

diff --git a/comfignat.gpr.gp b/comfignat.gpr.gp
index 6e5d7a8..7b53075 100644
--- a/comfignat.gpr.gp
+++ b/comfignat.gpr.gp
@@ -144,6 +144,15 @@ abstract project Comfignat is
       Includedir := Prefix & "/include";
    #end if;
 
+   -- If a library has installed architecture-specific source files to be used
+   -- in compilation, then those files may also be under a library-specific
+   -- subdirectory of Archincludedir.
+   #if Archincludedir'Defined then
+      Archincludedir := $Archincludedir;
+   #else
+      Archincludedir := Includedir;
+   #end if;
+
    -- Binary libraries and other architecture-specific files are under Libdir.
    #if Libdir'Defined then
       Libdir := $Libdir;
@@ -274,6 +283,15 @@ abstract project Comfignat is
       Stage_Includedir := Stagedir & Includedir;
    #end if;
 
+   -- If architecture-specific source files absolutely must be installed, then
+   -- those files may be placed under a library-specific subdirectory of
+   -- Stage_Archincludedir.
+   #if Stage_Archincludedir'Defined then
+      Stage_Archincludedir := $Stage_Archincludedir;
+   #else
+      Stage_Archincludedir := Stagedir & Archincludedir;
+   #end if;
+
    -- Binary libraries shall be installed in Stage_Libdir.
    #if Stage_Libdir'Defined then
       Stage_Libdir := $Stage_Libdir;
diff --git a/comfignat.mk b/comfignat.mk
index 7b3ccce..30e696e 100644
--- a/comfignat.mk
+++ b/comfignat.mk
@@ -92,23 +92,24 @@ localstatedir = ${prefix}/var
 # These variables are used in constructing the default values of the directory
 # variables below.
 
-bindir     = ${exec_prefix}/bin
-libexecdir = ${exec_prefix}/libexec
-datadir    = ${datarootdir}
-sysconfdir = ${prefix}/etc
-statedir   = ${localstatedir}/lib
-cachedir   = ${localstatedir}/cache
-logdir     = ${localstatedir}/log
-includedir = ${prefix}/include
-libdir     = ${exec_prefix}/lib
-alidir     = ${libdir}
-gprdir     = ${datarootdir}/gpr
-localedir  = ${datarootdir}/locale
-mandir     = ${datarootdir}/man
-infodir    = ${datarootdir}/info
-miscdocdir = ${datarootdir}/doc
-runtimedir = /run
-lockdir    = ${runtimedir}/lock
+bindir         = ${exec_prefix}/bin
+libexecdir     = ${exec_prefix}/libexec
+datadir        = ${datarootdir}
+sysconfdir     = ${prefix}/etc
+statedir       = ${localstatedir}/lib
+cachedir       = ${localstatedir}/cache
+logdir         = ${localstatedir}/log
+includedir     = ${prefix}/include
+archincludedir = ${includedir}
+libdir         = ${exec_prefix}/lib
+alidir         = ${libdir}
+gprdir         = ${datarootdir}/gpr
+localedir      = ${datarootdir}/locale
+mandir         = ${datarootdir}/man
+infodir        = ${datarootdir}/info
+miscdocdir     = ${datarootdir}/doc
+runtimedir     = /run
+lockdir        = ${runtimedir}/lock
 # These are the directories where different kinds of files will be located on
 # the target system.
 
@@ -142,21 +143,22 @@ srcdir := ${abspath ${dir ${lastword ${MAKEFILE_LIST}}}}
 # as the directory part of the last pathname in MAKEFILE_LIST – which is this
 # file since there is no include directive above this point.
 
-stage_bindir     = ${stagedir}${bindir}
-stage_libexecdir = ${stagedir}${libexecdir}
-stage_datadir    = ${stagedir}${datadir}
-stage_sysconfdir = ${stagedir}${sysconfdir}
-stage_statedir   = ${stagedir}${statedir}
-stage_cachedir   = ${stagedir}${cachedir}
-stage_logdir     = ${stagedir}${logdir}
-stage_includedir = ${stagedir}${includedir}
-stage_libdir     = ${stagedir}${libdir}
-stage_alidir     = ${stagedir}${alidir}
-stage_gprdir     = ${stagedir}${gprdir}
-stage_localedir  = ${stagedir}${localedir}
-stage_mandir     = ${stagedir}${mandir}
-stage_infodir    = ${stagedir}${infodir}
-stage_miscdocdir = ${stagedir}${miscdocdir}
+stage_bindir         = ${stagedir}${bindir}
+stage_libexecdir     = ${stagedir}${libexecdir}
+stage_datadir        = ${stagedir}${datadir}
+stage_sysconfdir     = ${stagedir}${sysconfdir}
+stage_statedir       = ${stagedir}${statedir}
+stage_cachedir       = ${stagedir}${cachedir}
+stage_logdir         = ${stagedir}${logdir}
+stage_includedir     = ${stagedir}${includedir}
+stage_archincludedir = ${stagedir}${archincludedir}
+stage_libdir         = ${stagedir}${libdir}
+stage_alidir         = ${stagedir}${alidir}
+stage_gprdir         = ${stagedir}${gprdir}
+stage_localedir      = ${stagedir}${localedir}
+stage_mandir         = ${stagedir}${mandir}
+stage_infodir        = ${stagedir}${infodir}
+stage_miscdocdir     = ${stagedir}${miscdocdir}
 # These are the directories where different kinds of files to be installed are
 # written during the build.
 
@@ -240,8 +242,9 @@ configuration_variables += \
    DESTDIR \
    dirgpr relocatable_package \
    prefix exec_prefix datarootdir localstatedir \
-   bindir libexecdir datadir sysconfdir statedir cachedir logdir includedir \
-   libdir alidir gprdir localedir mandir infodir miscdocdir runtimedir lockdir \
+   bindir libexecdir datadir sysconfdir statedir cachedir logdir \
+   includedir archincludedir libdir alidir gprdir \
+   localedir mandir infodir miscdocdir runtimedir lockdir \
    objdir stagedir \
    install_cp_flags \
    ${options}
@@ -396,16 +399,19 @@ ifeq (${dirgpr},)
    all_directories += '-DBindir="${call embed_pathname,${bindir}}"'
    all_directories += '-DLibexecdir="${call embed_pathname,${libexecdir}}"'
    all_directories += '-DIncludedir="${call embed_pathname,${includedir}}"'
+   all_directories += '-DArchincludedir="${call embed_pathname,${archincludedir}}"'
    all_directories += '-DLibdir="${call embed_pathname,${libdir}}"'
    all_directories += '-DAlidir="${call embed_pathname,${alidir}}"'
 
    all_directories += '-DStage_Bindir="${stage_bindir}"'
    all_directories += '-DStage_Libexecdir="${stage_libexecdir}"'
    all_directories += '-DStage_Includedir="${stage_includedir}"'
+   all_directories += '-DStage_Archincludedir="${stage_archincludedir}"'
    all_directories += '-DStage_Libdir="${stage_libdir}"'
    all_directories += '-DStage_Alidir="${stage_alidir}"'
 
    usage_directories = '-DIncludedir="${call usage_pathname,${includedir}}"' \
+                       '-DArchincludedir="${call usage_pathname,${archincludedir}}"' \
                        '-DLibdir="${call usage_pathname,${libdir}}"' \
                        '-DAlidir="${call usage_pathname,${alidir}}"'
 
@@ -421,11 +427,13 @@ else
    all_directories += '-DBindir=${directories_project}.Bindir'
    all_directories += '-DLibexecdir=${directories_project}.Libexecdir'
    all_directories += '-DIncludedir=${directories_project}.Includedir'
+   all_directories += '-DArchincludedir=${directories_project}.Archincludedir'
    all_directories += '-DLibdir=${directories_project}.Libdir'
    all_directories += '-DAlidir=${directories_project}.Alidir'
 
    usage_directories = '-DDirectories_GPR="${dirgpr}"' \
                        '-DIncludedir=${directories_project}.Includedir' \
+                       '-DArchincludedir=${directories_project}.Archincludedir' \
                        '-DLibdir=${directories_project}.Libdir' \
                        '-DAlidir=${directories_project}.Alidir'
 
-- 
cgit v1.2.3


From f4b3c51803cb6e0cb915e9e84129c6d9df3352cb Mon Sep 17 00:00:00 2001
From: Björn Persson <bjorn@rombobjörn.se>
Date: Wed, 9 Oct 2013 17:19:42 +0200
Subject: Moved some paragraphs back.

---
 INSTALL        | 22 +++++++++++-----------
 manual.en.html | 50 +++++++++++++++++++++++++-------------------------
 2 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/INSTALL b/INSTALL
index 9353fe4..5a45025 100644
--- a/INSTALL
+++ b/INSTALL
@@ -112,6 +112,15 @@ are relevant during the build:
  logdir
     The top-level directory for log files. Default: <localstatedir>/log
 
+ includedir
+    The top-level directory for source files to be used in the compilation of
+    software using libraries, used only if no directories project is provided.
+    Default: <prefix>/include
+
+ archincludedir
+    Like includedir but for architecture-specific source files, in case this
+    library must install such files. Default: <includedir>
+
  libdir
     The directory for binary libraries to be used by other software, and the
     top-level directory for other architecture-specific files, used for
@@ -123,15 +132,6 @@ are relevant during the build:
     files for this library, used only if no directories project is provided.
     Default: <libdir>
 
- includedir
-    The top-level directory for source files to be used in the compilation of
-    software using libraries, used only if no directories project is provided.
-    Default: <prefix>/include
-
- archincludedir
-    Like includedir but for architecture-specific source files, in case this
-    library must install such files. Default: <libdir>/include
-
  gprdir
     The directory for GNAT project files to be used in the building of software
     using libraries. If you set this to a directory that GPRbuild and Gnatmake
@@ -192,10 +192,10 @@ invoke Gnatprep. You may need to define them if you run Gnatprep manually.
  Statedir
  Cachedir
  Logdir
- Libdir
- Alidir
  Includedir
  Archincludedir
+ Libdir
+ Alidir
  GPRdir
  Localedir
  Mandir
diff --git a/manual.en.html b/manual.en.html
index b27f463..d46954d 100755
--- a/manual.en.html
+++ b/manual.en.html
@@ -280,21 +280,6 @@ to create the subdirectory under <var>stage_cachedir</var>.</p></li>
 install log files but you may want to create a separate subdirectory under
 <var>stage_logdir</var> if your program writes its own log files.</p></li>
 
-<li><p>Binary libraries shall be placed in <var>Comfignat.Stage_Libdir</var>
-by build project files. Usage project files shall get the directory from the
-preprocessor symbol <var>Libdir</var>.</p></li>
-
-<li><p>Ada library information (ALI) files shall be placed under a separate
-subdirectory of <var>Comfignat.Stage_Alidir</var> by build project files. Usage
-project files shall get the directory from the preprocessor symbol
-<var>Alidir</var>.</p></li>
-
-<li><p>Other architecture-specific files shall usually be placed under a
-separate subdirectory of <var>stage_libdir</var>. (It will be the same
-subdirectory that ALI files are placed in when
-<var>alidir</var> = <var>libdir</var>.) Programs shall look for them under
-<var>Comfignat.Libdir</var>.</p></li>
-
 <li><p>Ada specifications, C headers and other source files that are needed for
 compilation of other software that uses your libraries shall be placed under
 <var>Comfignat.Stage_Includedir</var> by build project files, usually under a
@@ -310,6 +295,21 @@ put them under a separate subdirectory of <var>stage_archincludedir</var>.
 Usage project files shall get the directory from the preprocessor symbol
 <var>Archincludedir</var>.</p></li>
 
+<li><p>Binary libraries shall be placed in <var>Comfignat.Stage_Libdir</var>
+by build project files. Usage project files shall get the directory from the
+preprocessor symbol <var>Libdir</var>.</p></li>
+
+<li><p>Ada library information (ALI) files shall be placed under a separate
+subdirectory of <var>Comfignat.Stage_Alidir</var> by build project files. Usage
+project files shall get the directory from the preprocessor symbol
+<var>Alidir</var>.</p></li>
+
+<li><p>Other architecture-specific files shall usually be placed under a
+separate subdirectory of <var>stage_libdir</var>. (It will be the same
+subdirectory that ALI files are placed in when
+<var>alidir</var> = <var>libdir</var>.) Programs shall look for them under
+<var>Comfignat.Libdir</var>.</p></li>
+
 <li><p>Comfignat puts usage project files in <var>stage_gprdir</var>.</p></li>
 
 <li><p>Locale-specific message catalogs shall be placed in the appropriate
@@ -350,6 +350,16 @@ target architecture.</dd>
 <dd>The top-level directory for programs that are intended to be run by other
 programs rather than by users.</dd>
 
+<dt><var>Includedir</var></dt>
+<dd>The top-level directory for (normally architecture-independent) source
+files to be used in the compilation of software using libraries.</dd>
+
+<dt><var>Archincludedir</var></dt>
+<dd>The parent of libraries' separate library-specific directories for
+architecture-specific source files to be used in the compilation of software
+using libraries, for any libraries that absolutely must install such
+files.</dd>
+
 <dt><var>Libdir</var></dt>
 <dd>The directory for binary libraries to be used by other software, and the
 top-level directory for other architecture-specific files.</dd>
@@ -359,16 +369,6 @@ top-level directory for other architecture-specific files.</dd>
 Ada library information files.</dd>
 </dl>
 
-<dt><var>Includedir</var></dt>
-<dd>The top-level directory for architecture-independent source files to be
-used in the compilation of software using libraries.</dd>
-
-<dt><var>Archincludedir</var></dt>
-<dd>The parent of libraries' separate library-specific directories for
-architecture-specific source files to be used in the compilation of software
-using libraries, for any libraries that absolutely must install such
-files.</dd>
-
 <p>Here's an example of what a directories project may look like:</p>
 
 <pre class="example gpr">abstract project System_Directories is
-- 
cgit v1.2.3