diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | README.md | 61 | ||||
-rw-r--r-- | build.config | 1 | ||||
-rw-r--r-- | core/core.mk | 2 | ||||
-rw-r--r-- | core/deps.mk | 8 | ||||
-rw-r--r-- | core/erlc.mk | 11 | ||||
-rw-r--r-- | erlang.mk | 81 | ||||
-rw-r--r-- | packages.v1.tsv | 43 | ||||
-rw-r--r-- | packages.v1.txt | 43 | ||||
-rw-r--r-- | packages.v2.tsv | 31 | ||||
-rwxr-xr-x | pkg_add.sh | 10 | ||||
-rw-r--r-- | plugins/c_src.mk | 2 | ||||
-rw-r--r-- | plugins/dialyzer.mk | 8 | ||||
-rw-r--r-- | plugins/relx.mk | 23 | ||||
-rw-r--r-- | plugins/shell.mk | 28 |
15 files changed, 313 insertions, 45 deletions
@@ -19,5 +19,9 @@ ERLANG_MK = erlang.mk .PHONY: all -all: +all: pkg awk 'FNR==1 && NR!=1{print ""}1' $(patsubst %,%.mk,$(BUILD_CONFIG)) > $(ERLANG_MK) + +pkg: + cat packages.v2.tsv | awk 'BEGIN { FS = "\t" }; { print $$1 "\t" $$3 "\t" $$5 "\t" $$6 }' > packages.v1.tsv + cp packages.v1.tsv packages.v1.txt @@ -82,7 +82,8 @@ put the project information directly in the Makefile. In the latter case you need to create a variable `dep_*` with the asterisk replaced by the project name, for example `cowboy`. This variable must contain three things: the fetching method used, the -URL and the version requested. +URL and the version requested. These lines must be defined before +the erlang.mk include line. The following snippet overrides the Cowboy version required: @@ -322,6 +323,64 @@ You can change the generated releases location by setting the `RELX_OUTPUT_DIR` variable. Any other option should go in the `RELX_OPTS` variable. +If `RELX_OPTS` includes the `-o` option (instead of using +`RELX_OUTPUT_DIR`, then that option must be the first in +the list, otherwise erlang.mk will fail to find it and +will not be able to clean up the release directory. + +Shell plugin +------------ + +This plugin is available by default. + +`SHELL_DEPS` adds the specified modules only when `make shell` +or `make build-shell-deps` is run. For example, to include a module +reloader and TDD test runner, one might add `SHELL_DEPS = tddreloader` +to the Makefile. + +You can add extra `erl` options by defining the `SHELL_OPTS` variable. +For more information please see `erl -man erl`. + +`SHELL_PATH` adds paths to the shell's library search path. By default +this option sets the paths to `-pa ../$(PROJECT)/ebin $(DEPS_DIR)/*/ebin`. + +Contributing +------------ + +You can contribute by providing feedback, creating patches, +adding packages to the index or new features as plugins. + +To add a package to the index, please use the `pkg_add.sh` +script. To use it, first fork the repository, then please +follow the example below: + +``` bash +$ git clone https://github.com/$YOURUSERNAME/erlang.mk +$ cd erlang.mk +$ ./pkg_add.sh cowboy git https://github.com/ninenines/cowboy 1.0.0 http://ninenines.eu "Small, fast and modular HTTP server." +$ git push origin master +``` + +Then open a pull request. The arguments given to the script +are, in order, the project name, the download method used, +the repository URL, the commit/tag/branch/version to pull, +a link to the package's website and finally its description. +Make sure to put double quotes around the description. + +You can submit as many packages as you want in one pull +request as long as you follow the instructions above. + +For patches or plugins, you have to edit the `core/*.mk` +or `plugins/*.mk` files and then run `make` to create an +updated `erlang.mk`. If you submit a new plugin, you also +need to add it to the `build.config` file. + +Make sure to keep the commit title short, to have a single +commit per package/feature/fix and you're good to submit +a pull request! And again, please don't forget to run make +and to commit the updated erlang.mk or index files along +with your other changes. Thanks! + Support ------- diff --git a/build.config b/build.config index 7440d0d..7bc09ff 100644 --- a/build.config +++ b/build.config @@ -16,3 +16,4 @@ plugins/dialyzer plugins/erlydtl plugins/edoc plugins/relx +plugins/shell diff --git a/core/core.mk b/core/core.mk index f73ef7f..ec42331 100644 --- a/core/core.mk +++ b/core/core.mk @@ -68,6 +68,6 @@ define core_http_get endef else define core_http_get - erl -noshell -eval ' ssl:start(), inets:start(), case httpc:request(get, {"$(2)", []}, [{autoredirect, true}], []) of {ok, {{_V, 200, _R}, _H, Body}} -> case file:write_file("$(1)", Body) of ok -> ok ; {error, R1} -> halt(R1) end ; {error, R2} -> halt(R2) end, halt(0). ' + 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 diff --git a/core/deps.mk b/core/deps.mk index 6929f5f..490e675 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -46,7 +46,11 @@ define dep_fetch if [ "$$$$VS" = "git" ]; then \ git clone -n -- $$$$REPO $(DEPS_DIR)/$(1); \ cd $(DEPS_DIR)/$(1) && git checkout -q $$$$COMMIT; \ + elif [ "$$$$VS" = "hg" ]; then \ + hg clone -U $$$$REPO $(DEPS_DIR)/$(1); \ + cd $(DEPS_DIR)/$(1) && hg update -q $$$$COMMIT; \ else \ + echo "Unknown or invalid dependency: $(1). Please consult the erlang.mk README for instructions." >&2; \ exit 78; \ fi endef @@ -56,13 +60,13 @@ $(DEPS_DIR)/$(1): @mkdir -p $(DEPS_DIR) @if [ ! -f $(PKG_FILE2) ]; then $(call core_http_get,$(PKG_FILE2),$(PKG_FILE_URL)); fi ifeq (,$(dep_$(1))) - DEPPKG=$$$$(awk 'BEGIN { FS = "\t" }; $$$$1 == "$(1)" { print $$$$2 " " $$$$3 " " $$$$4 }' $(PKG_FILE2);) \ + @DEPPKG=$$$$(awk 'BEGIN { FS = "\t" }; $$$$1 == "$(1)" { print $$$$2 " " $$$$3 " " $$$$4 }' $(PKG_FILE2);); \ VS=$$$$(echo $$$$DEPPKG | cut -d " " -f1); \ REPO=$$$$(echo $$$$DEPPKG | cut -d " " -f2); \ COMMIT=$$$$(echo $$$$DEPPKG | cut -d " " -f3); \ $(call dep_fetch,$(1)) else - VS=$(word 1,$(dep_$(1))); \ + @VS=$(word 1,$(dep_$(1))); \ REPO=$(word 2,$(dep_$(1))); \ COMMIT=$(word 3,$(dep_$(1))); \ $(call dep_fetch,$(1)) diff --git a/core/erlc.mk b/core/erlc.mk index 87d10d8..03e174e 100644 --- a/core/erlc.mk +++ b/core/erlc.mk @@ -23,9 +23,13 @@ xyrl_verbose = $(xyrl_verbose_$(V)) # Core targets. -app:: ebin/$(PROJECT).app +app:: erlc-include ebin/$(PROJECT).app $(eval MODULES := $(shell find ebin -type f -name \*.beam \ | sed "s/ebin\//'/;s/\.beam/',/" | sed '$$s/.$$//')) + @if [ -z "$$(grep -E '^[^%]*{modules,' src/$(PROJECT).app.src)" ]; then \ + echo "Empty modules entry not found in $(PROJECT).app.src. Please consult the erlang.mk README for instructions." >&2; \ + exit 1; \ + fi $(appsrc_verbose) cat src/$(PROJECT).app.src \ | sed "s/{modules,[[:space:]]*\[\]}/{modules, \[$(MODULES)\]}/" \ > ebin/$(PROJECT).app @@ -58,5 +62,10 @@ clean:: clean-app # Extra targets. +erlc-include: + -@if [ -d ebin/ ]; then \ + find include/ src/ -type f -name \*.hrl -newer ebin -exec touch $(shell find src/ -type f -name "*.erl") \; 2>/dev/null || printf ''; \ + fi + clean-app: $(gen_verbose) rm -rf ebin/ @@ -68,7 +68,7 @@ define core_http_get endef else define core_http_get - erl -noshell -eval ' ssl:start(), inets:start(), case httpc:request(get, {"$(2)", []}, [{autoredirect, true}], []) of {ok, {{_V, 200, _R}, _H, Body}} -> case file:write_file("$(1)", Body) of ok -> ok ; {error, R1} -> halt(R1) end ; {error, R2} -> halt(R2) end, halt(0). ' + 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 @@ -120,7 +120,11 @@ define dep_fetch if [ "$$$$VS" = "git" ]; then \ git clone -n -- $$$$REPO $(DEPS_DIR)/$(1); \ cd $(DEPS_DIR)/$(1) && git checkout -q $$$$COMMIT; \ + elif [ "$$$$VS" = "hg" ]; then \ + hg clone -U $$$$REPO $(DEPS_DIR)/$(1); \ + cd $(DEPS_DIR)/$(1) && hg update -q $$$$COMMIT; \ else \ + echo "Unknown or invalid dependency: $(1). Please consult the erlang.mk README for instructions." >&2; \ exit 78; \ fi endef @@ -130,13 +134,13 @@ $(DEPS_DIR)/$(1): @mkdir -p $(DEPS_DIR) @if [ ! -f $(PKG_FILE2) ]; then $(call core_http_get,$(PKG_FILE2),$(PKG_FILE_URL)); fi ifeq (,$(dep_$(1))) - DEPPKG=$$$$(awk 'BEGIN { FS = "\t" }; $$$$1 == "$(1)" { print $$$$2 " " $$$$3 " " $$$$4 }' $(PKG_FILE2);) \ + @DEPPKG=$$$$(awk 'BEGIN { FS = "\t" }; $$$$1 == "$(1)" { print $$$$2 " " $$$$3 " " $$$$4 }' $(PKG_FILE2);); \ VS=$$$$(echo $$$$DEPPKG | cut -d " " -f1); \ REPO=$$$$(echo $$$$DEPPKG | cut -d " " -f2); \ COMMIT=$$$$(echo $$$$DEPPKG | cut -d " " -f3); \ $(call dep_fetch,$(1)) else - VS=$(word 1,$(dep_$(1))); \ + @VS=$(word 1,$(dep_$(1))); \ REPO=$(word 2,$(dep_$(1))); \ COMMIT=$(word 3,$(dep_$(1))); \ $(call dep_fetch,$(1)) @@ -206,9 +210,13 @@ xyrl_verbose = $(xyrl_verbose_$(V)) # Core targets. -app:: ebin/$(PROJECT).app +app:: erlc-include ebin/$(PROJECT).app $(eval MODULES := $(shell find ebin -type f -name \*.beam \ | sed "s/ebin\//'/;s/\.beam/',/" | sed '$$s/.$$//')) + @if [ -z "$$(grep -E '^[^%]*{modules,' src/$(PROJECT).app.src)" ]; then \ + echo "Empty modules entry not found in $(PROJECT).app.src. Please consult the erlang.mk README for instructions." >&2; \ + exit 1; \ + fi $(appsrc_verbose) cat src/$(PROJECT).app.src \ | sed "s/{modules,[[:space:]]*\[\]}/{modules, \[$(MODULES)\]}/" \ > ebin/$(PROJECT).app @@ -241,6 +249,11 @@ clean:: clean-app # Extra targets. +erlc-include: + -@if [ -d ebin/ ]; then \ + find include/ src/ -type f -name \*.hrl -newer ebin -exec touch $(shell find src/ -type f -name "*.erl") \; 2>/dev/null || printf ''; \ + fi + clean-app: $(gen_verbose) rm -rf ebin/ @@ -624,13 +637,19 @@ help:: # Plugin-specific targets. -plt: deps app +$(DIALYZER_PLT): deps app @dialyzer --build_plt --apps erts kernel stdlib $(PLT_APPS) $(ALL_DEPS_DIRS) +plt: $(DIALYZER_PLT) + distclean-plt: $(gen_verbose) rm -f $(DIALYZER_PLT) +ifneq ($(wildcard $(DIALYZER_PLT)),) dialyze: +else +dialyze: $(DIALYZER_PLT) +endif @dialyzer --no_native --src -r src $(DIALYZER_OPTS) # Copyright (c) 2013-2014, Loïc Hoguin <[email protected]> @@ -684,14 +703,12 @@ distclean-edoc: # 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. -.PHONY: distclean-rel +.PHONY: relx-rel distclean-relx-rel distclean-relx # Configuration. RELX_CONFIG ?= $(CURDIR)/relx.config -ifneq ($(wildcard $(RELX_CONFIG)),) - RELX ?= $(CURDIR)/relx export RELX @@ -701,14 +718,17 @@ RELX_OUTPUT_DIR ?= _rel ifeq ($(firstword $(RELX_OPTS)),-o) RELX_OUTPUT_DIR = $(word 2,$(RELX_OPTS)) +else + RELX_OPTS += -o $(RELX_OUTPUT_DIR) endif # Core targets. -rel:: distclean-rel $(RELX) - @$(RELX) -c $(RELX_CONFIG) $(RELX_OPTS) +ifneq ($(wildcard $(RELX_CONFIG)),) +rel:: distclean-relx-rel relx-rel +endif -distclean:: distclean-rel +distclean:: distclean-relx-rel distclean-relx # Plugin-specific targets. @@ -720,7 +740,40 @@ endef $(RELX): @$(call relx_fetch) -distclean-rel: - $(gen_verbose) rm -rf $(RELX) $(RELX_OUTPUT_DIR) +relx-rel: $(RELX) + @$(RELX) -c $(RELX_CONFIG) $(RELX_OPTS) -endif +distclean-relx-rel: + $(gen_verbose) rm -rf $(RELX_OUTPUT_DIR) + +distclean-relx: + $(gen_verbose) rm -rf $(RELX) + +# Copyright (c) 2014, M Robert Martin <[email protected]> +# This file is contributed to erlang.mk and subject to the terms of the ISC License. + +.PHONY: shell + +# Configuration. + +SHELL_PATH ?= -pa ../$(PROJECT)/ebin $(DEPS_DIR)/*/ebin +SHELL_OPTS ?= + +ALL_SHELL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(SHELL_DEPS)) + +# Core targets + +help:: + @printf "%s\n" "" \ + "Shell targets:" \ + " shell Run an erlang shell with SHELL_OPTS or reasonable default" + +# Plugin-specific targets. + +$(foreach dep,$(SHELL_DEPS),$(eval $(call dep_target,$(dep)))) + +build-shell-deps: $(ALL_SHELL_DEPS_DIRS) + @for dep in $(ALL_SHELL_DEPS_DIRS) ; do $(MAKE) -C $$dep ; done + +shell: build-shell-deps + $(gen_verbose) erl $(SHELL_PATH) $(SHELL_OPTS) diff --git a/packages.v1.tsv b/packages.v1.tsv index 02a1a39..38805aa 100644 --- a/packages.v1.tsv +++ b/packages.v1.tsv @@ -1,12 +1,41 @@ +apns4erl https://github.com/inaka/apns4erl.git http://inaka.github.com/apns4erl Apple Push Notification Server for Erlang bullet https://github.com/extend/bullet http://ninenines.eu Simple, reliable, efficient streaming for Cowboy. -cowboy https://github.com/extend/cowboy http://ninenines.eu Small, fast and modular HTTP server. -cowlib https://github.com/extend/cowlib http://ninenines.eu Support library for manipulating Web protocols. +cake https://github.com/darach/cake-erl https://github.com/darach/cake-erl Really simple terminal colorization +classifier https://github.com/inaka/classifier.git https://github.com/inaka/classifier An Erlang Bayesian Filter and Text Classifier +cowboy https://github.com/ninenines/cowboy http://ninenines.eu Small, fast and modular HTTP server. +cowlib https://github.com/ninenines/cowlib http://ninenines.eu Support library for manipulating Web protocols. +ebitly https://github.com/inaka/ebitly.git http://inaka.github.com/ebitly Bit.ly API wrapper for Erlang +edis https://github.com/inaka/edis.git http://inaka.github.com/edis/ An Erlang implementation of Redis KV Store +eganglia https://github.com/inaka/eganglia.git https://github.com/inaka/eganglia.git Erlang library to interact with Ganglia +ehsa https://bitbucket.org/a12n/ehsa https://bitbucket.org/a12n/ehsa Erlang HTTP server basic and digest authentication modules +elvis https://github.com/inaka/elvis.git https://github.com/inaka/elvis.git Erlang Style Reviewer +eper https://github.com/massemanet/eper https://github.com/massemanet/eper Erlang performance and debugging tools. +epgsql https://github.com/epgsql/epgsql https://github.com/epgsql/epgsql Erlang PostgreSQL client library. +eredis https://github.com/wooga/eredis https://github.com/wooga/eredis Non-blocking Redis client with focus on performance and robustness +erldb https://github.com/erldb/erldb.git http://erldb.org ORM (Object-relational mapping) application implemented in Erlang erlydtl https://github.com/erlydtl/erlydtl https://github.com/erlydtl/erlydtl Django Template Language for Erlang. -eper https://github.com/massemanet/eper https://github.com/massemanet/eper Erlang Performance and debugging tools. -farwest_core https://github.com/extend/farwest_core http//ninenines.eu Modern web application development platform. -farwest_ui https://github.com/extend/farwest_ui http://ninenines.eu Development and administration UI for Farwest. +erwa https://github.com/bwegh/erwa https://github.com/bwegh/erwa A WAMP router and client written in Erlang. gun https://github.com/extend/gun http//ninenines.eu Asynchronous SPDY, HTTP and Websocket client written in Erlang. +ibrowse https://github.com/cmullaparthi/ibrowse https://github.com/cmullaparthi/ibrowse Erlang HTTP client +itweet https://github.com/inaka/itweet.git http://inaka.github.com/itweet/ Twitter Stream API on ibrowse +jiffy https://github.com/davisp/jiffy https://github.com/davisp/jiffy JSON NIFs for Erlang. jsx https://github.com/talentdeficit/jsx https://github.com/talentdeficit/jsx An Erlang application for consuming, producing and manipulating JSON. -ranch https://github.com/extend/ranch http://ninenines.eu Socket acceptor pool for TCP protocols. -sheriff https://github.com/extend/sheriff http://ninenines.eu Parse transform for type based validation. +katja https://github.com/nifoc/katja https://github.com/nifoc/katja A simple Riemann client written in Erlang. +lager https://github.com/basho/lager https://github.com/basho/lager A logging framework for Erlang/OTP. +lasse https://github.com/inaka/lasse.git https://github.com/inaka/lasse.git SSE handler for Cowboy +leptus https://github.com/s1n4/leptus https://github.com/s1n4/leptus Erlang REST framework +mekao https://github.com/ddosia/mekao.git https://github.com/ddosia/mekao SQL constructor +neo4j https://github.com/dmitriid/neo4j-erlang https://github.com/dmitriid/neo4j-erlang Erlang client library for Neo4J. +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. +ptrackerl https://github.com/inaka/ptrackerl.git https://github.com/inaka/ptrackerl.git Pivotal Tracker API Client written in Erlang +pusherman https://github.com/inaka/pusherman.git https://github.com/inaka/pusherman.git queuing system for push notifications +ranch https://github.com/ninenines/ranch http://ninenines.eu Socket acceptor pool for TCP protocols. +resource_discovery https://github.com/erlware/resource_discovery http://erlware.org/ An application used to dynamically discover resources present in an Erlang node cluster. +sheriff https://github.com/extend/sheriff http://ninenines.eu Parse transform for type based validation. +shotgun https://github.com/inaka/shotgun.git https://github.com/inaka/shotgun.git better than just a gun +sumo_db https://github.com/inaka/sumo_db.git https://github.com/inaka/sumo_db.git Erlang Persistency Framework +swab https://github.com/crownedgrouse/swab.git https://github.com/crownedgrouse/swab General purpose buffer handling module +tddreloader https://github.com/version2beta/tddreloader https://github.com/version2beta/tddreloader Shell utility for recompiling, reloading, and testing code as it changes +tinymt-erlang https://github.com/jj1bdx/tinymt-erlang https://github.com/jj1bdx/tinymt-erlang TinyMT pseudo random number generator for Erlang. +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 02a1a39..38805aa 100644 --- a/packages.v1.txt +++ b/packages.v1.txt @@ -1,12 +1,41 @@ +apns4erl https://github.com/inaka/apns4erl.git http://inaka.github.com/apns4erl Apple Push Notification Server for Erlang bullet https://github.com/extend/bullet http://ninenines.eu Simple, reliable, efficient streaming for Cowboy. -cowboy https://github.com/extend/cowboy http://ninenines.eu Small, fast and modular HTTP server. -cowlib https://github.com/extend/cowlib http://ninenines.eu Support library for manipulating Web protocols. +cake https://github.com/darach/cake-erl https://github.com/darach/cake-erl Really simple terminal colorization +classifier https://github.com/inaka/classifier.git https://github.com/inaka/classifier An Erlang Bayesian Filter and Text Classifier +cowboy https://github.com/ninenines/cowboy http://ninenines.eu Small, fast and modular HTTP server. +cowlib https://github.com/ninenines/cowlib http://ninenines.eu Support library for manipulating Web protocols. +ebitly https://github.com/inaka/ebitly.git http://inaka.github.com/ebitly Bit.ly API wrapper for Erlang +edis https://github.com/inaka/edis.git http://inaka.github.com/edis/ An Erlang implementation of Redis KV Store +eganglia https://github.com/inaka/eganglia.git https://github.com/inaka/eganglia.git Erlang library to interact with Ganglia +ehsa https://bitbucket.org/a12n/ehsa https://bitbucket.org/a12n/ehsa Erlang HTTP server basic and digest authentication modules +elvis https://github.com/inaka/elvis.git https://github.com/inaka/elvis.git Erlang Style Reviewer +eper https://github.com/massemanet/eper https://github.com/massemanet/eper Erlang performance and debugging tools. +epgsql https://github.com/epgsql/epgsql https://github.com/epgsql/epgsql Erlang PostgreSQL client library. +eredis https://github.com/wooga/eredis https://github.com/wooga/eredis Non-blocking Redis client with focus on performance and robustness +erldb https://github.com/erldb/erldb.git http://erldb.org ORM (Object-relational mapping) application implemented in Erlang erlydtl https://github.com/erlydtl/erlydtl https://github.com/erlydtl/erlydtl Django Template Language for Erlang. -eper https://github.com/massemanet/eper https://github.com/massemanet/eper Erlang Performance and debugging tools. -farwest_core https://github.com/extend/farwest_core http//ninenines.eu Modern web application development platform. -farwest_ui https://github.com/extend/farwest_ui http://ninenines.eu Development and administration UI for Farwest. +erwa https://github.com/bwegh/erwa https://github.com/bwegh/erwa A WAMP router and client written in Erlang. gun https://github.com/extend/gun http//ninenines.eu Asynchronous SPDY, HTTP and Websocket client written in Erlang. +ibrowse https://github.com/cmullaparthi/ibrowse https://github.com/cmullaparthi/ibrowse Erlang HTTP client +itweet https://github.com/inaka/itweet.git http://inaka.github.com/itweet/ Twitter Stream API on ibrowse +jiffy https://github.com/davisp/jiffy https://github.com/davisp/jiffy JSON NIFs for Erlang. jsx https://github.com/talentdeficit/jsx https://github.com/talentdeficit/jsx An Erlang application for consuming, producing and manipulating JSON. -ranch https://github.com/extend/ranch http://ninenines.eu Socket acceptor pool for TCP protocols. -sheriff https://github.com/extend/sheriff http://ninenines.eu Parse transform for type based validation. +katja https://github.com/nifoc/katja https://github.com/nifoc/katja A simple Riemann client written in Erlang. +lager https://github.com/basho/lager https://github.com/basho/lager A logging framework for Erlang/OTP. +lasse https://github.com/inaka/lasse.git https://github.com/inaka/lasse.git SSE handler for Cowboy +leptus https://github.com/s1n4/leptus https://github.com/s1n4/leptus Erlang REST framework +mekao https://github.com/ddosia/mekao.git https://github.com/ddosia/mekao SQL constructor +neo4j https://github.com/dmitriid/neo4j-erlang https://github.com/dmitriid/neo4j-erlang Erlang client library for Neo4J. +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. +ptrackerl https://github.com/inaka/ptrackerl.git https://github.com/inaka/ptrackerl.git Pivotal Tracker API Client written in Erlang +pusherman https://github.com/inaka/pusherman.git https://github.com/inaka/pusherman.git queuing system for push notifications +ranch https://github.com/ninenines/ranch http://ninenines.eu Socket acceptor pool for TCP protocols. +resource_discovery https://github.com/erlware/resource_discovery http://erlware.org/ An application used to dynamically discover resources present in an Erlang node cluster. +sheriff https://github.com/extend/sheriff http://ninenines.eu Parse transform for type based validation. +shotgun https://github.com/inaka/shotgun.git https://github.com/inaka/shotgun.git better than just a gun +sumo_db https://github.com/inaka/sumo_db.git https://github.com/inaka/sumo_db.git Erlang Persistency Framework +swab https://github.com/crownedgrouse/swab.git https://github.com/crownedgrouse/swab General purpose buffer handling module +tddreloader https://github.com/version2beta/tddreloader https://github.com/version2beta/tddreloader Shell utility for recompiling, reloading, and testing code as it changes +tinymt-erlang https://github.com/jj1bdx/tinymt-erlang https://github.com/jj1bdx/tinymt-erlang TinyMT pseudo random number generator for Erlang. +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 cab43cc..b99c6fd 100644 --- a/packages.v2.tsv +++ b/packages.v2.tsv @@ -1,10 +1,41 @@ +apns4erl git https://github.com/inaka/apns4erl.git 1.0 http://inaka.github.com/apns4erl Apple Push Notification Server for Erlang 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. +ebitly git https://github.com/inaka/ebitly.git 0.0.1 http://inaka.github.com/ebitly Bit.ly API wrapper for Erlang +edis git https://github.com/inaka/edis.git 0.2.0 http://inaka.github.com/edis/ An Erlang implementation of Redis KV Store +eganglia git https://github.com/inaka/eganglia.git 0.9.1 https://github.com/inaka/eganglia.git Erlang library to interact with Ganglia +ehsa hg https://bitbucket.org/a12n/ehsa 2.0.4 https://bitbucket.org/a12n/ehsa Erlang HTTP server basic and digest authentication modules +elvis git https://github.com/inaka/elvis.git 0.1.0-alpha https://github.com/inaka/elvis.git Erlang Style Reviewer eper git https://github.com/massemanet/eper master https://github.com/massemanet/eper Erlang performance and debugging tools. +epgsql git https://github.com/epgsql/epgsql master https://github.com/epgsql/epgsql Erlang PostgreSQL client library. +eredis git https://github.com/wooga/eredis master https://github.com/wooga/eredis Non-blocking Redis client with focus on performance and robustness +erldb git https://github.com/erldb/erldb.git master http://erldb.org ORM (Object-relational mapping) application implemented in Erlang erlydtl git https://github.com/erlydtl/erlydtl master https://github.com/erlydtl/erlydtl Django Template Language for Erlang. +erwa git https://github.com/bwegh/erwa master https://github.com/bwegh/erwa A WAMP router and client written in Erlang. gun git https://github.com/extend/gun master http//ninenines.eu Asynchronous SPDY, HTTP and Websocket client written in Erlang. +ibrowse git https://github.com/cmullaparthi/ibrowse v4.1.1 https://github.com/cmullaparthi/ibrowse Erlang HTTP client +itweet git https://github.com/inaka/itweet.git 3.0 http://inaka.github.com/itweet/ Twitter Stream API on ibrowse +jiffy git https://github.com/davisp/jiffy master https://github.com/davisp/jiffy JSON NIFs for Erlang. jsx git https://github.com/talentdeficit/jsx master https://github.com/talentdeficit/jsx An Erlang application for consuming, producing and manipulating JSON. +katja git https://github.com/nifoc/katja master https://github.com/nifoc/katja A simple Riemann client written in Erlang. +lager git https://github.com/basho/lager master https://github.com/basho/lager A logging framework for Erlang/OTP. +lasse git https://github.com/inaka/lasse.git 0.1.0 https://github.com/inaka/lasse.git SSE handler for Cowboy +leptus git https://github.com/s1n4/leptus https://github.com/s1n4/leptus Erlang REST framework +mekao git https://github.com/ddosia/mekao.git master https://github.com/ddosia/mekao SQL constructor +neo4j git https://github.com/dmitriid/neo4j-erlang master https://github.com/dmitriid/neo4j-erlang Erlang client library for Neo4J. +pegjs git https://github.com/dmitriid/pegjs 0.2.1 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. +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. +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. sheriff git https://github.com/extend/sheriff master http://ninenines.eu Parse transform for type based validation. +shotgun git https://github.com/inaka/shotgun.git 0.1 https://github.com/inaka/shotgun.git better than just a gun +sumo_db git https://github.com/inaka/sumo_db.git 1 https://github.com/inaka/sumo_db.git Erlang Persistency Framework +swab git https://github.com/crownedgrouse/swab.git master https://github.com/crownedgrouse/swab General purpose buffer handling module +tddreloader git https://github.com/version2beta/tddreloader master https://github.com/version2beta/tddreloader Shell utility for recompiling, reloading, and testing code as it changes +tinymt-erlang git https://github.com/jj1bdx/tinymt-erlang master https://github.com/jj1bdx/tinymt-erlang TinyMT pseudo random number generator for Erlang. +zeta git https://github.com/s1n4/zeta https://github.com/s1n4/zeta HTTP access log parser in Erlang diff --git a/pkg_add.sh b/pkg_add.sh new file mode 100755 index 0000000..9c26baa --- /dev/null +++ b/pkg_add.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +PKG_FILE="packages.v2.tsv" +LINE="$1\t$2\t$3\t$4\t$5\t$6\n" +COMMIT="Add package $1 to the index" + +printf "$LINE" >> $PKG_FILE +sort $PKG_FILE -o $PKG_FILE +make +git commit -m "$COMMIT" packages.* diff --git a/plugins/c_src.mk b/plugins/c_src.mk index 63ca6bc..2004b2d 100644 --- a/plugins/c_src.mk +++ b/plugins/c_src.mk @@ -48,7 +48,7 @@ $(C_SRC_ENV): -include $(C_SRC_ENV) else -ifneq ($(wildcard $(C_SRC_DIR),)) +ifneq ($(wildcard $(C_SRC_DIR)),) app:: $(MAKE) -C $(C_SRC_DIR) diff --git a/plugins/dialyzer.mk b/plugins/dialyzer.mk index 8e404d1..db1143a 100644 --- a/plugins/dialyzer.mk +++ b/plugins/dialyzer.mk @@ -24,11 +24,17 @@ help:: # Plugin-specific targets. -plt: deps app +$(DIALYZER_PLT): deps app @dialyzer --build_plt --apps erts kernel stdlib $(PLT_APPS) $(ALL_DEPS_DIRS) +plt: $(DIALYZER_PLT) + distclean-plt: $(gen_verbose) rm -f $(DIALYZER_PLT) +ifneq ($(wildcard $(DIALYZER_PLT)),) dialyze: +else +dialyze: $(DIALYZER_PLT) +endif @dialyzer --no_native --src -r src $(DIALYZER_OPTS) diff --git a/plugins/relx.mk b/plugins/relx.mk index ad8343f..ee226d3 100644 --- a/plugins/relx.mk +++ b/plugins/relx.mk @@ -1,14 +1,12 @@ # 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. -.PHONY: distclean-rel +.PHONY: relx-rel distclean-relx-rel distclean-relx # Configuration. RELX_CONFIG ?= $(CURDIR)/relx.config -ifneq ($(wildcard $(RELX_CONFIG)),) - RELX ?= $(CURDIR)/relx export RELX @@ -18,14 +16,17 @@ RELX_OUTPUT_DIR ?= _rel ifeq ($(firstword $(RELX_OPTS)),-o) RELX_OUTPUT_DIR = $(word 2,$(RELX_OPTS)) +else + RELX_OPTS += -o $(RELX_OUTPUT_DIR) endif # Core targets. -rel:: distclean-rel $(RELX) - @$(RELX) -c $(RELX_CONFIG) $(RELX_OPTS) +ifneq ($(wildcard $(RELX_CONFIG)),) +rel:: distclean-relx-rel relx-rel +endif -distclean:: distclean-rel +distclean:: distclean-relx-rel distclean-relx # Plugin-specific targets. @@ -37,7 +38,11 @@ endef $(RELX): @$(call relx_fetch) -distclean-rel: - $(gen_verbose) rm -rf $(RELX) $(RELX_OUTPUT_DIR) +relx-rel: $(RELX) + @$(RELX) -c $(RELX_CONFIG) $(RELX_OPTS) + +distclean-relx-rel: + $(gen_verbose) rm -rf $(RELX_OUTPUT_DIR) -endif +distclean-relx: + $(gen_verbose) rm -rf $(RELX) diff --git a/plugins/shell.mk b/plugins/shell.mk new file mode 100644 index 0000000..9cbee2e --- /dev/null +++ b/plugins/shell.mk @@ -0,0 +1,28 @@ +# Copyright (c) 2014, M Robert Martin <[email protected]> +# This file is contributed to erlang.mk and subject to the terms of the ISC License. + +.PHONY: shell + +# Configuration. + +SHELL_PATH ?= -pa ../$(PROJECT)/ebin $(DEPS_DIR)/*/ebin +SHELL_OPTS ?= + +ALL_SHELL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(SHELL_DEPS)) + +# Core targets + +help:: + @printf "%s\n" "" \ + "Shell targets:" \ + " shell Run an erlang shell with SHELL_OPTS or reasonable default" + +# Plugin-specific targets. + +$(foreach dep,$(SHELL_DEPS),$(eval $(call dep_target,$(dep)))) + +build-shell-deps: $(ALL_SHELL_DEPS_DIRS) + @for dep in $(ALL_SHELL_DEPS_DIRS) ; do $(MAKE) -C $$dep ; done + +shell: build-shell-deps + $(gen_verbose) erl $(SHELL_PATH) $(SHELL_OPTS) |