add a full makefile that drives rebar
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
This commit is contained in:
parent
9514b16993
commit
51b5a41c63
3 changed files with 73 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,6 +6,7 @@ doc/*.css
|
||||||
doc/edoc-info
|
doc/edoc-info
|
||||||
doc/erlang.png
|
doc/erlang.png
|
||||||
ebin/*
|
ebin/*
|
||||||
|
.*
|
||||||
_build
|
_build
|
||||||
erl_crash.dump
|
erl_crash.dump
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
64
Makefile
Normal file
64
Makefile
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
# Copyright 2012 Erlware, LLC. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# BSD License see COPYING
|
||||||
|
|
||||||
|
ERL = $(shell which erl)
|
||||||
|
|
||||||
|
ERLFLAGS= -pa $(CURDIR)/.eunit -pa $(CURDIR)/ebin -pa $(CURDIR)/*/ebin
|
||||||
|
|
||||||
|
REBAR=$(shell which rebar)
|
||||||
|
|
||||||
|
ifeq ($(REBAR),)
|
||||||
|
$(error "Rebar not available on this system")
|
||||||
|
endif
|
||||||
|
|
||||||
|
ERLWARE_COMMONS_PLT=$(CURDIR)/.erlware_commons_plt
|
||||||
|
|
||||||
|
.PHONY: all compile doc clean eunit dialyzer typer shell distclean pdf get-deps escript
|
||||||
|
|
||||||
|
all: compile eunit dialyzer
|
||||||
|
|
||||||
|
get-deps:
|
||||||
|
$(REBAR) get-deps
|
||||||
|
$(REBAR) compile
|
||||||
|
|
||||||
|
compile:
|
||||||
|
$(REBAR) skip_deps=true compile
|
||||||
|
|
||||||
|
doc: compile
|
||||||
|
$(REBAR) skip_deps=true doc
|
||||||
|
|
||||||
|
eunit: compile
|
||||||
|
$(REBAR) skip_deps=true eunit
|
||||||
|
|
||||||
|
$(ERLWARE_COMMONS_PLT):
|
||||||
|
@echo Building local plt at $(ERLWARE_COMMONS_PLT)
|
||||||
|
@echo
|
||||||
|
- dialyzer --output_plt $(ERLWARE_COMMONS_PLT) --build_plt \
|
||||||
|
--apps erts kernel stdlib -r deps
|
||||||
|
|
||||||
|
dialyzer: $(ERLWARE_COMMONS_PLT)
|
||||||
|
dialyzer --plt $(ERLWARE_COMMONS_PLT) -Wrace_conditions --src src
|
||||||
|
|
||||||
|
typer:
|
||||||
|
typer --plt $(ERLWARE_COMMONS_PLT) -r ./src
|
||||||
|
|
||||||
|
shell: compile
|
||||||
|
# You often want *rebuilt* rebar tests to be available to the
|
||||||
|
# shell you have to call eunit (to get the tests
|
||||||
|
# rebuilt). However, eunit runs the tests, which probably
|
||||||
|
# fails (thats probably why You want them in the shell). This
|
||||||
|
# runs eunit but tells make to ignore the result.
|
||||||
|
- @$(REBAR) eunit
|
||||||
|
@$(ERL) $(ERLFLAGS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(REBAR) clean
|
||||||
|
rm $(CURDIR)/doc/*.html
|
||||||
|
rm $(CURDIR)/doc/*.css
|
||||||
|
rm $(CURDIR)/doc/*.png
|
||||||
|
rm $(CURDIR)/doc/edoc-info
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
rm -rf $(ERLWARE_COMMONS_PLT)
|
||||||
|
rm -rvf $(CURDIR)/deps/*
|
|
@ -1,3 +1,10 @@
|
||||||
|
%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
|
||||||
|
|
||||||
|
%% These are all only compile time dependencies
|
||||||
|
{deps, [
|
||||||
|
{proper, "", {git, "https://github.com/manopapad/proper.git", {branch, master}}}
|
||||||
|
]}.
|
||||||
|
|
||||||
{erl_opts,
|
{erl_opts,
|
||||||
[debug_info,
|
[debug_info,
|
||||||
warnings_as_errors]}.
|
warnings_as_errors]}.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue