From: Lady Date: Sun, 28 Apr 2024 04:02:37 +0000 (-0400) Subject: Touch important files before making with xsltproc X-Git-Tag: 0.7.4~4 X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/9da40b115e830eba2bd4c27e5957a4b387d86d24?ds=sidebyside;hp=beb39322e5c5b6885ecf64b5dfebb27628801c87 Touch important files before making with xsltproc When there is nothing to output, `xsltproc` does not create files. However, Make will find itself in an endless restart loop if these files are never created. --- diff --git a/GNUmakefile b/GNUmakefile index ab4bfb0..cc2b123 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -584,6 +584,7 @@ $(BUILDDIR)/catalog : $(call diffprereqs,sources,$(sort $(sourcefiles) $(sourcei # Build a list of dependencies for each parsed file. $(BUILDDIR)/dependencies : $(BUILDDIR)/catalog $(call parsed,$(plaintextfiles) $(xmlfiles)) $(THISDIR)/lib/catalog2dependencies.xslt @$(ECHO) "Identifying dependencies…" + $(silent)$(TOUCH) $(call quote,$@) $(silent)$(XSLTPROC) --nonet --novalid -o $(call quote,$@) $(call quote,$(THISDIR)/lib/catalog2dependencies.xslt) $(call quote,$<) # Generate a catalog of destinations for files. @@ -592,6 +593,7 @@ $(BUILDDIR)/dependencies : $(BUILDDIR)/catalog $(call parsed,$(plaintextfiles) $ # It does not require knowing the dependencies. $(BUILDDIR)/destinations : $(BUILDDIR)/catalog $(call parsed,$(filter-out $(assetfiles),$(sourcefiles))) $(THISDIR)/lib/catalog2destinations.xslt @$(ECHO) "Identifying output destinations…" + $(silent)$(TOUCH) $(call quote,$@) $(silent)$(XSLTPROC) --nonet --novalid -o $(call quote,$@) $(call quote,$(THISDIR)/lib/catalog2destinations.xslt) $(call quote,$<) # Generate the main transform.