aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md15
-rw-r--r--build.config1
-rw-r--r--core/deps.mk25
-rw-r--r--packages.v1.tsv6
-rw-r--r--packages.v1.txt6
-rw-r--r--packages.v2.tsv6
-rw-r--r--plugins/relx.mk2
-rw-r--r--plugins/xref.mk38
8 files changed, 84 insertions, 15 deletions
diff --git a/README.md b/README.md
index 1d7fbeb..2c0c4bc 100644
--- a/README.md
+++ b/README.md
@@ -255,7 +255,7 @@ The following targets are specific to packages:
`pkg-list` lists all packages in the index.
-`pkg-search n=STRING` searches the index for STRING.
+`pkg-search q=STRING` searches the index for STRING.
Packages are downloaded into `DEPS_DIR` (`./deps/` by default).
@@ -538,6 +538,19 @@ Or:
$ make triq t=cow_http_hd:prop_parse_accept
```
+Xref plugin
+------------
+
+This plugin is available by default. It adds the following
+target:
+
+`xref` Erlang Xref Runner (inspired in rebar's rebar_xref)
+
+The `XREF_CONFIG` variable specifies the location of the
+configuration file which holds the checks to be applied.
+If there is no `xref.config` all `xref` checks will be
+applied to the binaries located in the `/ebin` directory.
+
Contributing
------------
diff --git a/build.config b/build.config
index 7e60d80..7ceca41 100644
--- a/build.config
+++ b/build.config
@@ -22,3 +22,4 @@ plugins/eunit
plugins/relx
plugins/shell
plugins/triq
+plugins/xref
diff --git a/core/deps.mk b/core/deps.mk
index 74bc30b..7dfb5f4 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -35,9 +35,10 @@ PKG_FILE_URL ?= https://raw.githubusercontent.com/ninenines/erlang.mk/master/pac
deps:: $(ALL_DEPS_DIRS)
@for dep in $(ALL_DEPS_DIRS) ; do \
if [ -f $$dep/GNUmakefile ] || [ -f $$dep/makefile ] || [ -f $$dep/Makefile ] ; then \
- $(MAKE) -C $$dep ; \
+ $(MAKE) -C $$dep || exit $$? ; \
else \
- echo "include $(CURDIR)/erlang.mk" | ERLC_OPTS=+debug_info $(MAKE) -f - -C $$dep ; \
+ echo "ERROR: No makefile to build dependency $$dep. Consider adding it to AUTOPATCH." ; \
+ exit 1 ; \
fi ; \
done
@@ -49,7 +50,8 @@ define dep_autopatch
$(ERL) -eval " \
DepDir = \"$(DEPS_DIR)/$(1)/\", \
fun() -> \
- {ok, Conf} = file:consult(DepDir ++ \"rebar.config\"), \
+ {ok, Conf} = case file:consult(DepDir ++ \"rebar.config\") of \
+ {error, enoent} -> {ok, []}; Res -> Res end, \
File = case lists:keyfind(deps, 1, Conf) of false -> []; {_, Deps} -> \
[begin {Method, Repo, Commit} = case Repos of \
{git, R} -> {git, R, master}; \
@@ -60,7 +62,12 @@ fun() -> \
io_lib:format(\"DEPS += ~s\ndep_~s = ~s ~s ~s~n\", [Name, Name, Method, Repo, Commit]) \
end || {Name, _, Repos} <- Deps] \
end, \
- ok = file:write_file(\"$(DEPS_DIR)/$(1)/Makefile\", [\"ERLC_OPTS = +debug_info\n\n\", File, \"\ninclude erlang.mk\"]) \
+ First = case lists:keyfind(erl_first_files, 1, Conf) of false -> []; {_, Files} -> \
+ Names = [[\" \", begin \"lre.\" ++ R = lists:reverse(F), lists:reverse(R) end] \
+ || \"src/\" ++ F <- Files], \
+ io_lib:format(\"COMPILE_FIRST +=~s\n\", [Names]) \
+ end, \
+ ok = file:write_file(\"$(DEPS_DIR)/$(1)/Makefile\", [\"ERLC_OPTS = +debug_info\n\n\", File, First, \"\ninclude erlang.mk\"]) \
end(), \
AppSrcOut = \"$(DEPS_DIR)/$(1)/src/$(1).app.src\", \
AppSrcIn = case filelib:is_regular(AppSrcOut) of false -> \"$(DEPS_DIR)/$(1)/ebin/$(1).app\"; true -> AppSrcOut end, \
@@ -89,6 +96,8 @@ define dep_fetch
cd $(DEPS_DIR)/$(1) && hg update -q $$$$COMMIT; \
elif [ "$$$$VS" = "svn" ]; then \
svn checkout $$$$REPO $(DEPS_DIR)/$(1); \
+ elif [ "$$$$VS" = "cp" ]; then \
+ cp -R $$$$REPO $(DEPS_DIR)/$(1); \
else \
echo "Unknown or invalid dependency: $(1). Please consult the erlang.mk README for instructions." >&2; \
exit 78; \
@@ -112,13 +121,9 @@ else
$(call dep_fetch,$(1))
endif
ifneq ($(filter $(1),$(AUTOPATCH)),)
- $(call dep_autopatch_verbose,$(1)) if [ -f $(DEPS_DIR)/$(1)/rebar.config ]; then \
+ $(call dep_autopatch_verbose,$(1)) \
$(call dep_autopatch,$(1)); \
- cd $(DEPS_DIR)/$(1)/ && ln -s ../../erlang.mk; \
- elif [ ! -f $(DEPS_DIR)/$(1)/Makefile ]; then \
- echo "ERLC_OPTS = +debug_info\ninclude erlang.mk" > $(DEPS_DIR)/$(1)/Makefile; \
- cd $(DEPS_DIR)/$(1)/ && ln -s ../../erlang.mk; \
- fi
+ cd $(DEPS_DIR)/$(1)/ && ln -s ../../erlang.mk
endif
endef
diff --git a/packages.v1.tsv b/packages.v1.tsv
index a16ac38..b61a607 100644
--- a/packages.v1.tsv
+++ b/packages.v1.tsv
@@ -23,8 +23,9 @@ erlydtl https://github.com/erlydtl/erlydtl https://github.com/erlydtl/erlydtl Dj
erwa https://github.com/bwegh/erwa https://github.com/bwegh/erwa A WAMP router and client written in Erlang.
exs1024 https://github.com/jj1bdx/exs1024 https://github.com/jj1bdx/exs1024 Xorshift1024star pseudo random number generator for Erlang.
exs64 https://github.com/jj1bdx/exs64 https://github.com/jj1bdx/exs64 Xorshift64star pseudo random number generator for Erlang.
-exsplus https://github.com/jj1bdx/exsplus https://github.com/jj1bdx/exsplus Xorshift128plus pseudo random number generator for Erlang.
+exsplus128 https://github.com/jj1bdx/exsplus128 https://github.com/jj1bdx/exsplus128 Xorshift128plus pseudo random number generator for Erlang.
feeder https://github.com/michaelnisi/feeder https://github.com/michaelnisi/feeder Stream parse RSS and Atom formatted XML feeds.
+geas https://github.com/crownedgrouse/geas.git https://github.com/crownedgrouse/geas Guess Erlang Application Scattering
getopt https://github.com/jcomellas/getopt.git https://github.com/jcomellas/getopt Module to parse command line arguments using the GNU getopt syntax
gproc https://github.com/uwiger/gproc.git https://github.com/uwiger/gproc Extended process registry for Erlang
gun https://github.com/extend/gun http//ninenines.eu Asynchronous SPDY, HTTP and Websocket client written in Erlang.
@@ -43,6 +44,7 @@ live https://github.com/ninenines/live http://ninenines.eu Automated module and
mekao https://github.com/ddosia/mekao.git https://github.com/ddosia/mekao SQL constructor
modlib https://github.com/gar1t/modlib.git https://github.com/gar1t/modlib Web framework based on Erlang's inets httpd
neo4j https://github.com/dmitriid/neo4j-erlang https://github.com/dmitriid/neo4j-erlang Erlang client library for Neo4J.
+nodefinder https://github.com/erlanger/nodefinder.git https://github.com/erlanger/nodefinder automatic node discovery via UDP multicast
pegjs https://github.com/dmitriid/pegjs https://github.com/dmitriid/pegjs An implementation of PEG.js grammar for Erlang.
proper https://github.com/manopapad/proper http://proper.softlab.ntua.gr PropEr: a QuickCheck-inspired property-based testing tool for Erlang.
psycho https://github.com/gar1t/psycho.git https://github.com/gar1t/psycho HTTP server that provides a WSGI-like interface for applications and middleware.
@@ -60,4 +62,6 @@ tddreloader https://github.com/version2beta/tddreloader https://github.com/versi
tinymt-erlang https://github.com/jj1bdx/tinymt-erlang https://github.com/jj1bdx/tinymt-erlang TinyMT pseudo random number generator for Erlang.
unicorn https://github.com/shizzard/unicorn https://github.com/shizzard/unicorn Generic configuration server
uuid https://github.com/okeuday/uuid https://github.com/okeuday/uuid Erlang UUID Implementation
+worker_pool https://github.com/inaka/worker_pool.git https://github.com/inaka/worker_pool a simple erlang worker pool
+xref_runner https://github.com/inaka/xref_runner.git https://github.com/inaka/xref_runner.git Erlang Xref Runner (inspired in rebar xref)
zeta https://github.com/s1n4/zeta https://github.com/s1n4/zeta HTTP access log parser in Erlang
diff --git a/packages.v1.txt b/packages.v1.txt
index a16ac38..b61a607 100644
--- a/packages.v1.txt
+++ b/packages.v1.txt
@@ -23,8 +23,9 @@ erlydtl https://github.com/erlydtl/erlydtl https://github.com/erlydtl/erlydtl Dj
erwa https://github.com/bwegh/erwa https://github.com/bwegh/erwa A WAMP router and client written in Erlang.
exs1024 https://github.com/jj1bdx/exs1024 https://github.com/jj1bdx/exs1024 Xorshift1024star pseudo random number generator for Erlang.
exs64 https://github.com/jj1bdx/exs64 https://github.com/jj1bdx/exs64 Xorshift64star pseudo random number generator for Erlang.
-exsplus https://github.com/jj1bdx/exsplus https://github.com/jj1bdx/exsplus Xorshift128plus pseudo random number generator for Erlang.
+exsplus128 https://github.com/jj1bdx/exsplus128 https://github.com/jj1bdx/exsplus128 Xorshift128plus pseudo random number generator for Erlang.
feeder https://github.com/michaelnisi/feeder https://github.com/michaelnisi/feeder Stream parse RSS and Atom formatted XML feeds.
+geas https://github.com/crownedgrouse/geas.git https://github.com/crownedgrouse/geas Guess Erlang Application Scattering
getopt https://github.com/jcomellas/getopt.git https://github.com/jcomellas/getopt Module to parse command line arguments using the GNU getopt syntax
gproc https://github.com/uwiger/gproc.git https://github.com/uwiger/gproc Extended process registry for Erlang
gun https://github.com/extend/gun http//ninenines.eu Asynchronous SPDY, HTTP and Websocket client written in Erlang.
@@ -43,6 +44,7 @@ live https://github.com/ninenines/live http://ninenines.eu Automated module and
mekao https://github.com/ddosia/mekao.git https://github.com/ddosia/mekao SQL constructor
modlib https://github.com/gar1t/modlib.git https://github.com/gar1t/modlib Web framework based on Erlang's inets httpd
neo4j https://github.com/dmitriid/neo4j-erlang https://github.com/dmitriid/neo4j-erlang Erlang client library for Neo4J.
+nodefinder https://github.com/erlanger/nodefinder.git https://github.com/erlanger/nodefinder automatic node discovery via UDP multicast
pegjs https://github.com/dmitriid/pegjs https://github.com/dmitriid/pegjs An implementation of PEG.js grammar for Erlang.
proper https://github.com/manopapad/proper http://proper.softlab.ntua.gr PropEr: a QuickCheck-inspired property-based testing tool for Erlang.
psycho https://github.com/gar1t/psycho.git https://github.com/gar1t/psycho HTTP server that provides a WSGI-like interface for applications and middleware.
@@ -60,4 +62,6 @@ tddreloader https://github.com/version2beta/tddreloader https://github.com/versi
tinymt-erlang https://github.com/jj1bdx/tinymt-erlang https://github.com/jj1bdx/tinymt-erlang TinyMT pseudo random number generator for Erlang.
unicorn https://github.com/shizzard/unicorn https://github.com/shizzard/unicorn Generic configuration server
uuid https://github.com/okeuday/uuid https://github.com/okeuday/uuid Erlang UUID Implementation
+worker_pool https://github.com/inaka/worker_pool.git https://github.com/inaka/worker_pool a simple erlang worker pool
+xref_runner https://github.com/inaka/xref_runner.git https://github.com/inaka/xref_runner.git Erlang Xref Runner (inspired in rebar xref)
zeta https://github.com/s1n4/zeta https://github.com/s1n4/zeta HTTP access log parser in Erlang
diff --git a/packages.v2.tsv b/packages.v2.tsv
index d04a9d3..6dca150 100644
--- a/packages.v2.tsv
+++ b/packages.v2.tsv
@@ -23,8 +23,9 @@ erlydtl git https://github.com/erlydtl/erlydtl master https://github.com/erlydtl
erwa git https://github.com/bwegh/erwa 0.1.1 https://github.com/bwegh/erwa A WAMP router and client written in Erlang.
exs1024 git https://github.com/jj1bdx/exs1024 master https://github.com/jj1bdx/exs1024 Xorshift1024star pseudo random number generator for Erlang.
exs64 git https://github.com/jj1bdx/exs64 master https://github.com/jj1bdx/exs64 Xorshift64star pseudo random number generator for Erlang.
-exsplus git https://github.com/jj1bdx/exsplus master https://github.com/jj1bdx/exsplus Xorshift128plus pseudo random number generator for Erlang.
+exsplus128 git https://github.com/jj1bdx/exsplus128 master https://github.com/jj1bdx/exsplus128 Xorshift128plus pseudo random number generator for Erlang.
feeder git https://github.com/michaelnisi/feeder 1.4.2 https://github.com/michaelnisi/feeder Stream parse RSS and Atom formatted XML feeds.
+geas git https://github.com/crownedgrouse/geas.git master https://github.com/crownedgrouse/geas Guess Erlang Application Scattering
getopt git https://github.com/jcomellas/getopt.git master https://github.com/jcomellas/getopt Module to parse command line arguments using the GNU getopt syntax
gproc git https://github.com/uwiger/gproc.git master https://github.com/uwiger/gproc Extended process registry for Erlang
gun git https://github.com/extend/gun master http//ninenines.eu Asynchronous SPDY, HTTP and Websocket client written in Erlang.
@@ -43,6 +44,7 @@ live git https://github.com/ninenines/live master http://ninenines.eu Automated
mekao git https://github.com/ddosia/mekao.git master https://github.com/ddosia/mekao SQL constructor
modlib git https://github.com/gar1t/modlib.git master https://github.com/gar1t/modlib Web framework based on Erlang's inets httpd
neo4j git https://github.com/dmitriid/neo4j-erlang master https://github.com/dmitriid/neo4j-erlang Erlang client library for Neo4J.
+nodefinder git https://github.com/erlanger/nodefinder.git 0.2.3 https://github.com/erlanger/nodefinder automatic node discovery via UDP multicast
pegjs git https://github.com/dmitriid/pegjs 0.3 https://github.com/dmitriid/pegjs An implementation of PEG.js grammar for Erlang.
proper git https://github.com/manopapad/proper master http://proper.softlab.ntua.gr PropEr: a QuickCheck-inspired property-based testing tool for Erlang.
psycho git https://github.com/gar1t/psycho.git master https://github.com/gar1t/psycho HTTP server that provides a WSGI-like interface for applications and middleware.
@@ -60,4 +62,6 @@ tddreloader git https://github.com/version2beta/tddreloader master https://githu
tinymt-erlang git https://github.com/jj1bdx/tinymt-erlang master https://github.com/jj1bdx/tinymt-erlang TinyMT pseudo random number generator for Erlang.
unicorn git https://github.com/shizzard/unicorn 0.3.0 https://github.com/shizzard/unicorn Generic configuration server
uuid git https://github.com/okeuday/uuid v1.4.0 https://github.com/okeuday/uuid Erlang UUID Implementation
+worker_pool git https://github.com/inaka/worker_pool.git 1.0.2 https://github.com/inaka/worker_pool a simple erlang worker pool
+xref_runner git https://github.com/inaka/xref_runner.git 0.2.0 https://github.com/inaka/xref_runner.git Erlang Xref Runner (inspired in rebar xref)
zeta git https://github.com/s1n4/zeta https://github.com/s1n4/zeta HTTP access log parser in Erlang
diff --git a/plugins/relx.mk b/plugins/relx.mk
index c2ad949..d26054e 100644
--- a/plugins/relx.mk
+++ b/plugins/relx.mk
@@ -10,7 +10,7 @@ RELX_CONFIG ?= $(CURDIR)/relx.config
RELX ?= $(CURDIR)/relx
export RELX
-RELX_URL ?= https://github.com/erlware/relx/releases/download/v1.2.0/relx
+RELX_URL ?= https://github.com/erlware/relx/releases/download/v1.3.1/relx
RELX_OPTS ?=
RELX_OUTPUT_DIR ?= _rel
diff --git a/plugins/xref.mk b/plugins/xref.mk
new file mode 100644
index 0000000..cd1cc64
--- /dev/null
+++ b/plugins/xref.mk
@@ -0,0 +1,38 @@
+# Copyright (c) 2015, Euen Lopez <[email protected]>
+# This file is part of erlang.mk and subject to the terms of the ISC License.
+
+.PHONY: xref distclean-xref
+
+# Configuration.
+
+ifeq ($(XREF_CONFIG),)
+ XREF_ARGS :=
+else
+ XREF_ARGS := -c $(XREF_CONFIG)
+endif
+
+XREFR ?= $(CURDIR)/xrefr
+export XREFR
+
+XREFR_URL ?= https://github.com/inaka/xref_runner/releases/download/0.2.0/xrefr
+
+# Core targets.
+
+help::
+ @printf "%s\n" "" \
+ "Xref targets:" \
+ " xref Run Xrefr using $XREF_CONFIG as config file if defined"
+
+distclean:: distclean-xref
+
+# Plugin-specific targets.
+
+$(XREFR):
+ @$(call core_http_get,$(XREFR),$(XREFR_URL))
+ @chmod +x $(XREFR)
+
+xref: deps app $(XREFR)
+ $(gen_verbose) $(XREFR) $(XREFR_ARGS)
+
+distclean-xref:
+ $(gen_verbose) rm -rf $(XREFR)