]> Lady’s Gitweb - Shushe/commitdiff
Touch important files before making with xsltproc
authorLady <redacted>
Sun, 28 Apr 2024 04:02:37 +0000 (00:02 -0400)
committerLady <redacted>
Mon, 29 Apr 2024 03:24:37 +0000 (23:24 -0400)
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.

GNUmakefile

index ab4bfb0e1c422dc56c113090df977a909f117466..cc2b123a689639ba6823d35485d01b0460d2c3b6 100644 (file)
@@ -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.
This page took 0.027823 seconds and 4 git commands to generate.