]> Lady’s Gitweb - Caudex/blobdiff - GNUmakefile
Always run recipe if deps are empty
[Caudex] / GNUmakefile
index 5602ca0c82c778bcb74b2efafd4d336b49eca389..130312c188d17bb7c7fb8311be09493240f8a72b 100644 (file)
@@ -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
@@ -268,9 +268,9 @@ FORCE : ;
 # ─ ¶ Build Targets ───────────────────────────────────────────────────
 
 # Initialize the ⛩️📰 书社 repository if it is empty.
-$(SHUSHE)/GNUmakefile : %/GNUmakefile :
+$(SHUSHE)/GNUmakefile : $(THISDIR)/%/GNUmakefile :
        @$(PRINTF) '%s\n' $(call quote,Initializing git submodule at `$*´)
-       $(silent)$(GIT) submodule update --init $(call quote,$*)
+       $(silent)cd $(THISDIR) && $(GIT) submodule update --init $(call quote,$*)
 
 # Touch parsers and transforms if the files in `lib/´ have changed.
 $(PARSERS) $(TRANSFORMS) : $(wildcard lib/*.xslt)
This page took 0.020713 seconds and 4 git commands to generate.