diff options
Diffstat (limited to 'comfignat.mk')
-rw-r--r-- | comfignat.mk | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/comfignat.mk b/comfignat.mk index a9847a8..c355a7d 100644 --- a/comfignat.mk +++ b/comfignat.mk @@ -148,6 +148,10 @@ relocatable_package = false # breaking the project files. # dirgpr takes precedence over relocatable_package. +library_type = dynamic +# If a library can be built as either shared or static, then library_type shall +# be used to set the attribute Library_Kind in the project files. + prefix = /usr/local exec_prefix = ${prefix} datarootdir = ${prefix}/share @@ -268,14 +272,14 @@ Make_miscdocdir = ${call Make_pathname,stage_miscdocdir} preprocess_file = "${GNATPREP}" ${firstword ${filter %.gp,$^}} $@ \ ${options_preprocessing} ${Gnatprep_arguments} \ ${if ${filter ${notdir $@},${notdir ${usage_GPRs}}}, \ - ${usage_directories}, \ + ${usage_directories} '-DLibrary_Type="${library_type}"', \ '-DSrcdir="${srcdir}"'} \ ${GNATPREPFLAGS} # preprocess_file is a command for use in recipes. It runs the first .gp file # among the rule's prerequisites through Gnatprep to produce the target. If the -# target is a usage project, then the usage-relevant directory variables are -# conveyed to it as Gnatprep symbols. Otherwise srcdir is conveyed, as it's -# needed by preprocessed build projects. +# target is a usage project, then the usage-relevant variables are conveyed to +# it as Gnatprep symbols. Otherwise srcdir is conveyed, as it's needed by +# preprocessed build projects. build_GPR = "${GNAT_BUILDER}" -P ${firstword ${filter %.gpr,$^}} \ ${addprefix -aP,${VPATH}} -p \ @@ -407,7 +411,7 @@ configuration_variables += \ GNATPREPFLAGS GNAT_BUILDER_FLAGS ADAFLAGS CPPFLAGS CFLAGS CXXFLAGS FFLAGS \ GNATBINDFLAGS GNATLINKFLAGS LDFLAGS GNATFLAGS \ DESTDIR \ - dirgpr relocatable_package \ + dirgpr relocatable_package library_type \ prefix exec_prefix datarootdir localstatedir \ bindir libexecdir \ datadir sysconfdir statedir cachedir logdir runstatedir lockdir \ @@ -692,7 +696,8 @@ show_configuration:: # How to preprocess the project Comfignat: ${Make_builddir}/comfignat.gpr: comfignat.gpr.gp | ${Make_builddir}/ - "${GNATPREP}" $< $@ -DInvoked_By_Makefile ${all_directories} ${GNATPREPFLAGS} + "${GNATPREP}" $< $@ -DInvoked_By_Makefile ${all_directories} \ + '-DLibrary_Type="${library_type}"' ${GNATPREPFLAGS} # How to preprocess files that are needed during the build: ${Make_builddir}/%: %.gp | ${Make_builddir}/ |