Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
63 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,66 @@ | ||
APP_NAME=libhowl | ||
APP_DIR=. | ||
OBJ=$(shell ls $(APP_DIR)/src/*.erl | sed -e 's/\.erl$$/.beam/' | sed -e 's;^$(APP_DIR)/src;$(APP_DIR)/ebin;g') $(shell ls $(APP_DIR)/src/*.app.src | sed -e 's/\.src$$//g' | sed -e 's;^$(APP_DIR)/src;$(APP_DIR)/ebin;g') | ||
DEPS=$(shell cat rebar.config |sed -e 's/%.*//'| sed -e '/{\(\w\+\), [^,]\+, {\w\+, [^,]\+, {[^,]\+, [^}]\+}}},\?/!d' | sed -e 's;{\(\w\+\), [^,]\+, {\w\+, [^,]\+, {[^,]\+, [^}]\+}}},\?;deps/\1/rebar.config;') | ||
ERL=erl | ||
PA=$(shell pwd)/$(APP_DIR)/ebin | ||
ERL_LIBS=`pwd`/deps/ | ||
REBAR=./rebar | ||
REBAR = $(shell pwd)/rebar | ||
|
||
all: $(DEPS) $(OBJ) | ||
.PHONY: deps rel package | ||
|
||
test: | ||
echo $(DEPS) | ||
echo $(OBJ) | ||
all: deps compile | ||
|
||
doc: FORCE | ||
$(REBAR) doc | ||
clean: FORCE | ||
$(REBAR) clean | ||
-rm *.beam erl_crash.dump | ||
-rm -r rel/$(APP_NAME) | ||
-rm rel/$(APP_NAME).tar.bz2 | ||
compile: | ||
$(REBAR) compile | ||
|
||
$(DEPS): | ||
deps: | ||
$(REBAR) get-deps | ||
$(REBAR) compile | ||
|
||
$(APP_DIR)/ebin/%.app: $(APP_DIR)/src/%.app.src | ||
$(REBAR) compile | ||
clean: | ||
$(REBAR) clean | ||
|
||
$(APP_DIR)/ebin/%.beam: $(APP_DIR)/src/%.erl | ||
$(REBAR) compile | ||
distclean: clean | ||
$(REBAR) delete-deps | ||
|
||
test: | ||
$(REBAR) skip_deps=true eunit | ||
|
||
### | ||
### Docs | ||
### | ||
docs: | ||
$(REBAR) skip_deps=true doc | ||
|
||
## | ||
## Developer targets | ||
## | ||
|
||
xref: | ||
$(REBAR) xref skip_deps=true | ||
|
||
|
||
## | ||
## Dialyzer | ||
## | ||
APPS = kernel stdlib sasl erts ssl tools os_mon runtime_tools crypto inets \ | ||
xmerl webtool snmp public_key mnesia eunit syntax_tools compiler | ||
COMBO_PLT = $(HOME)/.libhowl_combo_dialyzer_plt | ||
|
||
check_plt: deps compile | ||
dialyzer --check_plt --plt $(COMBO_PLT) --apps $(APPS) \ | ||
deps/*/ebin ebin | ||
|
||
shell: all | ||
ERL_LIBS="$(ERL_LIBS)" $(ERL) -pa $(PA) deps/*/ebin -s libhowl | ||
[ -f *.beam ] && rm *.beam || true | ||
[ -f erl_crash.dump ] && rm erl_crash.dump || true | ||
build_plt: deps compile | ||
dialyzer --build_plt --output_plt $(COMBO_PLT) --apps $(APPS) \ | ||
deps/*/ebin ebin | ||
|
||
remove_trash: | ||
-find . -name "*~" -exec rm {} \;. | ||
-rm *.beam erl_crash.dump | ||
FORCE: | ||
dialyzer: deps compile | ||
@echo | ||
@echo Use "'make check_plt'" to check PLT prior to using this target. | ||
@echo Use "'make build_plt'" to build PLT prior to using this target. | ||
@echo | ||
@sleep 1 | ||
dialyzer -Wno_return --plt $(COMBO_PLT) deps/*/ebin ebin | grep -v -f dialyzer.mittigate | ||
|
||
clean-docs: | ||
-rm doc/*.html doc/*.png doc/*.css doc/edoc-info | ||
|
||
docs: clean-docs | ||
@$(REBAR) doc skip_deps=true | ||
cleanplt: | ||
@echo | ||
@echo "Are you sure? It takes about 1/2 hour to re-build." | ||
@echo Deleting $(COMBO_PLT) in 5 seconds. | ||
@echo | ||
sleep 5 | ||
rm $(COMBO_PLT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
^lager_stdlib.erl:453: | ||
^lager_stdlib.erl:502: | ||
^lager_trunc_io.erl:74: | ||
^lager_trunc_io.erl:98: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters