Skip to content

Commit

Permalink
Merge of extend/erlang.mk
Browse files Browse the repository at this point in the history
Conflicts:
    erlang.mk
  • Loading branch information
andrzejsliwa committed Feb 22, 2014
2 parents 8f4d0b9 + 798be5a commit 355f066
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2013, Loïc Hoguin <essen@ninenines.eu>
Copyright (c) 2013-2014, Loïc Hoguin <essen@ninenines.eu>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ then you only need to put `ponies` in the list.
`stdlib` in there because they will always be included. The applications
the project depends on will also be included.

`DIALYZER_PLT` allows you to change the PLT file used by dialyzer.

`DIALYZER_OPTS` allows you to change the `dialyzer` options.

`PKG_FILE` allows you to change the location of the package index file
Expand Down
18 changes: 8 additions & 10 deletions erlang.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2013, Loïc Hoguin <essen@ninenines.eu>
# Copyright (c) 2013-2014, Loïc Hoguin <essen@ninenines.eu>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
Expand Down Expand Up @@ -58,7 +58,7 @@ ifneq ($(wildcard $(RELX_CONFIG)),)
RELX ?= $(CURDIR)/relx
export RELX

RELX_URL ?= https://github.com/erlware/relx/releases/download/v0.5.2/relx
RELX_URL ?= https://github.com/erlware/relx/releases/download/v0.6.0/relx
RELX_OPTS ?=

define get_relx
Expand Down Expand Up @@ -132,7 +132,7 @@ define compile_dtl
Compile = fun(F) -> \
Module = list_to_atom( \
string:to_lower(filename:basename(F, ".dtl")) ++ "_dtl"), \
erlydtl_compiler:compile(F, Module, [{out_dir, "ebin/"}]) \
erlydtl:compile(F, Module, [{out_dir, "ebin/"}]) \
end, \
_ = [Compile(F) || F <- string:tokens("$(1)", " ")], \
init:stop()'
Expand Down Expand Up @@ -251,21 +251,19 @@ tests: clean deps app build-tests

# Dialyzer.

DIALYZER_PLT ?= $(CURDIR)/.$(PROJECT).plt
export DIALYZER_PLT

PLT_APPS ?=
DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions \
-Wunmatched_returns # -Wunderspecs
PROJECT_PLT ?= .$(PROJECT).plt

build-plt: deps app
@dialyzer --build_plt --output_plt $(PROJECT_PLT) \
--apps erts kernel stdlib $(PLT_APPS) $(ALL_DEPS_DIRS)
@dialyzer --build_plt --apps erts kernel stdlib $(PLT_APPS) $(ALL_DEPS_DIRS)

ifneq ($(wildcard $(PROJECT_PLT)),)
dialyze:
else
dialyze: build-plt
endif
@dialyzer --src src --plt $(PROJECT_PLT) --no_native $(DIALYZER_OPTS)
@dialyzer --src src --no_native $(DIALYZER_OPTS)

# Packages.

Expand Down

0 comments on commit 355f066

Please sign in to comment.