From 6366b41c9ed633a975bf37527f97c29efe2a1da5 Mon Sep 17 00:00:00 2001 From: Nathan Lasseter Date: Fri, 30 May 2014 13:44:47 +0100 Subject: Updated Makefile to take tb as argument --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2dfb4cc..66fceee 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,11 @@ +# If the first argument is "run"... +ifeq (run,$(firstword $(MAKECMDGOALS))) + # use the rest as arguments for "run" + RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) + # ...and turn them into do-nothing targets + $(eval $(RUN_ARGS):;@:) +endif + MODULES=eco_pool eco_proc eco_time eco_watcher eco_tb PREREQS=$(addprefix bin/, $(addsuffix .beam, ${MODULES})) @@ -7,7 +15,7 @@ PREREQS=$(addprefix bin/, $(addsuffix .beam, ${MODULES})) all: bin/ ${PREREQS} run: bin/ ${PREREQS} - erl -pz bin/ -noshell -run eco_tb start + erl -pz bin/ -noshell -run eco_tb $(RUN_ARGS) clean: rm -r bin erl_crash.dump -- cgit v1.2.3