Skip to content

Instantly share code, notes, and snippets.

@joshcummingsdesign
Created June 6, 2018 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshcummingsdesign/12d6f118eb336f77fc3094d691fbf717 to your computer and use it in GitHub Desktop.
Save joshcummingsdesign/12d6f118eb336f77fc3094d691fbf717 to your computer and use it in GitHub Desktop.
Makefile Example
THIS_FILE := $(lastword $(MAKEFILE_LIST))
all: help
coffee:
@echo "☕ Making some coffee! ☕"
@$(MAKE) -f $(THIS_FILE) boil-water
@$(MAKE) -f $(THIS_FILE) grind-beans
@$(MAKE) -f $(THIS_FILE) pour-water
@echo "☕ Coffee is ready! ☕"
boil-water:
@bin/boil-water.sh
grid-beans:
@bin/grid-beans.sh
pour-water:
@bin/pour-water.sh
help:
@echo
@echo "==== Coffee Maker ===="
@echo
@echo "make coffee"
@echo " - Makes a cup of coffee."
@echo
@echo "make boil-water"
@echo " - Boils the water for the coffee."
@echo
@echo "make grind-beans"
@echo " - Grinds the coffee beans."
@echo
@echo "make pour-water"
@echo " - Pours the water over the ground beans."
@echo
.PHONY: boil-water grind-beans pour-water
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment