diff options
author | Nathan Lasseter <Nathan Lasseter nathan@bytemark.co.uk> | 2014-05-30 13:44:47 +0100 |
---|---|---|
committer | Nathan Lasseter <Nathan Lasseter nathan@bytemark.co.uk> | 2014-05-30 13:44:47 +0100 |
commit | 6366b41c9ed633a975bf37527f97c29efe2a1da5 (patch) | |
tree | 1e34bd416f4274cb4b40afc2997ad7d5714a2762 /Makefile | |
parent | 08fecb93995728ab53d78beefc329331d79f303f (diff) |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 |