Permalink
Browse files

Add release script targets to project Makefile

Project Makefile targets now include: start, stop, restart, reboot, console,
attach, ping. Previous console target is now 'dev'.
  • Loading branch information...
1 parent 72b4b79 commit 0f1b97da6bbe2a0790cb184ac40953df3d85ec6a @mbbx6spp committed Jul 1, 2011
Showing with 20 additions and 9 deletions.
  1. +20 −9 project_Makefile
View
@@ -2,8 +2,10 @@ ERL ?= erl
ERLC = erlc
EBIN_DIRS := $(wildcard deps/*/ebin)
APPS := $(shell dir apps)
+REL_DIR = rel
NODE = {{name}}
REL = {{name}}
+SCRIPT_PATH := $(REL_DIR)/$(NODE)/bin/$(REL)
.PHONY: rel deps
@@ -28,25 +30,34 @@ test:
rel: deps
@rebar compile generate
-start: rel
- @./rel/$(NODE)/bin/$(REL) start
+start: $(SCRIPT_PATH)
+ @./$(SCRIPT_PATH) start
-stop:
- @./rel/$(NODE)/bin/$(REL) stop
+stop: $(SCRIPT_PATH)
+ @./$(SCRIPT_PATH) stop
-ping:
- @./rel/$(NODE)/bin/$(REL) ping
+ping: $(SCRIPT_PATH)
+ @./$(SCRIPT_PATH) ping
-attach:
- @./rel/$(NODE)/bin/$(REL) attach
+attach: $(SCRIPT_PATH)
+ @./$(SCRIPT_PATH) attach
+
+console: $(SCRIPT_PATH)
+ @./$(SCRIPT_PATH) console
+
+restart: $(SCRIPT_PATH)
+ @./$(SCRIPT_PATH) restart
+
+reboot: $(SCRIPT_PATH)
+ @./$(SCRIPT_PATH) reboot
doc:
rebar skip_deps=true doc
for app in $(APPS); do \
cp -R apps/$${app}/doc doc/$${app}; \
done;
-console:
+dev:
@erl -pa ebin include deps/*/ebin deps/*/include ebin include -boot start_sasl
analyze: checkplt

0 comments on commit 0f1b97d

Please sign in to comment.