diff options
-rw-r--r-- | comfignat.gpr.gp | 18 | ||||
-rw-r--r-- | 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' |