]> Lady’s Gitweb - Shushe/commitdiff
Consider destinations akin to dependencies
authorLady <redacted>
Mon, 22 Jan 2024 01:10:39 +0000 (20:10 -0500)
committerLady <redacted>
Mon, 22 Jan 2024 01:10:39 +0000 (20:10 -0500)
There were a couple statements which predate the addition of the
destinations file which check for or remove the dependencies file.
These two files should be considered interchangable for the purpose of
this kind of detection, i·e their impact on make·file rebuilding.

GNUmakefile

index 1b82c08837056c7deeb1fa215455c57a0da13f8b..79049c848aee37ac7e68c97d908f9d41237c8b19 100644 (file)
@@ -386,12 +386,12 @@ $(call compiled,$(recursivefiles)):
 # Phony rules; always consider these out·of·date.
 .PHONY: all default clean gone info install list uninstall $(call compiled,$(recursivefiles));
 
-ifneq ($(wildcard $(BUILDDIR)/.update-types)$(wildcard $(BUILDDIR)/dependencies),)
-# Reload this make·file if the dependency graph has changed.
+ifneq ($(wildcard $(BUILDDIR)/.update-types)$(wildcard $(BUILDDIR)/dependencies)$(wildcard $(BUILDDIR)/destinations),)
+# Reload this make·file if the dependency graph or output destinations have changed.
 #
 # The dependency graph and output destinations are used to set the values of variables in this make·file, so it’s important to ensure that they are actually up·to·date prior to executing any later rules.
 #
-# This recipe only exists after types have been updated or when the dependency graph already exists.
+# This recipe only exists after types have been updated or when the dependency graph or destinations file already exists.
 $(THISDIR)/GNUmakefile:: $(BUILDDIR)/dependencies $(BUILDDIR)/destinations
        $(silent)$(TOUCH) $(THISDIR)/GNUmakefile
        $(silent)$(RM) -f $(BUILDDIR)/.update-types
@@ -406,7 +406,7 @@ ifeq ($(wildcard $(BUILDDIR)/.update-types),)
 # This recipe sleeps for one second to ensure that files built after the restart have a more current time·stamp.
 $(THISDIR)/GNUmakefile:: $(BUILDDIR)/magic.mgc $(BUILDDIR)/parser.xslt
        $(silent)$(TOUCH) $(THISDIR)/GNUmakefile
-       $(silent)$(RM) -f $(call quote,$(BUILDDIR)/dependencies)
+       $(silent)$(RM) -f $(call quote,$(BUILDDIR)/dependencies) $(call quote,$(BUILDDIR)/destinations)
        @$(PRINTF) '%b\n' '\0033[1mMagic file or parsers have updated. Restarting…\0033[22m'
        $(silent)$(SLEEP) 1
        $(silent)$(TOUCH) $(call quote,$(BUILDDIR)/.update-types)
This page took 0.02486 seconds and 4 git commands to generate.