✨ ARCANUM RUNE DIFFICULTY: Apprentice Behavioral

The Encapsulated Command

Turn a request into a stand-alone executable target, parameterizing clients with different requests.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Command
ARCANUM SCHOOL: Enchantment // Scroll Scribing
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
# The Receiver
.PHONY: _db_migrate _db_rollback
_db_migrate:
	@echo "Applying chronomantic shifts to the database schema..."
_db_rollback:
	@echo "Reversing the flow of time on the database..."

# The Commands (Encapsulating the Receiver and Parameters)
.PHONY: cmd_migrate cmd_rollback
cmd_migrate: _db_migrate
cmd_rollback: _db_rollback

# The Invoker
# make execute CMD=cmd_migrate
CMD ?= cmd_migrate

.PHONY: execute
execute:
	@echo "Executing command scroll: $(CMD)"
	@$(MAKE) --no-print-directory $(CMD)
Runic Tags: #makefile #behavioral #command #execution