From: Lady Date: Mon, 5 Feb 2024 02:49:41 +0000 (-0500) Subject: Always run recipe if deps are empty X-Git-Tag: 0.1.1 X-Git-Url: https://git.ladys.computer/Caudex/commitdiff_plain/5408b1bbff67468dc300849ccd6f452097e6ebaf?ds=sidebyside;hp=5f391723082d6fbf7f8a586c81d81eeb3554ccbd Always run recipe if deps are empty While this may lead to unnecessary runs, it is better than never running the recipe when the deps are empty, which is the current behaviour. --- diff --git a/GNUmakefile b/GNUmakefile index a470b39..130312c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -181,7 +181,7 @@ override ensuredirectory = if $(TEST) ! -d $(call quote,$1); then $(MKDIR) -p $( # (callable) Test to see if the dependencies provided by the second argument matches the value in the file corresponding to the first argument in `$(BUILDDIR)/lastprereqs´. # If not, return the third argument, plus an additional rule to save the new prerequisites. -override makeandsavedeps = $(if $(subst $(shell $(CAT) $(call quote,$(BUILDDIR)/lastdeps/$1) 2> /dev/null || true),,$2),$3$(newline)$(silent)$(call ensuredirectory,$(BUILDDIR)/lastdeps)$(newline)$(silent)$(PRINTF) '%s\n' $(call quote,$2) > $(BUILDDIR)/lastdeps/$1,) +override makeandsavedeps = $(if $(or $(if $2,,1),$(subst $(shell $(CAT) $(call quote,$(BUILDDIR)/lastdeps/$1) 2> /dev/null || true),,$2)),$3$(newline)$(silent)$(call ensuredirectory,$(BUILDDIR)/lastdeps)$(newline)$(silent)$(PRINTF) '%s\n' $(call quote,$2) > $(BUILDDIR)/lastdeps/$1,) # (callable) Make the catalog for the provided category. override define makecategorycatalog