Summoning Method
Defer the exact instantiation of a target to its sub-makefiles or pattern rules.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Factory Method
ARCANUM SCHOOL: Conjuration // Metamagic
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
# The Factory Method pattern implemented via Pattern Rules
# The Creator interface requests a product
.PHONY: spawn_demon spawn_angel
spawn_demon: entity-demon
spawn_angel: entity-angel
# The Factory Method itself: a pattern rule that dynamically instantiates
# based on the requested stem (%)
entity-%:
@echo "Drawing the summoning circle for a $*..."
@echo "Binding $* to the material plane."
@touch $@
.PHONY: clean
clean:
@rm -f entity-*
Runic Tags:
#makefile
#creational
#factory-method
#pattern-rules