+ $(silent)$(call ensuredirectory,$(BUILDDIR)/files)
+ $(silent)$(CD) $(call quote,$(BUILDDIR)/files); if $(call xpath,/*/@*[local-name()="expanded" and namespace-uri()="urn:fdc:ladys.computer:20231231:Shu1She4"],$(abspath $<)); then $(MKDIR) -p $(call quote,$(abspath $@)); $(PRINTF) '$(if $(archivefiles),%s\n,)' $(foreach file,$(archivefiles),$(call quote,$(file))) | $(PAX) -r -w $(call quote,$(abspath $@)); else $(PRINTF) '$(if $(archivefiles),%s\n,)' $(foreach file,$(archivefiles),$(call quote,$(file))) | $(PAX) -w -x ustar >|$(call quote,$(abspath $@)); fi
+
+# ━ § BEGIN INITIAL MAKE·FILE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+else ifeq ($(MODE),urn:fdc:ladys.computer:20231231:Shu1She4:mode:initial)
+
+# ─ ¶ Non‐Recipe Variable Definitions ─────────────────────────────────
+
+# Non·empty if this is a two‐step build.
+override twostep := $(if $(DATADIR),$(shell if $(TEST) -d $(call quote,$(DATADIR)); then $(PRINTF) '%s\n' '1'; fi),)
+
+# Pair each source magic file with its location in the build directory.
+override magicpair := $(foreach magicfile,$(MAGIC),$(magicfile)|$(BUILDDIR)/magic/$(call namehash,$(magicfile)))
+
+# (callable) Get the source file for the given magic files.
+override magicsource = $(foreach magicpath,$1,$(patsubst %|$(magicpath),%,$(firstword $(filter %|$(magicpath),$(magicpair)))))
+
+# (callable) Get the build file for the given magic files.
+override magicfile = $(foreach file,$1,$(patsubst $(file)|%,%,$(filter $(file)|%,$(magicpair))))
+
+# Pair each parser with its file u·r·i.
+override fileuripairs := $(join $(patsubst %,%|,$(PARSERS)),$(call pathenc,$(foreach uriable,$(PARSERS),file://$(abspath $(uriable)))))
+
+# (callable) Get the file u·r·is for the given parsers.
+override fileuri = $(foreach file,$1,$(or $(patsubst $(file)|%,%,$(filter $(file)|%,$(fileuripairs))),$(error Unable to get file u·r·i for `$(file)´)))
+
+ifeq ($(twostep),)
+# (overridable) Options to use when calling ⛩📰 书社.
+shusheopts := MODE='urn:fdc:ladys.computer:20231231:Shu1She4:mode:default'
+else
+# (overridable) Options to use when calling ⛩📰 书社 the first time.
+shushedataopts := INCLUDEDIR=$(call quote,$(DATADIR)) BUILDDIR=$(call quote,$(BUILDDIR)/data) FINDRULES=$(subst $$,$$$$,$(call quote,$(FINDRULES) -a '(' $(FINDDATARULES) ')')) FINDINCLUDERULES=$(subst $$,$$$$,$(call quote,$(FINDINCLUDERULES))) MODE='urn:fdc:ladys.computer:20231231:Shu1She4:mode:default'
+
+# (overridable) Options to use when calling ⛩📰 书社 the second time.
+shushesiteopts := INCLUDEDIR=$(call quote,$(INCLUDEDIR) $(BUILDDIR)/data/public) BUILDDIR=$(call quote,$(BUILDDIR)/site) FINDRULES=$(subst $$,$$$$,$(call quote,$(FINDRULES) -a '!' '(' $(FINDDATARULES) ')')) FINDINCLUDERULES=$(subst $$,$$$$,$(call quote,$(FINDINCLUDERULES))) MODE='urn:fdc:ladys.computer:20231231:Shu1She4:mode:default'
+endif
+
+# ─ ¶ Recipe Variable Definitions ─────────────────────────────────────
+
+# ─ ¶ Phony Targets ───────────────────────────────────────────────────
+
+ifeq ($(twostep),)
+all install list listout uninstall : $(BUILDDIR)/magic.mgc $(BUILDDIR)/parser.xslt
+ @$(MAKE) -f $(call quote,$(makefile)) $@ $(shusheopts)
+else
+all : $(BUILDDIR)/site/magic.mgc $(BUILDDIR)/site/parser.xslt data
+ @$(MAKE) -f $(call quote,$(makefile)) $@ $(shushesiteopts)
+install uninstall : all
+ @$(MAKE) -f $(call quote,$(makefile)) $@ $(shushedataopts)
+ @$(MAKE) -f $(call quote,$(makefile)) $@ $(shushesiteopts)
+list : $(BUILDDIR)/site/magic.mgc $(BUILDDIR)/site/parser.xslt data
+ @$(PRINTF) '%b' $(call quote,\0033[1;7m||Stage|1:||\0033[22;27m\0033[4m||||||||||||||||||||\0033[24m ) | $(TR) ' |' '\n '
+ @$(MAKE) -f $(call quote,$(makefile)) $@ $(shushedataopts)
+ @$(PRINTF) '%b' $(call quote, \0033[1;7m||Stage|2:||\0033[22;27m\0033[4m||||||||||||||||||||\0033[24m ) | $(TR) ' |' '\n '
+ @$(MAKE) -f $(call quote,$(makefile)) $@ $(shushesiteopts)
+listout : $(BUILDDIR)/site/magic.mgc $(BUILDDIR)/site/parser.xslt data
+ @{ $(MAKE) -f $(call quote,$(makefile)) $@ $(shushedataopts); $(MAKE) -f $(call quote,$(makefile)) $@ $(shushesiteopts); } | $(SED) '$$!s/$$/ /' | $(TR) -d '\n'
+list1 listout1 : %1 : $(BUILDDIR)/data/magic.mgc $(BUILDDIR)/data/parser.xslt
+ @$(MAKE) -f $(call quote,$(makefile)) $* $(shushedataopts)
+list2 listout2 : %2 : $(BUILDDIR)/site/magic.mgc $(BUILDDIR)/site/parser.xslt data
+ @$(MAKE) -f $(call quote,$(makefile)) $* $(shushesiteopts)
+endif
+
+# Destroy buildfiles.
+clean :
+ $(if $(BUILDDIR),$(silent)$(RM) -f -R $(call quote,$(BUILDDIR)/),)
+
+ifneq ($(twostep),)
+# Build the data and remove outdated data files.
+data : $(BUILDDIR)/data.out
+ $(silent)$(FIND) $(call quote,$(BUILDDIR)/data/public) '!' -exec $(GREP) -F -q -x '{}' $(call quote,$<) ';' -a '(' -type d -o -print ')' | $(xargsmultiquote) | $(XARGS) -E '' $(RM)
+endif
+
+# Provide help.
+help :
+ @$(PRINTF) '%b' '$(subst $(newline),\n,$(makefileinfo))'
+
+# Destroy build directory and installed files.
+gone : uninstall clean ;
+
+# Add as a prerequisite to treat the target as tho it were phony.
+FORCE : ;
+
+# ─ ¶ Special Targets ─────────────────────────────────────────────────
+
+# Perform secondary expansion; this enables pattern rules to determine their prerequisites based on the matched pattern.
+.SECONDEXPANSION : ;
+
+# Don’t use any implicit rules.
+.SUFFIXES : ;
+
+# Phony rules; always consider these out·of·date.
+.PHONY : FORCE all clean gone install list listout uninstall$(if $(DATADIR), data list1 listout1 list2 listout2,) ;
+
+# ─ ¶ Build Targets ───────────────────────────────────────────────────
+
+# Create symbolic links from the build directory’s store of magic files to their corresponding sources.
+$(call magicfile,$(MAGIC)) : $(BUILDDIR)/magic/% : $$(call magicsource,$$@)
+ $(silent)$(call ensuredirectory,$(dir $@))
+ $(silent)$(LN) -sf $(call quote,$(realpath $<)) $(call quote,$@)
+
+# Generate the compiled magic file from its sources.
+#
+# It must be updated if any of the files in the magic directory change.
+$(BUILDDIR)/magic.mgc : $(call diffprereqs,magic,$(sort $(call magicfile,$(MAGIC))))
+ $(foreach outdated,$(filter-out $^,$(wildcard $(BUILDDIR)/magic/*)),$(silent)$(RM) $(call quote,$(outdated))$(newline))
+ $(call inform,$(PRINTF) '%s\n' 'Compiling new magic…' >&2)
+ $(silent)$(call ensuredirectory,$(dir $@))
+ $(silent)$(CD) $(call quote,$(BUILDDIR)) && $(FILE) -C -m $(call quote,$(realpath $(BUILDDIR)/magic))
+ $(silent)$(TOUCH) $(call quote,$(BUILDDIR)/.update-types)
+
+# Generate the main parser.
+$(BUILDDIR)/parser.catalog : $(call diffprereqs,parsers,$(sort $(PARSERS)))
+ $(call inform,$(PRINTF) '%s\n' 'Generating catalog of parsers…' >&2)
+ $(silent)$(XMLCATALOG) --create --noout $(call quote,$@)
+ $(foreach parser,$(PARSERS),$(silent){ $(call id,$(parser)); $(PRINTF) '%s\n' $(call quote,$(call fileuri,$(parser))) '--noout' $(call quote,$@); } | $(xargsmultiquote) | $(XARGS) -E '' $(XMLCATALOG) --add uri$(newline))
+$(BUILDDIR)/parser.xslt : $(BUILDDIR)/parser.catalog $(THISDIR)/lib/catalog2parser.xslt
+ $(call inform,$(PRINTF) '%s\n' 'Generating main parser…' >&2)
+ $(silent)$(XSLTPROC) --nonet --novalid --nomkdir --nowrite $(call quote,$(THISDIR)/lib/catalog2parser.xslt) $(call quote,$<) >|$(call quote,$@)
+ $(silent)$(TOUCH) $(call quote,$(BUILDDIR)/.update-types)
+
+ifneq ($(twostep),)
+$(BUILDDIR)/data/magic.mgc $(BUILDDIR)/data/parser.xslt : $(BUILDDIR)/data/% : $(BUILDDIR)/$$*
+ $(silent)$(call ensuredirectory,$(dir $@))
+ $(silent)$(LN) -sf $(call quote,$(realpath $<)) $(call quote,$@)
+$(BUILDDIR)/site/magic.mgc $(BUILDDIR)/site/parser.xslt : $(BUILDDIR)/site/% : $(BUILDDIR)/$$*
+ $(silent)$(call ensuredirectory,$(dir $@))
+ $(silent)$(LN) -sf $(call quote,$(realpath $<)) $(call quote,$@)
+$(BUILDDIR)/data.out : $(BUILDDIR)/data/magic.mgc $(BUILDDIR)/data/parser.xslt FORCE
+ @$(MAKE) -f $(call quote,$(makefile)) $(shushedataopts)
+ @$(MAKE) -s -f $(call quote,$(makefile)) listout QUIET=1 $(shushedataopts) | $(TR) ' ' '\n' | $(xargsmultiquote) | $(XARGS) -E '' $(PRINTF) $(call quote,$(BUILDDIR)/data/public/%s\n) >$(call quote,$(BUILDDIR)/data.out)
+endif
+
+ifeq ($(twostep),)
+$(BUILDDIR)/lastprereqs/% : ;
+$(BUILDDIR)/% : $(BUILDDIR)/magic.mgc $(BUILDDIR)/parser.xslt FORCE
+ @$(MAKE) -f $(call quote,$(makefile)) $(call quote,$@) $(shusheopts)
+$(DESTDIR)/% : $(BUILDDIR)/magic.mgc $(BUILDDIR)/parser.xslt FORCE
+ @$(MAKE) -f $(call quote,$(makefile)) $(call quote,$@) $(shusheopts)
+else
+$(BUILDDIR)/data/% : $(BUILDDIR)/data/magic.mgc $(BUILDDIR)/data/parser.xslt FORCE
+ @$(MAKE) -f $(call quote,$(makefile)) $(call quote,$@) $(shushedataopts)
+$(BUILDDIR)/site/% : $(BUILDDIR)/site/magic.mgc $(BUILDDIR)/site/parser.xslt data
+ $(silent)$(call ensuredirectory,$(dir $@))
+ @$(MAKE) -f $(call quote,$(makefile)) $(call quote,$@) $(shushesiteopts)
+$(DESTDIR)/% : $(BUILDDIR)/site/magic.mgc $(BUILDDIR)/site/parser.xslt data
+ @$(MAKE) -f $(call quote,$(makefile)) $(call quote,$@) $(if $(shell $(GREP) -F -x $(call quote,$(BUILDDIR)/data/$*) $(BUILDDIR)/data.out),$(shushedataopts),$(shushesiteopts))
+endif