From: Lady <redacted>
Date: Wed, 22 May 2024 04:29:51 +0000 (-0400)
Subject: FORCE on type updates
X-Git-Tag: 0.9.1~1
X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/1b8607a9b87e197993fd6b699a570e268a288b08?ds=sidebyside;hp=5e96540e69e1b5bd59753284b26439419745168a

FORCE on type updates

When this was originally implemented, I’m not sure `FORCE` was defined,
but it’s needed now for `diffprereqs` so there’s no reason why not to
use it here as well.
---

diff --git a/GNUmakefile b/GNUmakefile
index f4161de..7a09b28 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -390,11 +390,11 @@ override localuri = $(foreach file,$1,$(patsubst $(file)|%,%,$(filter $(file)|%,
 # (callable) Get the source files for the given local uris.
 override sourcefile = $(foreach local,$1,$(patsubst %|$(local),%,$(filter %|$(local),$(sourcelocalpair))))
 
-# Adds a requirement on `$(BUILDDIR)/.update-types´ if the file is present.
+# Resolves to the `FORCE´ target if `$(BUILDDIR)/.update-types´ is present.
 #
-# This file is created after a reload due to type changes, and is removed after.
-# Requiring it ensures that file classifications are up·to·date immediately after the reload.
-override typeupdates := $(wildcard $(BUILDDIR)/.update-types)
+# This file is created before a reload due to type changes, and is removed after.
+# This ensures that file classifications are up·to·date immediately after the reload.
+override typeupdates := $(if $(wildcard $(BUILDDIR)/.update-types),FORCE,)
 
 # Pair each source file and include with its parsed location.
 override sourceparsedpair := $(foreach file,$(sourcefiles) $(sourceincludes),$(file)|$(BUILDDIR)/$(if $(filter $(file),$(sourceincludes)),includes/$(call includepath,$(file)),sources/$(call sourcepath,$(file))))