# - - - - - - #
#             #
#   COLORS    #
#             #
# - - - - - - #

GRAY     = "\e[0;30m"
RED      = "\e[0;31m"
GREEN    = "\e[0;32m"
YELLOW   = "\e[0;33m"
BLUE     = "\e[0;34m"
PURPLE   = "\e[0;35m"
CYAN     = "\e[0;36m"
WHITE    = "\e[0;37m"

B_GRAY   = "\e[1;30m"
B_RED    = "\e[1;31m"
B_GREEN  = "\e[1;32m"
B_YELLOW = "\e[1;33m"
B_BLUE   = "\e[1;34m"
B_PURPLE = "\e[1;35m"
B_CYAN   = "\e[1;36m"
B_WHITE  = "\e[1;37m"

RESET    = "\e[0m"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
#               . name = value \          . += append to a variable   #
#   VARIABLES   .        value            . != set result of command  #
#               . name is case sensitive  . ?= set if not already set #
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #

D_QUINES  = ./1_Colleen \
						./2_Grace

RULE      = all

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
#             .   target: prerequisites   .   $@ : target             #
#    RULES    .           recipe          .   $< : 1st prerequisite   #
#             .           recipe          .   $^ : all prerequisites  #
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #

all:
	@$(MAKE) RULE=$@ loop

diff:
	@$(MAKE) RULE=$@ loop

leaks:
	@$(MAKE) RULE=$@ loop

clean:
	@$(MAKE) RULE=$@ loop

fclean:
	@$(MAKE) RULE=$@ loop

loop: $(D_QUINES)
	@for dir in $^; do \
		echo $(B_GREEN)"$(RULE) $$dir"$(RESET); \
		$(MAKE) $(RULE) -C $$dir; \
	done

re: fclean all

.PHONY : all clean fclean re loop

