diff options
-rw-r--r-- | README.md | 31 | ||||
-rw-r--r-- | core/core.mk | 14 | ||||
-rw-r--r-- | erlang.mk | 14 | ||||
-rw-r--r-- | packages.v2.tsv | 6 | ||||
-rw-r--r-- | plugins/c_src.mk | 2 |
5 files changed, 61 insertions, 6 deletions
@@ -224,6 +224,22 @@ If `{id, "git"},` is found in your project's `.app.src`, the extended output of `git describe ...` will replace it. This can be retrieved at runtime via `application:get_key/2`. +Updating erlang.mk +------------------ + +You can update erlang.mk by running `make erlang-mk`. This automated +update will always take the latest erlang.mk version, compile it and +replace the erlang.mk of your project with the updated version. + +If your project includes a `build.config`, erlang.mk will use it +when building the updated version. + +The `ERLANG_MK_BUILD_CONFIG` variable can be used to rename the +`build.config` file. + +The `ERLANG_MK_BUILD_DIR` variable contains the path to the +temporary directory used to build the updated erlang.mk. + Bootstrap plugin ---------------- @@ -320,6 +336,21 @@ EDoc options can be specified in Erlang format by defining the `EDOC_OPTS` variable. For more information please see `erl -man edoc`. +Elvis plugin +------------ + +This plugin is available by default. It adds the following +target: + +`elvis` runs Elvis style checker for this application. + +The `ELVIS_CONFIG` variable specifies the location of the +configuration file which holds the rules to be applied. +If there's no `elvis.config` file the default one will be +downloaded. When the `ELVIS` variable points to a non-existing +file then the `elvis` executable will be downloaded as well. +Any other option should go in the `ELVIS_OPTS` variable. + ErlyDTL plugin -------------- diff --git a/core/core.mk b/core/core.mk index ec42331..0b06f73 100644 --- a/core/core.mk +++ b/core/core.mk @@ -12,7 +12,7 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.PHONY: all deps app rel docs tests clean distclean help +.PHONY: all deps app rel docs tests clean distclean help erlang-mk ERLANG_MK_VERSION = 1 @@ -71,3 +71,15 @@ define core_http_get erl -noshell -eval 'ssl:start(), inets:start(), case httpc:request(get, {"$(2)", []}, [{autoredirect, true}], []) of {ok, {{_, 200, _}, _, Body}} -> case file:write_file("$(1)", Body) of ok -> ok; {error, R1} -> halt(R1) end; {error, R2} -> halt(R2) end, halt(0).' endef endif + +# Automated update. + +ERLANG_MK_BUILD_CONFIG ?= build.config +ERLANG_MK_BUILD_DIR ?= .erlang.mk.build + +erlang-mk: + git clone https://github.com/ninenines/erlang.mk $(ERLANG_MK_BUILD_DIR) + if [ -f $(ERLANG_MK_BUILD_CONFIG) ]; then cp $(ERLANG_MK_BUILD_CONFIG) $(ERLANG_MK_BUILD_DIR); fi + cd $(ERLANG_MK_BUILD_DIR) && make + cp $(ERLANG_MK_BUILD_DIR)/erlang.mk ./erlang.mk + rm -rf $(ERLANG_MK_BUILD_DIR) @@ -12,7 +12,7 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.PHONY: all deps app rel docs tests clean distclean help +.PHONY: all deps app rel docs tests clean distclean help erlang-mk ERLANG_MK_VERSION = 1 @@ -72,6 +72,18 @@ define core_http_get endef endif +# Automated update. + +ERLANG_MK_BUILD_CONFIG ?= build.config +ERLANG_MK_BUILD_DIR ?= .erlang.mk.build + +erlang-mk: + git clone https://github.com/ninenines/erlang.mk $(ERLANG_MK_BUILD_DIR) + if [ -f $(ERLANG_MK_BUILD_CONFIG) ]; then cp $(ERLANG_MK_BUILD_CONFIG) $(ERLANG_MK_BUILD_DIR); fi + cd $(ERLANG_MK_BUILD_DIR) && make + cp $(ERLANG_MK_BUILD_DIR)/erlang.mk ./erlang.mk + rm -rf $(ERLANG_MK_BUILD_DIR) + # Copyright (c) 2013-2014, Loïc Hoguin <[email protected]> # This file is part of erlang.mk and subject to the terms of the ISC License. diff --git a/packages.v2.tsv b/packages.v2.tsv index 828c171..6fadc33 100644 --- a/packages.v2.tsv +++ b/packages.v2.tsv @@ -2,8 +2,8 @@ apns4erl git https://github.com/inaka/apns4erl.git 1.0 http://inaka.github.com/a bullet git https://github.com/extend/bullet master http://ninenines.eu Simple, reliable, efficient streaming for Cowboy. cake git https://github.com/darach/cake-erl v0.1.2 https://github.com/darach/cake-erl Really simple terminal colorization classifier git https://github.com/inaka/classifier.git 1 https://github.com/inaka/classifier An Erlang Bayesian Filter and Text Classifier -cowboy git https://github.com/ninenines/cowboy 1.0.0 http://ninenines.eu Small, fast and modular HTTP server. -cowlib git https://github.com/ninenines/cowlib 1.0.0 http://ninenines.eu Support library for manipulating Web protocols. +cowboy git https://github.com/ninenines/cowboy 1.0.1 http://ninenines.eu Small, fast and modular HTTP server. +cowlib git https://github.com/ninenines/cowlib 1.0.1 http://ninenines.eu Support library for manipulating Web protocols. czmq git https://github.com/gar1t/erlang-czmq.git master https://github.com/gar1t/erlang-czmq External port bindings for CZMQ. debbie git https://github.com/crownedgrouse/debbie.git master https://github.com/crownedgrouse/debbie .DEB Built In Erlang e2 git https://github.com/gar1t/e2.git master http://e2project.org Library to simply writing correct OTP applications. @@ -42,7 +42,7 @@ proper git https://github.com/manopapad/proper master http://proper.softlab.ntua 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. ptrackerl git https://github.com/inaka/ptrackerl.git 0.2 https://github.com/inaka/ptrackerl.git Pivotal Tracker API Client written in Erlang pusherman git https://github.com/inaka/pusherman.git 1 https://github.com/inaka/pusherman.git queuing system for push notifications -ranch git https://github.com/ninenines/ranch 1.0.0 http://ninenines.eu Socket acceptor pool for TCP protocols. +ranch git https://github.com/ninenines/ranch 1.1.0 http://ninenines.eu Socket acceptor pool for TCP protocols. resource_discovery git https://github.com/erlware/resource_discovery master http://erlware.org/ An application used to dynamically discover resources present in an Erlang node cluster. sfmt-erlang git https://github.com/jj1bdx/sfmt-erlang master https://github.com/jj1bdx/sfmt-erlang SFMT pseudo random number generator for Erlang. sheriff git https://github.com/extend/sheriff master http://ninenines.eu Parse transform for type based validation. diff --git a/plugins/c_src.mk b/plugins/c_src.mk index 2004b2d..daee44e 100644 --- a/plugins/c_src.mk +++ b/plugins/c_src.mk @@ -43,7 +43,7 @@ $(C_SRC_ENV): erl -noshell -noinput -eval "file:write_file(\"$(C_SRC_ENV)\", \ io_lib:format(\"ERTS_INCLUDE_DIR ?= ~s/erts-~s/include/\", \ [code:root_dir(), erlang:system_info(version)])), \ - init:stop()." + erlang:halt()." -include $(C_SRC_ENV) |