+# Collect all files which can be installed.
+#
+# This is all of the comilable files and all asset sources.
+override installablefiles := $(compilablefiles) $(filter $(assetfiles),$(sourcefiles))
+
+ifneq ($(wildcard $(BUILDDIR)/destinations),)
+# Get the output of the destination transform.
+override destinations := $(shell $(CAT) $(BUILDDIR)/destinations)
+
+# Pair source files and their destinations.
+override sourcedestinationpair := $(foreach destination,$(destinations),$(call sourcefile,$(firstword $(subst |, ,$(destination))))|$(call perdec,$(subst $(space),|,$(wordlist 2,$(words $(subst |, ,$(destination))),$(subst |, ,$(destination))))))
+
+# (callable) Get the destination for the given source files.
+override destination = $(foreach file,$1,$(patsubst $(file)|%,%,$(filter $(file)|%,$(sourcedestinationpair))))
+
+# Pair each source file with its compiled location.
+override sourcecompiledpair := $(foreach file,$(sourcefiles),$(file)|$(BUILDDIR)/results/$(call destination,$(file)))
+
+# (callable) Get the location of the transformed X·M·L files for the given source files.
+override compiled = $(foreach file,$1,$(patsubst $(file)|%,%,$(filter $(file)|%,$(sourcecompiledpair))))
+
+# (callable) Get the location of the source files for the given compiled file.
+override uncompiled = $(foreach file,$1,$(patsubst %|$(file),%,$(filter %|$(file),$(sourcecompiledpair))))
+
+# (callable) Get the location of the final built files for the given source files.
+override built = $(foreach file,$1,$(patsubst $(BUILDDIR)/results/%,$(BUILDDIR)/public/%,$(call compiled,$(file))))
+
+# (callable) Get the location of the source files for the given built files.
+override unbuilt = $(foreach file,$1,$(call uncompiled,$(patsubst $(BUILDDIR)/public/%,$(BUILDDIR)/results/%,$(file))))