# $HeadURL$ $LastChangedRevision$ ifndef METHOD_AKENT METHOD_AKENT = 1 # Variables (needed by method-*.mk in pass #1 and the file-*.mk in pass #0) MAKEFILE_AKENT_RECIPES = $(PCMS_STATE_PREFIX)/makefiles/akent-recipes.mk MAKEFILE_AKENT_FILES = $(PCMS_STATE_PREFIX)/makefiles/akent-files.mk # Generate all recipes and recipe list (but they not be used by pass #0) ifeq ($(PCMS_PASS_NUM),1) all.facility: all.akent # Check symbols we'll use in recipes below. # (none) all.akent: force-execution-each-time msg --progname=$(PROGNAME) --debug=$(VERBOSELEVEL) debug 10 "$@: generating $(MAKEFILE_AKENT_RECIPES) ..." mkdir -p $(dir $(MAKEFILE_AKENT_RECIPES)) @# Due to bug #110, the directory part of akents always needs to be created in @# pass #1. This is so that when running pass #0 with '-t' the targets can be @# touched though the containing directories would not be created. for X in $^; do \ msg --progname=$(PROGNAME) --debug=$(VERBOSELEVEL) debug 10 "$$X; creating leading dirs so 'make -t' would work ..."; \ mkdir -p $$(dirname "$$X"); \ done set -e; \ { \ declare -A LOGINS; \ for X in $(patsubst %.akent,%,$(filter %.akent,$^)); do \ eval set -- $$(encode --decode "$$X"); \ LOGIN="$$1"; \ echo "$$X.akent: "; \ echo " mkdir -p \"\$$\$$(dirname \"\$$@\")\""; \ echo " akent --debug=\$$(VERBOSELEVEL) --touch --file=\$$@ \"$$X\""; \ echo; \ LOGINS[$$LOGIN]=1; \ done; \ } > $(MAKEFILE_AKENT_RECIPES) msg --progname=$(PROGNAME) --debug=$(VERBOSELEVEL) debug 10 "$@: generating $(MAKEFILE_AKENT_FILES) ..." mkdir -p $(dir $(MAKEFILE_AKENT_FILES)) set -e; \ { \ declare -A LOGINS; \ for X in $(patsubst %.akent,%,$(filter %.akent,$^)); do \ eval set -- $$(encode --decode "$$X"); \ LOGIN="$$1"; \ echo "AKENT_$${LOGIN}_FILES += $$X.akent"; \ LOGINS[$$LOGIN]=1; \ done; \ echo "AKENT_LOGINS = $${!LOGINS[@]}"; \ } > $(MAKEFILE_AKENT_FILES) # Stop descent %.akent: ; # method-*.mk does nothing in pass #0; see the associated file-*mk. else ifeq ($(PCMS_PASS_NUM),0) # But, since the associated file-*.mk doesn't know what the recipe targets # depend on, tell pass #0 to acquaint itself with how to make *those* here. # (none) # But, as a courtesy, we can load the recipes and recipe list ... include $(MAKEFILE_AKENT_RECIPES) include $(MAKEFILE_AKENT_FILES) # ... but it's up to the associated file-*.mk to demand that # $(AKENT_FILES) be built. endif # PCMS_PASS_NUM endif # METHOD_AKENT