Skip to content

Instantly share code, notes, and snippets.

@hfeeki
Created December 12, 2013 03:08
Show Gist options
  • Save hfeeki/7922637 to your computer and use it in GitHub Desktop.
Save hfeeki/7922637 to your computer and use it in GitHub Desktop.
Makefile for rebar project
REBAR = $(shell which rebar || echo ./rebar)
all : deps compile
test : compile unit
./rebar:
erl -noshell -s inets start -s ssl start \
-eval 'httpc:request(get, {"https://raw.github.com/wiki/rebar/rebar/rebar", []}, [], [{stream, "./rebar"}])' \
-s inets stop -s init stop
chmod +x ./rebar
dirs:
@mkdir -p priv/tmp
compile: $(REBAR)
@$(REBAR) compile
clean: $(REBAR)
@$(REBAR) clean
deps: $(REBAR)
@$(REBAR) get-deps
unit: $(REBAR)
@$(REBAR) eunit skip_deps=true
examples: eg
eg:
@erlc -I deps -o ebin src/*.erl
setuid: all
sudo chown root priv/procket
sudo chmod 4750 priv/procket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment