Skip to content

Instantly share code, notes, and snippets.

@onlyshk
Created October 13, 2011 13:41
Show Gist options
  • Save onlyshk/1284245 to your computer and use it in GitHub Desktop.
Save onlyshk/1284245 to your computer and use it in GitHub Desktop.
{"src/*", [debug_info, {d, debug}, {outdir, "ebin"}, {i, "include"}]}.
ERL=erl
APP_NAME=app
NODE_NAME=app
EFLAGS=-pa ebin -sname $(NODE_NAME)
VSN=0.1
all: compile
compile:
test -d ebin || mkdir ebin
$(ERL) $(EFLAGS) -make
cp $(APP_NAME).app ebin
doc:
$(ERL) $(EFLAGS) -noshell \
-run edoc_run application "'$(APP_NAME)'" '"."' '[{def,{vsn,"$(VSN)"}}]'
clean:
test ! -d doc || rm -rfv doc
rm -rfv erl_crash.dump ebin
find . -name "*~" -exec rm -fv {} \;
# for testing purpose
run: compile
$(ERL) $(EFLAGS) -eval 'application:start($(APP_NAME)).'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment