# $HeadURL$ $LastChangedRevision$ ifndef METHOD_SYMLINK_MK METHOD_SYMLINK_MK = 1 # Variables (needed by method-*.mk in pass #1 and the file-*.mk in pass #0) MAKEFILE_SYMLINK_RECIPES = $(PCMS_STATE_PREFIX)/makefiles/symlink-recipes.mk MAKEFILE_SYMLINK_FILES = $(PCMS_STATE_PREFIX)/makefiles/symlink-files.mk # Generate all recipes and recipe list (but they not be used by pass #0) ifeq ($(PCMS_PASS_NUM),1) all.facility: all.symlink # Check symbols we'll use in recipes below. # (none) all.symlink: force-execution-each-time msg --progname=$(PROGNAME) --debug=$(VERBOSELEVEL) debug 10 "$@: generating $(MAKEFILE_SYMLINK_RECIPES) ..." mkdir -p $(dir $(MAKEFILE_SYMLINK_RECIPES)) { \ echo '%.symlink:'; \ echo ' if symlink --debug=$$(VERBOSELEVEL) $$(patsubst %.symlink,%,$$@); then \'; \ echo ' touch $$@; \'; \ echo ' else \'; \ echo ' msg --progname=$$(PROGNAME) --debug=$$(VERBOSELEVEL) error "$$(patsubst %.symlink,%,$$@): symlink creation failed (hint: resolve this manually)"; \'; \ echo ' fi'; \ } > $(MAKEFILE_SYMLINK_RECIPES) msg --progname=$(PROGNAME) --debug=$(VERBOSELEVEL) debug 10 "$@: generating $(MAKEFILE_SYMLINK_FILES) ..." mkdir -p $(dir $(MAKEFILE_SYMLINK_FILES)) echo "SYMLINK_FILES = $(filter %.symlink,$^)" > $(MAKEFILE_SYMLINK_FILES) # Stop descent %.symlink: ; # 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_SYMLINK_RECIPES) include $(MAKEFILE_SYMLINK_FILES) # ... but it's up to the associated file-*.mk to demand that # $(SYMLINK_FILES) be built. endif # PCMS_PASS_NUM endif # METHOD_SYMLINK_MK