Rombobjörn

summaryrefslogtreecommitdiff
path: root/comfignat.mk
diff options
context:
space:
mode:
authorBjörn Persson <bjorn@rombobjörn.se>2013-08-26 00:20:48 +0200
committerBjörn Persson <bjorn@rombobjörn.se>2013-08-26 00:20:48 +0200
commit3d2869477759bc05b9f91b44544c55c610d48625 (patch)
treee5a922881d22cdd92219230cf02d5fcf7a0008f2 /comfignat.mk
parent98656d5ea6079457992eb779787d7be51ab2917a (diff)
Made it easier to view the configuration.
Diffstat (limited to 'comfignat.mk')
-rw-r--r--comfignat.mk18
1 files changed, 13 insertions, 5 deletions
diff --git a/comfignat.mk b/comfignat.mk
index 15fb467..7916743 100644
--- a/comfignat.mk
+++ b/comfignat.mk
@@ -266,11 +266,11 @@ ifeq (${origin builddir},command line)
endif
ifeq (${origin objdir},command line)
override objdir := ${abspath ${objdir}}
- objdir_is_configured = true
+ objdir_is_overridden = true
endif
ifeq (${origin stagedir},command line)
override stagedir := ${abspath ${stagedir}}
- stagedir_is_configured = true
+ stagedir_is_overridden = true
endif
# These pathnames need to be absolute in project files, because a pathname
# relative to a project file can be wrong when a separate build directory is
@@ -278,7 +278,7 @@ endif
# stagedir also need to be absolute in the configuration file because the
# working directory might change between Make invocations.
# Once modified the variables are no longer of command line origin, so they are
-# marked as configured so that "make configure" will save them.
+# marked as overridden so that "make configure" will save them.
#
@@ -499,11 +499,13 @@ configure:: ${builddir}/Makefile
@( ${foreach variable,${configuration_variables}, \
${if ${or ${findstring command line, \
${origin ${variable}}}, \
+ ${filter true,${${variable}_is_overridden}}, \
${filter true,${${variable}_is_configured}}}, \
echo 'ifneq "$${origin ${variable}}" "command line"';\
- echo 'override ${variable} = ${value ${variable}}'; \
+ echo ' override ${variable} = ${value ${variable}}';\
echo 'endif'; \
- echo '${variable}_is_configured = true';}} \
+ echo '${variable}_is_configured = true'; \
+ echo;}} \
true \
) > "${configuration}"
# Out of the variables listed in configuration_variables, all that were
@@ -516,6 +518,12 @@ configure:: ${builddir}/Makefile
# side effect of this it is possible to delete a variable V from the
# configuration by running "make configure V_is_configured=false".
+# How to show the values of configured variables:
+show_configuration::
+ @${foreach variable,${configuration_variables}, \
+ ${if ${filter true,${${variable}_is_configured}}, \
+ echo '${variable} = ${value ${variable}}';}}
+
# How to preprocess the project Comfignat:
${builddir}/comfignat.gpr: comfignat.gpr.gp | ${builddir}
"${GNATPREP}" $< $@ -DInvoked_By_Makefile ${all_directories}