+unpublished:
+ test -d $@ || mkdir $@
+
+# Package lists are dynamically updated, to record the latest issues of each
+# referenced package catalogue; the "sed" script used to accomplish this must
+# be generated, and driven from, within the top build directory. Similarly,
+# the procedure for publishing updated catalogues to the file release system
+# must be directed to the top build directory, to process the entire tree.
+#
+published update-references issue.sed: FORCE
+ cd ${top_builddir}; $(MAKE) $@
+
+# Requests to update references will be redirected back to each sub-directory
+# in turn, to be processed by the following recursive make rule.
+#
+update-local-references: unpublished issue.sed
+ rm -rf tmp; mkdir tmp; rm -f issue.tmp
+ sed '/^$(TAB)*$$/d;/^$(TAB)*#/d' $(issue_log) > issue.new
+ @for catalogue in `grep -l 'catalogue=' ${srcdir}/*.xml`; \
+ do refname=`echo $$catalogue | sed 's,^${srcdir}/,,'` \
+ issue=`awk '$$3 == "'$$refname'" { print $$2 }' issue.new`; \
+ $(RMAKE) refname=$$refname issue=$$issue generate-reference; \
+ lzma -dc $$refname.lzma | cmp -s - tmp/$$refname || \
+ { $(update_issue_number); \
+ $(RMAKE) dir=${top_builddir} issue.chk; \
+ $(RMAKE) refname=$$refname issue=$$issue \
+ hash=`$(sha1hash)` issue.tmp; \
+ $(RMAKE) catalogue=$$refname.lzma source=$$catalogue \
+ issue=$$issue generate-catalogue; \
+ $(RMAKE) refname=$$refname.lzma select-for-publication; \
+ }; \
+ done
+ @test -f issue.tmp && $(RMAKE) update-issue-log || true
+ rm -f ${top_builddir}/issue.sed issue.new issue.tmp
+ rm -rf tmp
+
+# The preceding rules for compiling catalogues for publication, and resolving
+# "package-list" references, use several recursive make hooks to perform common
+# sub-tasks. GNU make tends to be very verbose about entering and leaving the
+# directories in which these sub-tasks are performed, even when there is no
+# change of directory involved; to make it quieter, we prefer this form of
+# recursive invocation for local sub-tasks.
+#
+RMAKE = $(MAKE)@NO_PRINT_DIRECTORY@
+
+# The following sub-task rule creates a tentative "publication-ready" version
+# of each catalogue.
+#
+generate-catalogue: FORCE
+ sed $(generate_catalogue) $(source) \
+ | lzma -c > $(catalogue)
+
+# The following sub-task rule creates a reference copy of each catalogue, for
+# comparison with the tentative "publication-ready" version, when checking for
+# changes introduced by resolution of "package-list" references.
+#
+generate-reference: FORCE
+ sed $(generate_catalogue) ${srcdir}/$(refname) \
+ > tmp/$(refname)
+
+# When any generated catalogue has been found to differ from its previously
+# published version, (if any), the following rule adds it to the schedule of
+# catalogues which should be republished, (or published for the first time).
+#
+select-for-publication: FORCE
+ cd unpublished && $(LN_S) -f ../$(refname) .
+
+# The remaining macros and rules define the sub-tasks for management of the
+# temporary files used to control the iterative resolution of "package-list"
+# references, and to capture modifications to be recorded in the issue log...
+#
+extract_log_file_header = '/^$(TAB)*$$/q;/^$(TAB)*[^\#]/q;p'
+extract_log_file_footer = 's/^$(TAB)*$$/break/;1,/^$(TAB)*[^\#]/d;/^$(TAB)*\#/p'
+
+issue.chk: FORCE
+ test -f issue.tmp && mv -f issue.tmp issue.new || true
+ test -f ${dir}/$@ && echo check > ${dir}/$@ || true
+
+issue.new: FORCE
+issue.tmp: issue.new
+ awk '$$3 != "$(refname)"' $^ > $@
+ echo $(PAD)$(hash) $(issue) $(refname) >> $@
+
+# ...with this final rule completing the recording of the current state of
+# publication, in the permanent issue log files.
+#
+update-issue-log: FORCE
+ sed -n $(extract_log_file_header) $(issue_log) > issue.new
+ LC_COLLATE=POSIX sort -k3 issue.tmp >> issue.new;
+ sed -n $(extract_log_file_footer) $(issue_log) >> issue.new;
+ rm -f $(issue_log) && mv issue.new $(issue_log)
+
+# The following goals may be specified, when building as a sub-project
+# of mingw-get-setup; make each a no-op here.
+#
+NO_OP_GOALS = build.tag dist clean distclean maintainer-clean
+.PHONY: $(NO_OP_GOALS)
+$(NO_OP_GOALS):