Skip to content

Instantly share code, notes, and snippets.

@jhyland87
Created November 9, 2016 16:24
Show Gist options
  • Save jhyland87/684859befc745700ffd7b52d1c562990 to your computer and use it in GitHub Desktop.
Save jhyland87/684859befc745700ffd7b52d1c562990 to your computer and use it in GitHub Desktop.
MakeFile example
# MAKEFILE CONTENTS
$ cat Makefile
define say_something
echo "You said "$(1)
endef
all: test_b
echo "This is all"
$(call say_something, FOO)
$(call say_something, BAR)
test_b: test_a
echo "This is test_b"
test_a: package.json
echo "This is test_a"
.PHONY: all
# EXECUTION
$ make
echo "This is test_a"
This is test_a
echo "This is test_b"
This is test_b
echo "This is all"
This is all
echo "You said " FOO
You said FOO
echo "You said " BAR
You said BAR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment