Rombobjörn

summaryrefslogtreecommitdiff
path: root/comfignat.mk
diff options
context:
space:
mode:
Diffstat (limited to 'comfignat.mk')
-rw-r--r--comfignat.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/comfignat.mk b/comfignat.mk
index b5f0bf5..07ae8d2 100644
--- a/comfignat.mk
+++ b/comfignat.mk
@@ -471,9 +471,11 @@ preprocessed_files_in_builddir = ${addprefix ${builddir}/,${preprocessed_files}}
Comfignat_default_goal: build
+# How to make directories:
${builddir} ${stage_gprdir}:
mkdir -p $@
+# How to initialize a build directory with a delegating makefile:
${builddir}/Makefile: | ${builddir}
@echo 'Writing $@.'
@( echo 'Comfignat_default_goal: force ; ${delegation_command}'; \
@@ -488,6 +490,7 @@ ${builddir}/Makefile: | ${builddir}
# to the main makefile. An empty recipe for "Makefile" prevents Make from using
# the match-anything rule to update the makefile.
+# How to save configured variables:
configure:: ${builddir}/Makefile
@echo "Writing ${configuration}."
@( ${foreach variable,${configuration_variables}, \
@@ -510,20 +513,25 @@ 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 preprocess the project Comfignat:
${builddir}/comfignat.gpr: comfignat.gpr.gp | ${builddir}
"${GNATPREP}" $< $@ -DInvoked_By_Makefile ${all_directories}
+# How to preprocess files that are needed during the build:
${builddir}/%: %.gp | ${builddir}
${preprocess_file}
+# How to preprocess usage projects:
${stage_gprdir}/%: %.gp | ${stage_gprdir}
${preprocess_file}
+# How to stage usage projects that don't need preprocessing:
${stage_gprdir}/%: % | ${stage_gprdir}
cp -p $< $@
preprocess: $${preprocessed_files_in_builddir}
+# How to build a project:
%.gpr.phony_target: %.gpr preprocess
${build_GPR}
# Instead of tracking dependencies between project files, this rule simply
@@ -538,6 +546,7 @@ ${stagedir}:
# something has been built then "make install" doesn't rebuild anything, just
# copies the built files to their destination.
+# How to install what has been built and staged:
install: ${stagedir}
mkdir -p "${DESTDIR}/"
cp -RPf ${install_cp_flags} "${stagedir}"/* "${DESTDIR}/"