-# Pair each source file and include with its compiled location.
-override sourcecompiledpair = $(foreach file,$(sourcefiles) $(sourceincludes),$(file):$(call compiled,$(file)))
+# 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)/public/$(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))))