FELQJDFKQOU2G3VQG3Y4WTW4LWTNUPDI6HVLHGNTCFOXN6MN6MOQC -module(hash_handler).-behavior(cowboy_rest).-export([init/2]).-export([allowed_methods/2]).-export([content_types_accepted/2]).-export([resource_exists/2]).init(Req, State) ->{cowboy_rest, Req, State}.allowed_methods(Req, State) ->{[<<"POST">>], Req, State}.content_types_accepted(Req, State) ->Req, State}.resource_exists(Req, State) ->{false, Req, State}.{true, Req2, State}.to_json(Req, State) ->% Not used but required by content_types_provided/2{true, Req, State}.from_json(Req, State) ->{ok, Body, Req1} = cowboy_req:read_body(Req),{ok, Data} = thoas:decode(Body),% Use same defaults than bcryptRounds = maps:get(rounds, Data, 12),{ok, Salt} = bcrypt:gen_salt(Rounds),% Hash the whole Body to ensure that players don't overwrite% settings in the requests.{ok, Hash} = bcrypt:hashpw(Body, Salt),Res = thoas:encode(#{<<"digest">> => list_to_binary(Hash)}),Req2 = cowboy_req:set_resp_body(Res, Req1),content_types_provided(Req, State) ->% Required everytime the client request contains an% "Accept" header. Even if the method is never GET% and this callback is never called.{[{<<"application/json">>, to_json}], Req, State}.{[{<<"application/json">>, from_json}],-export([from_json/2]).-export([to_json/2]).-export([content_types_provided/2]).
-module(survival_app).-behaviour(application).-export([start/2]).-export([stop/1]).start(_Type, _Args) ->Dispatch = cowboy_router:compile([{ok, _} = cowboy:start_clear(my_http_listener,[{port, 8080}],#{env => #{dispatch => Dispatch}}),survival_sup:start_link().stop(_State) ->ok.{'_', [{"/hash", hash_handler, InitialState},{"/fanout", fanout_handler, InitialState}]}]),InitialState = #{},
# Copyright (c) 2013-2016, 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# copyright notice and this permission notice appear in all copies.## THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE..PHONY: all app apps deps search rel relup docs install-docs check tests clean distclean help erlang-mkERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))export ERLANG_MK_FILENAMEERLANG_MK_VERSION = 04c473aERLANG_MK_WITHOUT =# Make 3.81 and 3.82 are deprecated.ifeq ($(MAKELEVEL)$(MAKE_VERSION),03.81)$(warning Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html)endififeq ($(MAKELEVEL)$(MAKE_VERSION),03.82)$(warning Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html)endif# Core configuration.PROJECT ?= $(notdir $(CURDIR))PROJECT := $(strip $(PROJECT))PROJECT_VERSION ?= rollingPROJECT_MOD ?= $(PROJECT)_appPROJECT_ENV ?= []# Verbosity.V ?= 0verbose_0 = @verbose_2 = set -x;verbose = $(verbose_$(V))ifeq ($(V),3)SHELL := $(SHELL) -xendifgen_verbose_0 = @echo " GEN " $@;gen_verbose_2 = set -x;gen_verbose = $(gen_verbose_$(V))gen_verbose_esc_0 = @echo " GEN " $$@;gen_verbose_esc_2 = set -x;gen_verbose_esc = $(gen_verbose_esc_$(V))# Temporary files directory.ERLANG_MK_TMP ?= $(CURDIR)/.erlang.mkexport ERLANG_MK_TMP# "erl" command.ERL = erl +A1 -noinput -boot no_dot_erlang# Platform detection.ifeq ($(PLATFORM),)UNAME_S := $(shell uname -s)ifeq ($(UNAME_S),Linux)PLATFORM = linuxelse ifeq ($(UNAME_S),Darwin)PLATFORM = darwinelse ifeq ($(UNAME_S),SunOS)PLATFORM = solariselse ifeq ($(UNAME_S),GNU)PLATFORM = gnuelse ifeq ($(UNAME_S),FreeBSD)PLATFORM = freebsdelse ifeq ($(UNAME_S),NetBSD)PLATFORM = netbsdelse ifeq ($(UNAME_S),OpenBSD)PLATFORM = openbsdelse ifeq ($(UNAME_S),DragonFly)PLATFORM = dragonflyelse ifeq ($(shell uname -o),Msys)PLATFORM = msys2else$(error Unable to detect platform. Please open a ticket with the output of uname -a.)endifexport PLATFORMendif# Core targets.all:: deps app rel# Noop to avoid a Make warning when there's nothing to do.rel::$(verbose) :relup:: deps appcheck:: testsclean:: clean-crashdumpclean-crashdump:ifneq ($(wildcard erl_crash.dump),)$(gen_verbose) rm -f erl_crash.dumpendifdistclean:: clean distclean-tmp$(ERLANG_MK_TMP):$(verbose) mkdir -p $(ERLANG_MK_TMP)distclean-tmp:$(gen_verbose) rm -rf $(ERLANG_MK_TMP)help::$(verbose) printf "%s\n" \"erlang.mk (version $(ERLANG_MK_VERSION)) is distributed under the terms of the ISC License." \"Copyright (c) 2013-2016 Loïc Hoguin <essen@ninenines.eu>" \"" \"Usage: [V=1] $(MAKE) [target]..." \"" \"Core targets:" \" all Run deps, app and rel targets in that order" \" app Compile the project" \" deps Fetch dependencies (if needed) and compile them" \" fetch-deps Fetch dependencies recursively (if needed) without compiling them" \" list-deps List dependencies recursively on stdout" \" search q=... Search for a package in the built-in index" \" rel Build a release for this project, if applicable" \" docs Build the documentation for this project" \" install-docs Install the man pages for this project" \" check Compile and run all tests and analysis for this project" \" tests Run the tests for this project" \" clean Delete temporary and output files from most targets" \" distclean Delete all temporary and output files" \" help Display this help and exit" \" erlang-mk Update erlang.mk to the latest version"# Core functions.empty :=space := $(empty) $(empty)tab := $(empty) $(empty)comma := ,define newlineendefdefine comma_list$(subst $(space),$(comma),$(strip $(1)))endefdefine escape_dquotes$(subst ",\",$1)endef# Adding erlang.mk to make Erlang scripts who call init:get_plain_arguments() happy.define erlang$(ERL) $2 -pz $(ERLANG_MK_TMP)/rebar3/_build/prod/lib/*/ebin/ -eval "$(subst $(newline),,$(call escape_dquotes,$1))" -- erlang.mkendefifeq ($(PLATFORM),msys2)core_native_path = $(shell cygpath -m $1)elsecore_native_path = $1endifcore_http_get = curl -Lf$(if $(filter-out 0,$(V)),,s)o $(call core_native_path,$1) $2core_eq = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))# We skip files that contain spaces or '#' because they end up causing issues.core_find = $(if $(wildcard $1),$(shell find $(1:%/=%) \( -type l -o -type f \) -name $(subst *,\*,$2) -not -name "*[ \#]*"))core_lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$(1)))))))))))))))))))))))))))core_ls = $(filter-out $(1),$(shell echo $(1)))# @todo Use a solution that does not require using perl.core_relpath = $(shell perl -e 'use File::Spec; print File::Spec->abs2rel(@ARGV) . "\n"' $1 $2)define core_renderprintf -- '$(subst $(newline),\n,$(subst %,%%,$(subst ','\'',$(subst $(tab),$(WS),$(call $(1))))))\n' > $(2)endef# Automated update.ERLANG_MK_REPO ?= https://github.com/ninenines/erlang.mkERLANG_MK_COMMIT ?=ERLANG_MK_BUILD_CONFIG ?= build.configERLANG_MK_BUILD_DIR ?= .erlang.mk.builderlang-mk: WITHOUT ?= $(ERLANG_MK_WITHOUT)erlang-mk:ifdef ERLANG_MK_COMMIT$(verbose) git clone $(ERLANG_MK_REPO) $(ERLANG_MK_BUILD_DIR)$(verbose) cd $(ERLANG_MK_BUILD_DIR) && git checkout $(ERLANG_MK_COMMIT)else$(verbose) git clone --depth 1 $(ERLANG_MK_REPO) $(ERLANG_MK_BUILD_DIR)endif$(verbose) if [ -f $(ERLANG_MK_BUILD_CONFIG) ]; then cp $(ERLANG_MK_BUILD_CONFIG) $(ERLANG_MK_BUILD_DIR)/build.config; fi$(gen_verbose) $(MAKE) --no-print-directory -C $(ERLANG_MK_BUILD_DIR) WITHOUT='$(strip $(WITHOUT))' UPGRADE=1$(verbose) cp $(ERLANG_MK_BUILD_DIR)/erlang.mk ./erlang.mk$(verbose) rm -rf $(ERLANG_MK_BUILD_DIR)$(verbose) rm -rf $(ERLANG_MK_TMP)# The erlang.mk package index is bundled in the default erlang.mk build.# Search for the string "copyright" to skip to the rest of the code.# Copyright (c) 2015-2017, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: distclean-kerlKERL_INSTALL_DIR ?= $(HOME)/erlangifeq ($(strip $(KERL)),)KERL := $(ERLANG_MK_TMP)/kerl/kerlendifKERL_DIR = $(ERLANG_MK_TMP)/kerlexport KERLKERL_GIT ?= https://github.com/kerl/kerlKERL_COMMIT ?= masterKERL_MAKEFLAGS ?=OTP_GIT ?= https://github.com/erlang/otpdefine kerl_otp_target$(KERL_INSTALL_DIR)/$(1): $(KERL)$(verbose) if [ ! -d $$@ ]; then \MAKEFLAGS="$(KERL_MAKEFLAGS)" $(KERL) build git $(OTP_GIT) $(1) $(1); \$(KERL) install $(1) $(KERL_INSTALL_DIR)/$(1); \fiendef$(KERL): $(KERL_DIR)$(KERL_DIR): | $(ERLANG_MK_TMP)$(gen_verbose) git clone --depth 1 $(KERL_GIT) $(ERLANG_MK_TMP)/kerl$(verbose) cd $(ERLANG_MK_TMP)/kerl && git checkout $(KERL_COMMIT)$(verbose) chmod +x $(KERL)distclean:: distclean-kerldistclean-kerl:$(gen_verbose) rm -rf $(KERL_DIR)# Allow users to select which version of Erlang/OTP to use for a project.ifneq ($(strip $(LATEST_ERLANG_OTP)),)# In some environments it is necessary to filter out master.ERLANG_OTP := $(notdir $(lastword $(sort\$(filter-out $(KERL_INSTALL_DIR)/master $(KERL_INSTALL_DIR)/OTP_R%,\$(filter-out %-rc1 %-rc2 %-rc3,$(wildcard $(KERL_INSTALL_DIR)/*[^-native]))))))endifERLANG_OTP ?=# Use kerl to enforce a specific Erlang/OTP version for a project.ifneq ($(strip $(ERLANG_OTP)),)export PATH := $(KERL_INSTALL_DIR)/$(ERLANG_OTP)/bin:$(PATH)SHELL := env PATH=$(PATH) $(SHELL)$(eval $(call kerl_otp_target,$(ERLANG_OTP)))# Build Erlang/OTP only if it doesn't already exist.ifeq ($(wildcard $(KERL_INSTALL_DIR)/$(ERLANG_OTP))$(BUILD_ERLANG_OTP),)$(info Building Erlang/OTP $(ERLANG_OTP)... Please wait...)$(shell $(MAKE) $(KERL_INSTALL_DIR)/$(ERLANG_OTP) ERLANG_OTP=$(ERLANG_OTP) BUILD_ERLANG_OTP=1 >&2)endifendifPACKAGES += aberthpkg_aberth_name = aberthpkg_aberth_description = Generic BERT-RPC server in Erlangpkg_aberth_homepage = https://github.com/a13x/aberthpkg_aberth_fetch = gitpkg_aberth_repo = https://github.com/a13x/aberthpkg_aberth_commit = masterPACKAGES += activepkg_active_name = activepkg_active_description = Active development for Erlang: rebuild and reload source/binary files while the VM is runningpkg_active_homepage = https://github.com/proger/activepkg_active_fetch = gitpkg_active_repo = https://github.com/proger/activepkg_active_commit = masterPACKAGES += aleppopkg_aleppo_name = aleppopkg_aleppo_description = Alternative Erlang Pre-Processorpkg_aleppo_homepage = https://github.com/ErlyORM/aleppopkg_aleppo_fetch = gitpkg_aleppo_repo = https://github.com/ErlyORM/aleppopkg_aleppo_commit = masterPACKAGES += alogpkg_alog_name = alogpkg_alog_description = Simply the best logging framework for Erlangpkg_alog_homepage = https://github.com/siberian-fast-food/aloggerpkg_alog_fetch = gitpkg_alog_repo = https://github.com/siberian-fast-food/aloggerpkg_alog_commit = masterPACKAGES += annotationspkg_annotations_name = annotationspkg_annotations_description = Simple code instrumentation utilitiespkg_annotations_homepage = https://github.com/hyperthunk/annotationspkg_annotations_fetch = gitpkg_annotations_repo = https://github.com/hyperthunk/annotationspkg_annotations_commit = masterPACKAGES += apnspkg_apns_name = apnspkg_apns_description = Apple Push Notification Server for Erlangpkg_apns_homepage = http://inaka.github.com/apns4erlpkg_apns_fetch = gitpkg_apns_repo = https://github.com/inaka/apns4erlpkg_apns_commit = masterPACKAGES += asciideckpkg_asciideck_name = asciideckpkg_asciideck_description = Asciidoc for Erlang.pkg_asciideck_homepage = https://ninenines.eupkg_asciideck_fetch = gitpkg_asciideck_repo = https://github.com/ninenines/asciideckpkg_asciideck_commit = masterPACKAGES += backoffpkg_backoff_name = backoffpkg_backoff_description = Simple exponential backoffs in Erlangpkg_backoff_homepage = https://github.com/ferd/backoffpkg_backoff_fetch = gitpkg_backoff_repo = https://github.com/ferd/backoffpkg_backoff_commit = masterPACKAGES += barrel_tcppkg_barrel_tcp_name = barrel_tcppkg_barrel_tcp_description = barrel is a generic TCP acceptor pool with low latency in Erlang.pkg_barrel_tcp_homepage = https://github.com/benoitc-attic/barrel_tcppkg_barrel_tcp_fetch = gitpkg_barrel_tcp_repo = https://github.com/benoitc-attic/barrel_tcppkg_barrel_tcp_commit = masterPACKAGES += basho_benchpkg_basho_bench_name = basho_benchpkg_basho_bench_description = A load-generation and testing tool for basically whatever you can write a returning Erlang function for.pkg_basho_bench_homepage = https://github.com/basho/basho_benchpkg_basho_bench_fetch = gitpkg_basho_bench_repo = https://github.com/basho/basho_benchpkg_basho_bench_commit = masterPACKAGES += bcryptpkg_bcrypt_name = bcryptpkg_bcrypt_description = Bcrypt Erlang / C librarypkg_bcrypt_homepage = https://github.com/erlangpack/bcryptpkg_bcrypt_fetch = gitpkg_bcrypt_repo = https://github.com/erlangpack/bcrypt.gitpkg_bcrypt_commit = masterPACKAGES += beampkg_beam_name = beampkg_beam_description = BEAM emulator written in Erlangpkg_beam_homepage = https://github.com/tonyrog/beampkg_beam_fetch = gitpkg_beam_repo = https://github.com/tonyrog/beampkg_beam_commit = masterPACKAGES += bearpkg_bear_name = bearpkg_bear_description = a set of statistics functions for erlangpkg_bear_homepage = https://github.com/boundary/bearpkg_bear_fetch = gitpkg_bear_repo = https://github.com/boundary/bearpkg_bear_commit = masterPACKAGES += bertconfpkg_bertconf_name = bertconfpkg_bertconf_description = Make ETS tables out of statc BERT files that are auto-reloadedpkg_bertconf_homepage = https://github.com/ferd/bertconfpkg_bertconf_fetch = gitpkg_bertconf_repo = https://github.com/ferd/bertconfpkg_bertconf_commit = masterPACKAGES += bifrostpkg_bifrost_name = bifrostpkg_bifrost_description = Erlang FTP Server Frameworkpkg_bifrost_homepage = https://github.com/thorstadt/bifrostpkg_bifrost_fetch = gitpkg_bifrost_repo = https://github.com/thorstadt/bifrostpkg_bifrost_commit = masterPACKAGES += binpppkg_binpp_name = binpppkg_binpp_description = Erlang Binary Pretty Printerpkg_binpp_homepage = https://github.com/jtendo/binpppkg_binpp_fetch = gitpkg_binpp_repo = https://github.com/jtendo/binpppkg_binpp_commit = masterPACKAGES += bisectpkg_bisect_name = bisectpkg_bisect_description = Ordered fixed-size binary dictionary in Erlangpkg_bisect_homepage = https://github.com/knutin/bisectpkg_bisect_fetch = gitpkg_bisect_repo = https://github.com/knutin/bisectpkg_bisect_commit = masterPACKAGES += bitcaskpkg_bitcask_name = bitcaskpkg_bitcask_description = because you need another a key/value storage enginepkg_bitcask_homepage = https://github.com/basho/bitcaskpkg_bitcask_fetch = gitpkg_bitcask_repo = https://github.com/basho/bitcaskpkg_bitcask_commit = developPACKAGES += bootstrappkg_bootstrap_name = bootstrappkg_bootstrap_description = A simple, yet powerful Erlang cluster bootstrapping application.pkg_bootstrap_homepage = https://github.com/schlagert/bootstrappkg_bootstrap_fetch = gitpkg_bootstrap_repo = https://github.com/schlagert/bootstrappkg_bootstrap_commit = masterPACKAGES += bosspkg_boss_name = bosspkg_boss_description = Erlang web MVC, now featuring Cometpkg_boss_homepage = https://github.com/ChicagoBoss/ChicagoBosspkg_boss_fetch = gitpkg_boss_repo = https://github.com/ChicagoBoss/ChicagoBosspkg_boss_commit = masterPACKAGES += boss_dbpkg_boss_db_name = boss_dbpkg_boss_db_description = BossDB: a sharded, caching, pooling, evented ORM for Erlangpkg_boss_db_homepage = https://github.com/ErlyORM/boss_dbpkg_boss_db_fetch = gitpkg_boss_db_repo = https://github.com/ErlyORM/boss_dbpkg_boss_db_commit = masterPACKAGES += brodpkg_brod_name = brodpkg_brod_description = Kafka client in Erlangpkg_brod_homepage = https://github.com/klarna/brodpkg_brod_fetch = gitpkg_brod_repo = https://github.com/klarna/brod.gitpkg_brod_commit = masterPACKAGES += bsonpkg_bson_name = bsonpkg_bson_description = BSON documents in Erlang, see bsonspec.orgpkg_bson_homepage = https://github.com/comtihon/bson-erlangpkg_bson_fetch = gitpkg_bson_repo = https://github.com/comtihon/bson-erlangpkg_bson_commit = masterPACKAGES += bulletpkg_bullet_name = bulletpkg_bullet_description = Simple, reliable, efficient streaming for Cowboy.pkg_bullet_homepage = http://ninenines.eupkg_bullet_fetch = gitpkg_bullet_repo = https://github.com/ninenines/bulletpkg_bullet_commit = masterPACKAGES += cachepkg_cache_name = cachepkg_cache_description = Erlang in-memory cachepkg_cache_homepage = https://github.com/fogfish/cachepkg_cache_fetch = gitpkg_cache_repo = https://github.com/fogfish/cachepkg_cache_commit = masterPACKAGES += cakepkg_cake_name = cakepkg_cake_description = Really simple terminal colorizationpkg_cake_homepage = https://github.com/darach/cake-erlpkg_cake_fetch = gitpkg_cake_repo = https://github.com/darach/cake-erlpkg_cake_commit = masterPACKAGES += cberlpkg_cberl_name = cberlpkg_cberl_description = NIF based Erlang bindings for Couchbasepkg_cberl_homepage = https://github.com/chitika/cberlpkg_cberl_fetch = gitpkg_cberl_repo = https://github.com/chitika/cberlpkg_cberl_commit = masterPACKAGES += cechopkg_cecho_name = cechopkg_cecho_description = An ncurses library for Erlangpkg_cecho_homepage = https://github.com/mazenharake/cechopkg_cecho_fetch = gitpkg_cecho_repo = https://github.com/mazenharake/cechopkg_cecho_commit = masterPACKAGES += cferlpkg_cferl_name = cferlpkg_cferl_description = Rackspace / Open Stack Cloud Files Erlang Clientpkg_cferl_homepage = https://github.com/ddossot/cferlpkg_cferl_fetch = gitpkg_cferl_repo = https://github.com/ddossot/cferlpkg_cferl_commit = masterPACKAGES += chaos_monkeypkg_chaos_monkey_name = chaos_monkeypkg_chaos_monkey_description = This is The CHAOS MONKEY. It will kill your processes.pkg_chaos_monkey_homepage = https://github.com/dLuna/chaos_monkeypkg_chaos_monkey_fetch = gitpkg_chaos_monkey_repo = https://github.com/dLuna/chaos_monkeypkg_chaos_monkey_commit = masterPACKAGES += check_nodepkg_check_node_name = check_nodepkg_check_node_description = Nagios Scripts for monitoring Riakpkg_check_node_homepage = https://github.com/basho-labs/riak_nagiospkg_check_node_fetch = gitpkg_check_node_repo = https://github.com/basho-labs/riak_nagiospkg_check_node_commit = masterPACKAGES += chronospkg_chronos_name = chronospkg_chronos_description = Timer module for Erlang that makes it easy to abstract time out of the tests.pkg_chronos_homepage = https://github.com/lehoff/chronospkg_chronos_fetch = gitpkg_chronos_repo = https://github.com/lehoff/chronospkg_chronos_commit = masterPACKAGES += chumakpkg_chumak_name = chumakpkg_chumak_description = Pure Erlang implementation of ZeroMQ Message Transport Protocol.pkg_chumak_homepage = http://choven.capkg_chumak_fetch = gitpkg_chumak_repo = https://github.com/chovencorp/chumakpkg_chumak_commit = masterPACKAGES += clpkg_cl_name = clpkg_cl_description = OpenCL binding for Erlangpkg_cl_homepage = https://github.com/tonyrog/clpkg_cl_fetch = gitpkg_cl_repo = https://github.com/tonyrog/clpkg_cl_commit = masterPACKAGES += cliquepkg_clique_name = cliquepkg_clique_description = CLI Framework for Erlangpkg_clique_homepage = https://github.com/basho/cliquepkg_clique_fetch = gitpkg_clique_repo = https://github.com/basho/cliquepkg_clique_commit = developPACKAGES += cloudi_corepkg_cloudi_core_name = cloudi_corepkg_cloudi_core_description = CloudI internal service runtimepkg_cloudi_core_homepage = http://cloudi.org/pkg_cloudi_core_fetch = gitpkg_cloudi_core_repo = https://github.com/CloudI/cloudi_corepkg_cloudi_core_commit = masterPACKAGES += cloudi_service_api_requestspkg_cloudi_service_api_requests_name = cloudi_service_api_requestspkg_cloudi_service_api_requests_description = CloudI Service API requests (JSON-RPC/Erlang-term support)pkg_cloudi_service_api_requests_homepage = http://cloudi.org/pkg_cloudi_service_api_requests_fetch = gitpkg_cloudi_service_api_requests_repo = https://github.com/CloudI/cloudi_service_api_requestspkg_cloudi_service_api_requests_commit = masterPACKAGES += cloudi_service_db_mysqlpkg_cloudi_service_db_mysql_name = cloudi_service_db_mysqlpkg_cloudi_service_db_mysql_description = MySQL CloudI Servicepkg_cloudi_service_db_mysql_homepage = http://cloudi.org/pkg_cloudi_service_db_mysql_fetch = gitpkg_cloudi_service_db_mysql_repo = https://github.com/CloudI/cloudi_service_db_mysqlpkg_cloudi_service_db_mysql_commit = masterPACKAGES += cloudi_service_db_pgsqlpkg_cloudi_service_db_pgsql_name = cloudi_service_db_pgsqlpkg_cloudi_service_db_pgsql_description = PostgreSQL CloudI Servicepkg_cloudi_service_db_pgsql_homepage = http://cloudi.org/pkg_cloudi_service_db_pgsql_fetch = gitpkg_cloudi_service_db_pgsql_repo = https://github.com/CloudI/cloudi_service_db_pgsqlpkg_cloudi_service_db_pgsql_commit = masterPACKAGES += cloudi_service_filesystempkg_cloudi_service_filesystem_name = cloudi_service_filesystempkg_cloudi_service_filesystem_description = Filesystem CloudI Servicepkg_cloudi_service_filesystem_homepage = http://cloudi.org/pkg_cloudi_service_filesystem_fetch = gitpkg_cloudi_service_filesystem_repo = https://github.com/CloudI/cloudi_service_filesystempkg_cloudi_service_filesystem_commit = masterPACKAGES += cloudi_service_http_clientpkg_cloudi_service_http_client_name = cloudi_service_http_clientpkg_cloudi_service_http_client_description = HTTP client CloudI Servicepkg_cloudi_service_http_client_homepage = http://cloudi.org/pkg_cloudi_service_http_client_fetch = gitpkg_cloudi_service_http_client_repo = https://github.com/CloudI/cloudi_service_http_clientpkg_cloudi_service_http_client_commit = masterPACKAGES += cloudi_service_http_cowboypkg_cloudi_service_http_cowboy_name = cloudi_service_http_cowboypkg_cloudi_service_http_cowboy_description = cowboy HTTP/HTTPS CloudI Servicepkg_cloudi_service_http_cowboy_homepage = http://cloudi.org/pkg_cloudi_service_http_cowboy_fetch = gitpkg_cloudi_service_http_cowboy_repo = https://github.com/CloudI/cloudi_service_http_cowboypkg_cloudi_service_http_cowboy_commit = masterPACKAGES += cloudi_service_http_ellipkg_cloudi_service_http_elli_name = cloudi_service_http_ellipkg_cloudi_service_http_elli_description = elli HTTP CloudI Servicepkg_cloudi_service_http_elli_homepage = http://cloudi.org/pkg_cloudi_service_http_elli_fetch = gitpkg_cloudi_service_http_elli_repo = https://github.com/CloudI/cloudi_service_http_ellipkg_cloudi_service_http_elli_commit = masterPACKAGES += cloudi_service_map_reducepkg_cloudi_service_map_reduce_name = cloudi_service_map_reducepkg_cloudi_service_map_reduce_description = Map/Reduce CloudI Servicepkg_cloudi_service_map_reduce_homepage = http://cloudi.org/pkg_cloudi_service_map_reduce_fetch = gitpkg_cloudi_service_map_reduce_repo = https://github.com/CloudI/cloudi_service_map_reducepkg_cloudi_service_map_reduce_commit = masterPACKAGES += cloudi_service_oauth1pkg_cloudi_service_oauth1_name = cloudi_service_oauth1pkg_cloudi_service_oauth1_description = OAuth v1.0 CloudI Servicepkg_cloudi_service_oauth1_homepage = http://cloudi.org/pkg_cloudi_service_oauth1_fetch = gitpkg_cloudi_service_oauth1_repo = https://github.com/CloudI/cloudi_service_oauth1pkg_cloudi_service_oauth1_commit = masterPACKAGES += cloudi_service_queuepkg_cloudi_service_queue_name = cloudi_service_queuepkg_cloudi_service_queue_description = Persistent Queue Servicepkg_cloudi_service_queue_homepage = http://cloudi.org/pkg_cloudi_service_queue_fetch = gitpkg_cloudi_service_queue_repo = https://github.com/CloudI/cloudi_service_queuepkg_cloudi_service_queue_commit = masterPACKAGES += cloudi_service_quorumpkg_cloudi_service_quorum_name = cloudi_service_quorumpkg_cloudi_service_quorum_description = CloudI Quorum Servicepkg_cloudi_service_quorum_homepage = http://cloudi.org/pkg_cloudi_service_quorum_fetch = gitpkg_cloudi_service_quorum_repo = https://github.com/CloudI/cloudi_service_quorumpkg_cloudi_service_quorum_commit = masterPACKAGES += cloudi_service_routerpkg_cloudi_service_router_name = cloudi_service_routerpkg_cloudi_service_router_description = CloudI Router Servicepkg_cloudi_service_router_homepage = http://cloudi.org/pkg_cloudi_service_router_fetch = gitpkg_cloudi_service_router_repo = https://github.com/CloudI/cloudi_service_routerpkg_cloudi_service_router_commit = masterPACKAGES += cloudi_service_tcppkg_cloudi_service_tcp_name = cloudi_service_tcppkg_cloudi_service_tcp_description = TCP CloudI Servicepkg_cloudi_service_tcp_homepage = http://cloudi.org/pkg_cloudi_service_tcp_fetch = gitpkg_cloudi_service_tcp_repo = https://github.com/CloudI/cloudi_service_tcppkg_cloudi_service_tcp_commit = masterPACKAGES += cloudi_service_udppkg_cloudi_service_udp_name = cloudi_service_udppkg_cloudi_service_udp_description = UDP CloudI Servicepkg_cloudi_service_udp_homepage = http://cloudi.org/pkg_cloudi_service_udp_fetch = gitpkg_cloudi_service_udp_repo = https://github.com/CloudI/cloudi_service_udppkg_cloudi_service_udp_commit = masterPACKAGES += cloudi_service_validatepkg_cloudi_service_validate_name = cloudi_service_validatepkg_cloudi_service_validate_description = CloudI Validate Servicepkg_cloudi_service_validate_homepage = http://cloudi.org/pkg_cloudi_service_validate_fetch = gitpkg_cloudi_service_validate_repo = https://github.com/CloudI/cloudi_service_validatepkg_cloudi_service_validate_commit = masterPACKAGES += cloudi_service_zeromqpkg_cloudi_service_zeromq_name = cloudi_service_zeromqpkg_cloudi_service_zeromq_description = ZeroMQ CloudI Servicepkg_cloudi_service_zeromq_homepage = http://cloudi.org/pkg_cloudi_service_zeromq_fetch = gitpkg_cloudi_service_zeromq_repo = https://github.com/CloudI/cloudi_service_zeromqpkg_cloudi_service_zeromq_commit = masterPACKAGES += cluster_infopkg_cluster_info_name = cluster_infopkg_cluster_info_description = Fork of Hibari's nifty cluster_info OTP apppkg_cluster_info_homepage = https://github.com/basho/cluster_infopkg_cluster_info_fetch = gitpkg_cluster_info_repo = https://github.com/basho/cluster_infopkg_cluster_info_commit = masterPACKAGES += colorpkg_color_name = colorpkg_color_description = ANSI colors for your Erlangpkg_color_homepage = https://github.com/julianduque/erlang-colorpkg_color_fetch = gitpkg_color_repo = https://github.com/julianduque/erlang-colorpkg_color_commit = masterPACKAGES += confettipkg_confetti_name = confettipkg_confetti_description = Erlang configuration provider / application:get_env/2 on steroidspkg_confetti_homepage = https://github.com/jtendo/confettipkg_confetti_fetch = gitpkg_confetti_repo = https://github.com/jtendo/confettipkg_confetti_commit = masterPACKAGES += couchbeampkg_couchbeam_name = couchbeampkg_couchbeam_description = Apache CouchDB client in Erlangpkg_couchbeam_homepage = https://github.com/benoitc/couchbeampkg_couchbeam_fetch = gitpkg_couchbeam_repo = https://github.com/benoitc/couchbeampkg_couchbeam_commit = masterPACKAGES += covertoolpkg_covertool_name = covertoolpkg_covertool_description = Tool to convert Erlang cover data files into Cobertura XML reportspkg_covertool_homepage = https://github.com/idubrov/covertoolpkg_covertool_fetch = gitpkg_covertool_repo = https://github.com/idubrov/covertoolpkg_covertool_commit = masterPACKAGES += cowboypkg_cowboy_name = cowboypkg_cowboy_description = Small, fast and modular HTTP server.pkg_cowboy_homepage = http://ninenines.eupkg_cowboy_fetch = gitpkg_cowboy_repo = https://github.com/ninenines/cowboypkg_cowboy_commit = 1.0.4PACKAGES += cowdbpkg_cowdb_name = cowdbpkg_cowdb_description = Pure Key/Value database library for Erlang Applicationspkg_cowdb_homepage = https://github.com/refuge/cowdbpkg_cowdb_fetch = gitpkg_cowdb_repo = https://github.com/refuge/cowdbpkg_cowdb_commit = masterPACKAGES += cowlibpkg_cowlib_name = cowlibpkg_cowlib_description = Support library for manipulating Web protocols.pkg_cowlib_homepage = http://ninenines.eupkg_cowlib_fetch = gitpkg_cowlib_repo = https://github.com/ninenines/cowlibpkg_cowlib_commit = 1.0.2PACKAGES += cpgpkg_cpg_name = cpgpkg_cpg_description = CloudI Process Groupspkg_cpg_homepage = https://github.com/okeuday/cpgpkg_cpg_fetch = gitpkg_cpg_repo = https://github.com/okeuday/cpgpkg_cpg_commit = masterPACKAGES += cqerlpkg_cqerl_name = cqerlpkg_cqerl_description = Native Erlang CQL client for Cassandrapkg_cqerl_homepage = https://matehat.github.io/cqerl/pkg_cqerl_fetch = gitpkg_cqerl_repo = https://github.com/matehat/cqerlpkg_cqerl_commit = masterPACKAGES += crpkg_cr_name = crpkg_cr_description = Chain Replicationpkg_cr_homepage = https://synrc.com/apps/cr/doc/cr.htmpkg_cr_fetch = gitpkg_cr_repo = https://github.com/spawnproc/crpkg_cr_commit = masterPACKAGES += cuttlefishpkg_cuttlefish_name = cuttlefishpkg_cuttlefish_description = cuttlefish configuration abstractionpkg_cuttlefish_homepage = https://github.com/Kyorai/cuttlefishpkg_cuttlefish_fetch = gitpkg_cuttlefish_repo = https://github.com/Kyorai/cuttlefishpkg_cuttlefish_commit = masterPACKAGES += damoclespkg_damocles_name = damoclespkg_damocles_description = Erlang library for generating adversarial network conditions for QAing distributed applications/systems on a single Linux box.pkg_damocles_homepage = https://github.com/lostcolony/damoclespkg_damocles_fetch = gitpkg_damocles_repo = https://github.com/lostcolony/damoclespkg_damocles_commit = masterPACKAGES += debbiepkg_debbie_name = debbiepkg_debbie_description = .DEB Built In Erlangpkg_debbie_homepage = https://github.com/crownedgrouse/debbiepkg_debbie_fetch = gitpkg_debbie_repo = https://github.com/crownedgrouse/debbiepkg_debbie_commit = masterPACKAGES += decimalpkg_decimal_name = decimalpkg_decimal_description = An Erlang decimal arithmetic librarypkg_decimal_homepage = https://github.com/egobrain/decimalpkg_decimal_fetch = gitpkg_decimal_repo = https://github.com/egobrain/decimalpkg_decimal_commit = masterPACKAGES += detergentpkg_detergent_name = detergentpkg_detergent_description = An emulsifying Erlang SOAP librarypkg_detergent_homepage = https://github.com/devinus/detergentpkg_detergent_fetch = gitpkg_detergent_repo = https://github.com/devinus/detergentpkg_detergent_commit = masterPACKAGES += dh_datepkg_dh_date_name = dh_datepkg_dh_date_description = Date formatting / parsing library for erlangpkg_dh_date_homepage = https://github.com/daleharvey/dh_datepkg_dh_date_fetch = gitpkg_dh_date_repo = https://github.com/daleharvey/dh_datepkg_dh_date_commit = masterPACKAGES += dirbusterlpkg_dirbusterl_name = dirbusterlpkg_dirbusterl_description = DirBuster successor in Erlangpkg_dirbusterl_homepage = https://github.com/silentsignal/DirBustErlpkg_dirbusterl_fetch = gitpkg_dirbusterl_repo = https://github.com/silentsignal/DirBustErlpkg_dirbusterl_commit = masterPACKAGES += dispcountpkg_dispcount_name = dispcountpkg_dispcount_description = Erlang task dispatcher based on ETS counters.pkg_dispcount_homepage = https://github.com/ferd/dispcountpkg_dispcount_fetch = gitpkg_dispcount_repo = https://github.com/ferd/dispcountpkg_dispcount_commit = masterPACKAGES += dlhttpcpkg_dlhttpc_name = dlhttpcpkg_dlhttpc_description = dispcount-based lhttpc fork for massive amounts of requests to limited endpointspkg_dlhttpc_homepage = https://github.com/ferd/dlhttpcpkg_dlhttpc_fetch = gitpkg_dlhttpc_repo = https://github.com/ferd/dlhttpcpkg_dlhttpc_commit = masterPACKAGES += dnspkg_dns_name = dnspkg_dns_description = Erlang DNS librarypkg_dns_homepage = https://github.com/aetrion/dns_erlangpkg_dns_fetch = gitpkg_dns_repo = https://github.com/aetrion/dns_erlangpkg_dns_commit = mainPACKAGES += dynamic_compilepkg_dynamic_compile_name = dynamic_compilepkg_dynamic_compile_description = compile and load erlang modules from string inputpkg_dynamic_compile_homepage = https://github.com/jkvor/dynamic_compilepkg_dynamic_compile_fetch = gitpkg_dynamic_compile_repo = https://github.com/jkvor/dynamic_compilepkg_dynamic_compile_commit = masterPACKAGES += e2pkg_e2_name = e2pkg_e2_description = Library to simply writing correct OTP applications.pkg_e2_homepage = http://e2project.orgpkg_e2_fetch = gitpkg_e2_repo = https://github.com/gar1t/e2pkg_e2_commit = masterPACKAGES += eamfpkg_eamf_name = eamfpkg_eamf_description = eAMF provides Action Message Format (AMF) support for Erlangpkg_eamf_homepage = https://github.com/mrinalwadhwa/eamfpkg_eamf_fetch = gitpkg_eamf_repo = https://github.com/mrinalwadhwa/eamfpkg_eamf_commit = masterPACKAGES += eavropkg_eavro_name = eavropkg_eavro_description = Apache Avro encoder/decoderpkg_eavro_homepage = https://github.com/SIfoxDevTeam/eavropkg_eavro_fetch = gitpkg_eavro_repo = https://github.com/SIfoxDevTeam/eavropkg_eavro_commit = masterPACKAGES += ecapnppkg_ecapnp_name = ecapnppkg_ecapnp_description = Cap'n Proto library for Erlangpkg_ecapnp_homepage = https://github.com/kaos/ecapnppkg_ecapnp_fetch = gitpkg_ecapnp_repo = https://github.com/kaos/ecapnppkg_ecapnp_commit = masterPACKAGES += econfigpkg_econfig_name = econfigpkg_econfig_description = simple Erlang config handler using INI filespkg_econfig_homepage = https://github.com/benoitc/econfigpkg_econfig_fetch = gitpkg_econfig_repo = https://github.com/benoitc/econfigpkg_econfig_commit = masterPACKAGES += edatepkg_edate_name = edatepkg_edate_description = date manipulation library for erlangpkg_edate_homepage = https://github.com/dweldon/edatepkg_edate_fetch = gitpkg_edate_repo = https://github.com/dweldon/edatepkg_edate_commit = masterPACKAGES += edgarpkg_edgar_name = edgarpkg_edgar_description = Erlang Does GNU ARpkg_edgar_homepage = https://github.com/crownedgrouse/edgarpkg_edgar_fetch = gitpkg_edgar_repo = https://github.com/crownedgrouse/edgarpkg_edgar_commit = masterPACKAGES += ednspkg_edns_name = ednspkg_edns_description = Erlang/OTP DNS serverpkg_edns_homepage = https://github.com/hcvst/erlang-dnspkg_edns_fetch = gitpkg_edns_repo = https://github.com/hcvst/erlang-dnspkg_edns_commit = masterPACKAGES += edownpkg_edown_name = edownpkg_edown_description = EDoc extension for generating Github-flavored Markdownpkg_edown_homepage = https://github.com/uwiger/edownpkg_edown_fetch = gitpkg_edown_repo = https://github.com/uwiger/edownpkg_edown_commit = masterPACKAGES += eeppkg_eep_name = eeppkg_eep_description = Erlang Easy Profiling (eep) application provides a way to analyze application performance and call hierarchypkg_eep_homepage = https://github.com/virtan/eeppkg_eep_fetch = gitpkg_eep_repo = https://github.com/virtan/eeppkg_eep_commit = masterPACKAGES += eep_apppkg_eep_app_name = eep_apppkg_eep_app_description = Embedded Event Processingpkg_eep_app_homepage = https://github.com/darach/eep-erlpkg_eep_app_fetch = gitpkg_eep_app_repo = https://github.com/darach/eep-erlpkg_eep_app_commit = masterPACKAGES += efenepkg_efene_name = efenepkg_efene_description = Alternative syntax for the Erlang Programming Language focusing on simplicity, ease of use and programmer UXpkg_efene_homepage = https://github.com/efene/efenepkg_efene_fetch = gitpkg_efene_repo = https://github.com/efene/efenepkg_efene_commit = masterPACKAGES += egeoippkg_egeoip_name = egeoippkg_egeoip_description = Erlang IP Geolocation module, currently supporting the MaxMind GeoLite City Database.pkg_egeoip_homepage = https://github.com/mochi/egeoippkg_egeoip_fetch = gitpkg_egeoip_repo = https://github.com/mochi/egeoippkg_egeoip_commit = masterPACKAGES += ehsapkg_ehsa_name = ehsapkg_ehsa_description = Erlang HTTP server basic and digest authentication modulespkg_ehsa_homepage = https://github.com/a12n/ehsapkg_ehsa_fetch = gitpkg_ehsa_repo = https://github.com/a12n/ehsapkg_ehsa_commit = masterPACKAGES += ejpkg_ej_name = ejpkg_ej_description = Helper module for working with Erlang terms representing JSONpkg_ej_homepage = https://github.com/seth/ejpkg_ej_fetch = gitpkg_ej_repo = https://github.com/seth/ejpkg_ej_commit = masterPACKAGES += ejabberdpkg_ejabberd_name = ejabberdpkg_ejabberd_description = Robust, ubiquitous and massively scalable Jabber / XMPP Instant Messaging platformpkg_ejabberd_homepage = https://github.com/processone/ejabberdpkg_ejabberd_fetch = gitpkg_ejabberd_repo = https://github.com/processone/ejabberdpkg_ejabberd_commit = masterPACKAGES += ejwtpkg_ejwt_name = ejwtpkg_ejwt_description = erlang library for JSON Web Tokenpkg_ejwt_homepage = https://github.com/artefactop/ejwtpkg_ejwt_fetch = gitpkg_ejwt_repo = https://github.com/artefactop/ejwtpkg_ejwt_commit = masterPACKAGES += ekafpkg_ekaf_name = ekafpkg_ekaf_description = A minimal, high-performance Kafka client in Erlang.pkg_ekaf_homepage = https://github.com/helpshift/ekafpkg_ekaf_fetch = gitpkg_ekaf_repo = https://github.com/helpshift/ekafpkg_ekaf_commit = masterPACKAGES += elarmpkg_elarm_name = elarmpkg_elarm_description = Alarm Manager for Erlang.pkg_elarm_homepage = https://github.com/esl/elarmpkg_elarm_fetch = gitpkg_elarm_repo = https://github.com/esl/elarmpkg_elarm_commit = masterPACKAGES += eleveldbpkg_eleveldb_name = eleveldbpkg_eleveldb_description = Erlang LevelDB APIpkg_eleveldb_homepage = https://github.com/basho/eleveldbpkg_eleveldb_fetch = gitpkg_eleveldb_repo = https://github.com/basho/eleveldbpkg_eleveldb_commit = developPACKAGES += elixirpkg_elixir_name = elixirpkg_elixir_description = Elixir is a dynamic, functional language designed for building scalable and maintainable applicationspkg_elixir_homepage = https://elixir-lang.org/pkg_elixir_fetch = gitpkg_elixir_repo = https://github.com/elixir-lang/elixirpkg_elixir_commit = mainPACKAGES += ellipkg_elli_name = ellipkg_elli_description = Simple, robust and performant Erlang web serverpkg_elli_homepage = https://github.com/elli-lib/ellipkg_elli_fetch = gitpkg_elli_repo = https://github.com/elli-lib/ellipkg_elli_commit = mainPACKAGES += elvispkg_elvis_name = elvispkg_elvis_description = Erlang Style Reviewerpkg_elvis_homepage = https://github.com/inaka/elvispkg_elvis_fetch = gitpkg_elvis_repo = https://github.com/inaka/elvispkg_elvis_commit = masterPACKAGES += emagickpkg_emagick_name = emagickpkg_emagick_description = Wrapper for Graphics/ImageMagick command line tool.pkg_emagick_homepage = https://github.com/kivra/emagickpkg_emagick_fetch = gitpkg_emagick_repo = https://github.com/kivra/emagickpkg_emagick_commit = masterPACKAGES += enmpkg_enm_name = enmpkg_enm_description = Erlang driver for nanomsgpkg_enm_homepage = https://github.com/basho/enmpkg_enm_fetch = gitpkg_enm_repo = https://github.com/basho/enmpkg_enm_commit = masterPACKAGES += entoppkg_entop_name = entoppkg_entop_description = A top-like tool for monitoring an Erlang nodepkg_entop_homepage = https://github.com/mazenharake/entoppkg_entop_fetch = gitpkg_entop_repo = https://github.com/mazenharake/entoppkg_entop_commit = masterPACKAGES += epcappkg_epcap_name = epcappkg_epcap_description = Erlang packet capture interface using pcappkg_epcap_homepage = https://github.com/msantos/epcappkg_epcap_fetch = gitpkg_epcap_repo = https://github.com/msantos/epcappkg_epcap_commit = masterPACKAGES += eperpkg_eper_name = eperpkg_eper_description = Erlang performance and debugging tools.pkg_eper_homepage = https://github.com/massemanet/eperpkg_eper_fetch = gitpkg_eper_repo = https://github.com/massemanet/eperpkg_eper_commit = masterPACKAGES += epgsqlpkg_epgsql_name = epgsqlpkg_epgsql_description = Erlang PostgreSQL client library.pkg_epgsql_homepage = https://github.com/epgsql/epgsqlpkg_epgsql_fetch = gitpkg_epgsql_repo = https://github.com/epgsql/epgsqlpkg_epgsql_commit = masterPACKAGES += episcinapkg_episcina_name = episcinapkg_episcina_description = A simple non intrusive resource pool for connectionspkg_episcina_homepage = https://github.com/erlware/episcinapkg_episcina_fetch = gitpkg_episcina_repo = https://github.com/erlware/episcinapkg_episcina_commit = masterPACKAGES += eplotpkg_eplot_name = eplotpkg_eplot_description = A plot engine written in erlang.pkg_eplot_homepage = https://github.com/psyeugenic/eplotpkg_eplot_fetch = gitpkg_eplot_repo = https://github.com/psyeugenic/eplotpkg_eplot_commit = masterPACKAGES += epocxypkg_epocxy_name = epocxypkg_epocxy_description = Erlang Patterns of Concurrencypkg_epocxy_homepage = https://github.com/duomark/epocxypkg_epocxy_fetch = gitpkg_epocxy_repo = https://github.com/duomark/epocxypkg_epocxy_commit = masterPACKAGES += epubnubpkg_epubnub_name = epubnubpkg_epubnub_description = Erlang PubNub APIpkg_epubnub_homepage = https://github.com/tsloughter/epubnubpkg_epubnub_fetch = gitpkg_epubnub_repo = https://github.com/tsloughter/epubnubpkg_epubnub_commit = masterPACKAGES += eqmpkg_eqm_name = eqmpkg_eqm_description = Erlang pub sub with supply-demand channelspkg_eqm_homepage = https://github.com/loucash/eqmpkg_eqm_fetch = gitpkg_eqm_repo = https://github.com/loucash/eqmpkg_eqm_commit = masterPACKAGES += eredispkg_eredis_name = eredispkg_eredis_description = Erlang Redis clientpkg_eredis_homepage = https://github.com/wooga/eredispkg_eredis_fetch = gitpkg_eredis_repo = https://github.com/wooga/eredispkg_eredis_commit = masterPACKAGES += erl_streamspkg_erl_streams_name = erl_streamspkg_erl_streams_description = Streams in Erlangpkg_erl_streams_homepage = https://github.com/epappas/erl_streamspkg_erl_streams_fetch = gitpkg_erl_streams_repo = https://github.com/epappas/erl_streamspkg_erl_streams_commit = masterPACKAGES += erlang_localtimepkg_erlang_localtime_name = erlang_localtimepkg_erlang_localtime_description = Erlang library for conversion from one local time to anotherpkg_erlang_localtime_homepage = https://github.com/dmitryme/erlang_localtimepkg_erlang_localtime_fetch = gitpkg_erlang_localtime_repo = https://github.com/dmitryme/erlang_localtimepkg_erlang_localtime_commit = masterPACKAGES += erlang_smtppkg_erlang_smtp_name = erlang_smtppkg_erlang_smtp_description = Erlang SMTP and POP3 server code.pkg_erlang_smtp_homepage = https://github.com/tonyg/erlang-smtppkg_erlang_smtp_fetch = gitpkg_erlang_smtp_repo = https://github.com/tonyg/erlang-smtppkg_erlang_smtp_commit = masterPACKAGES += erlang_termpkg_erlang_term_name = erlang_termpkg_erlang_term_description = Erlang Term Infopkg_erlang_term_homepage = https://github.com/okeuday/erlang_termpkg_erlang_term_fetch = gitpkg_erlang_term_repo = https://github.com/okeuday/erlang_termpkg_erlang_term_commit = masterPACKAGES += erlastic_searchpkg_erlastic_search_name = erlastic_searchpkg_erlastic_search_description = An Erlang app for communicating with Elastic Search's rest interface.pkg_erlastic_search_homepage = https://github.com/tsloughter/erlastic_searchpkg_erlastic_search_fetch = gitpkg_erlastic_search_repo = https://github.com/tsloughter/erlastic_searchpkg_erlastic_search_commit = masterPACKAGES += erlbrakepkg_erlbrake_name = erlbrakepkg_erlbrake_description = Erlang Airbrake notification clientpkg_erlbrake_homepage = https://github.com/kenpratt/erlbrakepkg_erlbrake_fetch = gitpkg_erlbrake_repo = https://github.com/kenpratt/erlbrakepkg_erlbrake_commit = masterPACKAGES += erlcloudpkg_erlcloud_name = erlcloudpkg_erlcloud_description = Cloud Computing library for erlang (Amazon EC2, S3, SQS, SimpleDB, Mechanical Turk, ELB)pkg_erlcloud_homepage = https://github.com/gleber/erlcloudpkg_erlcloud_fetch = gitpkg_erlcloud_repo = https://github.com/gleber/erlcloudpkg_erlcloud_commit = masterPACKAGES += erlcronpkg_erlcron_name = erlcronpkg_erlcron_description = Erlang cronish systempkg_erlcron_homepage = https://github.com/erlware/erlcronpkg_erlcron_fetch = gitpkg_erlcron_repo = https://github.com/erlware/erlcronpkg_erlcron_commit = masterPACKAGES += erldbpkg_erldb_name = erldbpkg_erldb_description = ORM (Object-relational mapping) application implemented in Erlangpkg_erldb_homepage = http://erldb.orgpkg_erldb_fetch = gitpkg_erldb_repo = https://github.com/erldb/erldbpkg_erldb_commit = masterPACKAGES += erldispkg_erldis_name = erldispkg_erldis_description = redis erlang client librarypkg_erldis_homepage = https://github.com/cstar/erldispkg_erldis_fetch = gitpkg_erldis_repo = https://github.com/cstar/erldispkg_erldis_commit = masterPACKAGES += erldnspkg_erldns_name = erldnspkg_erldns_description = DNS server, in erlang.pkg_erldns_homepage = https://github.com/aetrion/erl-dnspkg_erldns_fetch = gitpkg_erldns_repo = https://github.com/aetrion/erl-dnspkg_erldns_commit = mainPACKAGES += erldockerpkg_erldocker_name = erldockerpkg_erldocker_description = Docker Remote API client for Erlangpkg_erldocker_homepage = https://github.com/proger/erldockerpkg_erldocker_fetch = gitpkg_erldocker_repo = https://github.com/proger/erldockerpkg_erldocker_commit = masterPACKAGES += erlfsmonpkg_erlfsmon_name = erlfsmonpkg_erlfsmon_description = Erlang filesystem event watcher for Linux and OSXpkg_erlfsmon_homepage = https://github.com/proger/erlfsmonpkg_erlfsmon_fetch = gitpkg_erlfsmon_repo = https://github.com/proger/erlfsmonpkg_erlfsmon_commit = masterPACKAGES += erlgitpkg_erlgit_name = erlgitpkg_erlgit_description = Erlang convenience wrapper around git executablepkg_erlgit_homepage = https://github.com/gleber/erlgitpkg_erlgit_fetch = gitpkg_erlgit_repo = https://github.com/gleber/erlgitpkg_erlgit_commit = masterPACKAGES += erlgutenpkg_erlguten_name = erlgutenpkg_erlguten_description = ErlGuten is a system for high-quality typesetting, written purely in Erlang.pkg_erlguten_homepage = https://github.com/richcarl/erlgutenpkg_erlguten_fetch = gitpkg_erlguten_repo = https://github.com/richcarl/erlgutenpkg_erlguten_commit = masterPACKAGES += erlmcpkg_erlmc_name = erlmcpkg_erlmc_description = Erlang memcached binary protocol clientpkg_erlmc_homepage = https://github.com/jkvor/erlmcpkg_erlmc_fetch = gitpkg_erlmc_repo = https://github.com/jkvor/erlmcpkg_erlmc_commit = masterPACKAGES += erlmongopkg_erlmongo_name = erlmongopkg_erlmongo_description = Record based Erlang driver for MongoDB with gridfs supportpkg_erlmongo_homepage = https://github.com/SergejJurecko/erlmongopkg_erlmongo_fetch = gitpkg_erlmongo_repo = https://github.com/SergejJurecko/erlmongopkg_erlmongo_commit = masterPACKAGES += erlogpkg_erlog_name = erlogpkg_erlog_description = Prolog interpreter in and for Erlangpkg_erlog_homepage = https://github.com/rvirding/erlogpkg_erlog_fetch = gitpkg_erlog_repo = https://github.com/rvirding/erlogpkg_erlog_commit = masterPACKAGES += erlpasspkg_erlpass_name = erlpasspkg_erlpass_description = A library to handle password hashing and changing in a safe manner, independent from any kind of storage whatsoever.pkg_erlpass_homepage = https://github.com/ferd/erlpasspkg_erlpass_fetch = gitpkg_erlpass_repo = https://github.com/ferd/erlpasspkg_erlpass_commit = masterPACKAGES += erlshpkg_erlsh_name = erlshpkg_erlsh_description = Erlang shell toolspkg_erlsh_homepage = https://github.com/proger/erlshpkg_erlsh_fetch = gitpkg_erlsh_repo = https://github.com/proger/erlshpkg_erlsh_commit = masterPACKAGES += erlsha2pkg_erlsha2_name = erlsha2pkg_erlsha2_description = SHA-224, SHA-256, SHA-384, SHA-512 implemented in Erlang NIFs.pkg_erlsha2_homepage = https://github.com/vinoski/erlsha2pkg_erlsha2_fetch = gitpkg_erlsha2_repo = https://github.com/vinoski/erlsha2pkg_erlsha2_commit = masterPACKAGES += erlsompkg_erlsom_name = erlsompkg_erlsom_description = XML parser for Erlangpkg_erlsom_homepage = https://github.com/willemdj/erlsompkg_erlsom_fetch = gitpkg_erlsom_repo = https://github.com/willemdj/erlsompkg_erlsom_commit = masterPACKAGES += erlubipkg_erlubi_name = erlubipkg_erlubi_description = Ubigraph Erlang Client (and Process Visualizer)pkg_erlubi_homepage = https://github.com/krestenkrab/erlubipkg_erlubi_fetch = gitpkg_erlubi_repo = https://github.com/krestenkrab/erlubipkg_erlubi_commit = masterPACKAGES += erlvoltpkg_erlvolt_name = erlvoltpkg_erlvolt_description = VoltDB Erlang Client Driverpkg_erlvolt_homepage = https://github.com/VoltDB/voltdb-client-erlangpkg_erlvolt_fetch = gitpkg_erlvolt_repo = https://github.com/VoltDB/voltdb-client-erlangpkg_erlvolt_commit = masterPACKAGES += erlware_commonspkg_erlware_commons_name = erlware_commonspkg_erlware_commons_description = Erlware Commons is an Erlware project focused on all aspects of reusable Erlang components.pkg_erlware_commons_homepage = https://github.com/erlware/erlware_commonspkg_erlware_commons_fetch = gitpkg_erlware_commons_repo = https://github.com/erlware/erlware_commonspkg_erlware_commons_commit = masterPACKAGES += erlydtlpkg_erlydtl_name = erlydtlpkg_erlydtl_description = Django Template Language for Erlang.pkg_erlydtl_homepage = https://github.com/erlydtl/erlydtlpkg_erlydtl_fetch = gitpkg_erlydtl_repo = https://github.com/erlydtl/erlydtlpkg_erlydtl_commit = masterPACKAGES += errdpkg_errd_name = errdpkg_errd_description = Erlang RRDTool librarypkg_errd_homepage = https://github.com/archaelus/errdpkg_errd_fetch = gitpkg_errd_repo = https://github.com/archaelus/errdpkg_errd_commit = masterPACKAGES += erservepkg_erserve_name = erservepkg_erserve_description = Erlang/Rserve communication interfacepkg_erserve_homepage = https://github.com/del/erservepkg_erserve_fetch = gitpkg_erserve_repo = https://github.com/del/erservepkg_erserve_commit = masterPACKAGES += escaluspkg_escalus_name = escaluspkg_escalus_description = An XMPP client library in Erlang for conveniently testing XMPP serverspkg_escalus_homepage = https://github.com/esl/escaluspkg_escalus_fetch = gitpkg_escalus_repo = https://github.com/esl/escaluspkg_escalus_commit = masterPACKAGES += esh_mkpkg_esh_mk_name = esh_mkpkg_esh_mk_description = esh template engine plugin for erlang.mkpkg_esh_mk_homepage = https://github.com/crownedgrouse/esh.mkpkg_esh_mk_fetch = gitpkg_esh_mk_repo = https://github.com/crownedgrouse/esh.mk.gitpkg_esh_mk_commit = masterPACKAGES += especpkg_espec_name = especpkg_espec_description = ESpec: Behaviour driven development framework for Erlangpkg_espec_homepage = https://github.com/lucaspiller/especpkg_espec_fetch = gitpkg_espec_repo = https://github.com/lucaspiller/especpkg_espec_commit = masterPACKAGES += estatsdpkg_estatsd_name = estatsdpkg_estatsd_description = Erlang stats aggregation app that periodically flushes data to graphitepkg_estatsd_homepage = https://github.com/RJ/estatsdpkg_estatsd_fetch = gitpkg_estatsd_repo = https://github.com/RJ/estatsdpkg_estatsd_commit = masterPACKAGES += etappkg_etap_name = etappkg_etap_description = etap is a simple erlang testing library that provides TAP compliant output.pkg_etap_homepage = https://github.com/ngerakines/etappkg_etap_fetch = gitpkg_etap_repo = https://github.com/ngerakines/etappkg_etap_commit = masterPACKAGES += etestpkg_etest_name = etestpkg_etest_description = A lightweight, convention over configuration test framework for Erlangpkg_etest_homepage = https://github.com/wooga/etestpkg_etest_fetch = gitpkg_etest_repo = https://github.com/wooga/etestpkg_etest_commit = masterPACKAGES += etest_httppkg_etest_http_name = etest_httppkg_etest_http_description = etest Assertions around HTTP (client-side)pkg_etest_http_homepage = https://github.com/wooga/etest_httppkg_etest_http_fetch = gitpkg_etest_http_repo = https://github.com/wooga/etest_httppkg_etest_http_commit = masterPACKAGES += etomlpkg_etoml_name = etomlpkg_etoml_description = TOML language erlang parserpkg_etoml_homepage = https://github.com/kalta/etomlpkg_etoml_fetch = gitpkg_etoml_repo = https://github.com/kalta/etomlpkg_etoml_commit = masterPACKAGES += eunitpkg_eunit_name = eunitpkg_eunit_description = The EUnit lightweight unit testing framework for Erlang - this is the canonical development repository.pkg_eunit_homepage = https://github.com/richcarl/eunitpkg_eunit_fetch = gitpkg_eunit_repo = https://github.com/richcarl/eunitpkg_eunit_commit = masterPACKAGES += eunit_formatterspkg_eunit_formatters_name = eunit_formatterspkg_eunit_formatters_description = Because eunit's output sucks. Let's make it better.pkg_eunit_formatters_homepage = https://github.com/seancribbs/eunit_formatterspkg_eunit_formatters_fetch = gitpkg_eunit_formatters_repo = https://github.com/seancribbs/eunit_formatterspkg_eunit_formatters_commit = masterPACKAGES += euthanasiapkg_euthanasia_name = euthanasiapkg_euthanasia_description = Merciful killer for your Erlang processespkg_euthanasia_homepage = https://github.com/doubleyou/euthanasiapkg_euthanasia_fetch = gitpkg_euthanasia_repo = https://github.com/doubleyou/euthanasiapkg_euthanasia_commit = masterPACKAGES += evumpkg_evum_name = evumpkg_evum_description = Spawn Linux VMs as Erlang processes in the Erlang VMpkg_evum_homepage = https://github.com/msantos/evumpkg_evum_fetch = gitpkg_evum_repo = https://github.com/msantos/evumpkg_evum_commit = masterPACKAGES += execpkg_exec_name = erlexecpkg_exec_description = Execute and control OS processes from Erlang/OTP.pkg_exec_homepage = http://saleyn.github.com/erlexecpkg_exec_fetch = gitpkg_exec_repo = https://github.com/saleyn/erlexecpkg_exec_commit = masterPACKAGES += exmlpkg_exml_name = exmlpkg_exml_description = XML parsing library in Erlangpkg_exml_homepage = https://github.com/paulgray/exmlpkg_exml_fetch = gitpkg_exml_repo = https://github.com/paulgray/exmlpkg_exml_commit = masterPACKAGES += exometerpkg_exometer_name = exometerpkg_exometer_description = Basic measurement objects and probe behaviorpkg_exometer_homepage = https://github.com/Feuerlabs/exometerpkg_exometer_fetch = gitpkg_exometer_repo = https://github.com/Feuerlabs/exometerpkg_exometer_commit = masterPACKAGES += exs1024pkg_exs1024_name = exs1024pkg_exs1024_description = Xorshift1024star pseudo random number generator for Erlang.pkg_exs1024_homepage = https://github.com/jj1bdx/exs1024pkg_exs1024_fetch = gitpkg_exs1024_repo = https://github.com/jj1bdx/exs1024pkg_exs1024_commit = masterPACKAGES += exsplus116pkg_exsplus116_name = exsplus116pkg_exsplus116_description = Xorshift116plus for Erlangpkg_exsplus116_homepage = https://github.com/jj1bdx/exsplus116pkg_exsplus116_fetch = gitpkg_exsplus116_repo = https://github.com/jj1bdx/exsplus116pkg_exsplus116_commit = masterPACKAGES += ezmtppkg_ezmtp_name = ezmtppkg_ezmtp_description = ZMTP protocol in pure Erlang.pkg_ezmtp_homepage = https://github.com/a13x/ezmtppkg_ezmtp_fetch = gitpkg_ezmtp_repo = https://github.com/a13x/ezmtppkg_ezmtp_commit = masterPACKAGES += fast_disk_logpkg_fast_disk_log_name = fast_disk_logpkg_fast_disk_log_description = Pool-based asynchronous Erlang disk loggerpkg_fast_disk_log_homepage = https://github.com/lpgauth/fast_disk_logpkg_fast_disk_log_fetch = gitpkg_fast_disk_log_repo = https://github.com/lpgauth/fast_disk_logpkg_fast_disk_log_commit = masterPACKAGES += feederpkg_feeder_name = feederpkg_feeder_description = Stream parse RSS and Atom formatted XML feeds.pkg_feeder_homepage = https://github.com/michaelnisi/feederpkg_feeder_fetch = gitpkg_feeder_repo = https://github.com/michaelnisi/feederpkg_feeder_commit = masterPACKAGES += find_cratepkg_find_crate_name = find_cratepkg_find_crate_description = Find Rust libs and exes in Erlang application priv directorypkg_find_crate_homepage = https://github.com/goertzenator/find_cratepkg_find_crate_fetch = gitpkg_find_crate_repo = https://github.com/goertzenator/find_cratepkg_find_crate_commit = masterPACKAGES += fixpkg_fix_name = fixpkg_fix_description = http://fixprotocol.org/ implementation.pkg_fix_homepage = https://github.com/maxlapshin/fixpkg_fix_fetch = gitpkg_fix_repo = https://github.com/maxlapshin/fixpkg_fix_commit = masterPACKAGES += flowerpkg_flower_name = flowerpkg_flower_description = FlowER - a Erlang OpenFlow development platformpkg_flower_homepage = https://github.com/travelping/flowerpkg_flower_fetch = gitpkg_flower_repo = https://github.com/travelping/flowerpkg_flower_commit = masterPACKAGES += fnpkg_fn_name = fnpkg_fn_description = Function utilities for Erlangpkg_fn_homepage = https://github.com/reiddraper/fnpkg_fn_fetch = gitpkg_fn_repo = https://github.com/reiddraper/fnpkg_fn_commit = masterPACKAGES += folsompkg_folsom_name = folsompkg_folsom_description = Expose Erlang Events and Metricspkg_folsom_homepage = https://github.com/boundary/folsompkg_folsom_fetch = gitpkg_folsom_repo = https://github.com/boundary/folsompkg_folsom_commit = masterPACKAGES += folsom_cowboypkg_folsom_cowboy_name = folsom_cowboypkg_folsom_cowboy_description = A Cowboy based Folsom HTTP Wrapper.pkg_folsom_cowboy_homepage = https://github.com/boundary/folsom_cowboypkg_folsom_cowboy_fetch = gitpkg_folsom_cowboy_repo = https://github.com/boundary/folsom_cowboypkg_folsom_cowboy_commit = masterPACKAGES += fspkg_fs_name = fspkg_fs_description = Erlang FileSystem Listenerpkg_fs_homepage = https://github.com/synrc/fspkg_fs_fetch = gitpkg_fs_repo = https://github.com/synrc/fspkg_fs_commit = masterPACKAGES += fusepkg_fuse_name = fusepkg_fuse_description = A Circuit Breaker for Erlangpkg_fuse_homepage = https://github.com/jlouis/fusepkg_fuse_fetch = gitpkg_fuse_repo = https://github.com/jlouis/fusepkg_fuse_commit = masterPACKAGES += gcmpkg_gcm_name = gcmpkg_gcm_description = An Erlang application for Google Cloud Messagingpkg_gcm_homepage = https://github.com/pdincau/gcm-erlangpkg_gcm_fetch = gitpkg_gcm_repo = https://github.com/pdincau/gcm-erlangpkg_gcm_commit = masterPACKAGES += gcprofpkg_gcprof_name = gcprofpkg_gcprof_description = Garbage Collection profiler for Erlangpkg_gcprof_homepage = https://github.com/knutin/gcprofpkg_gcprof_fetch = gitpkg_gcprof_repo = https://github.com/knutin/gcprofpkg_gcprof_commit = masterPACKAGES += geaspkg_geas_name = geaspkg_geas_description = Guess Erlang Application Scatteringpkg_geas_homepage = https://github.com/crownedgrouse/geaspkg_geas_fetch = gitpkg_geas_repo = https://github.com/crownedgrouse/geaspkg_geas_commit = masterPACKAGES += geefpkg_geef_name = geefpkg_geef_description = Git NEEEEF (Erlang NIF)pkg_geef_homepage = https://github.com/carlosmn/geefpkg_geef_fetch = gitpkg_geef_repo = https://github.com/carlosmn/geefpkg_geef_commit = masterPACKAGES += gen_coappkg_gen_coap_name = gen_coappkg_gen_coap_description = Generic Erlang CoAP Client/Serverpkg_gen_coap_homepage = https://github.com/gotthardp/gen_coappkg_gen_coap_fetch = gitpkg_gen_coap_repo = https://github.com/gotthardp/gen_coappkg_gen_coap_commit = masterPACKAGES += gen_cyclepkg_gen_cycle_name = gen_cyclepkg_gen_cycle_description = Simple, generic OTP behaviour for recurring taskspkg_gen_cycle_homepage = https://github.com/aerosol/gen_cyclepkg_gen_cycle_fetch = gitpkg_gen_cycle_repo = https://github.com/aerosol/gen_cyclepkg_gen_cycle_commit = developPACKAGES += gen_icmppkg_gen_icmp_name = gen_icmppkg_gen_icmp_description = Erlang interface to ICMP socketspkg_gen_icmp_homepage = https://github.com/msantos/gen_icmppkg_gen_icmp_fetch = gitpkg_gen_icmp_repo = https://github.com/msantos/gen_icmppkg_gen_icmp_commit = masterPACKAGES += gen_leaderpkg_gen_leader_name = gen_leaderpkg_gen_leader_description = leader election behaviorpkg_gen_leader_homepage = https://github.com/garret-smith/gen_leader_revivalpkg_gen_leader_fetch = gitpkg_gen_leader_repo = https://github.com/garret-smith/gen_leader_revivalpkg_gen_leader_commit = masterPACKAGES += gen_nb_serverpkg_gen_nb_server_name = gen_nb_serverpkg_gen_nb_server_description = OTP behavior for writing non-blocking serverspkg_gen_nb_server_homepage = https://github.com/kevsmith/gen_nb_serverpkg_gen_nb_server_fetch = gitpkg_gen_nb_server_repo = https://github.com/kevsmith/gen_nb_serverpkg_gen_nb_server_commit = masterPACKAGES += gen_paxospkg_gen_paxos_name = gen_paxospkg_gen_paxos_description = An Erlang/OTP-style implementation of the PAXOS distributed consensus protocolpkg_gen_paxos_homepage = https://github.com/gburd/gen_paxospkg_gen_paxos_fetch = gitpkg_gen_paxos_repo = https://github.com/gburd/gen_paxospkg_gen_paxos_commit = masterPACKAGES += gen_rpcpkg_gen_rpc_name = gen_rpcpkg_gen_rpc_description = A scalable RPC library for Erlang-VM based languagespkg_gen_rpc_homepage = https://github.com/priestjim/gen_rpc.gitpkg_gen_rpc_fetch = gitpkg_gen_rpc_repo = https://github.com/priestjim/gen_rpc.gitpkg_gen_rpc_commit = masterPACKAGES += gen_smtppkg_gen_smtp_name = gen_smtppkg_gen_smtp_description = A generic Erlang SMTP server and client that can be extended via callback modulespkg_gen_smtp_homepage = https://github.com/Vagabond/gen_smtppkg_gen_smtp_fetch = gitpkg_gen_smtp_repo = https://github.com/Vagabond/gen_smtppkg_gen_smtp_commit = masterPACKAGES += gen_trackerpkg_gen_tracker_name = gen_trackerpkg_gen_tracker_description = supervisor with ets handling of children and their metadatapkg_gen_tracker_homepage = https://github.com/erlyvideo/gen_trackerpkg_gen_tracker_fetch = gitpkg_gen_tracker_repo = https://github.com/erlyvideo/gen_trackerpkg_gen_tracker_commit = masterPACKAGES += gen_unixpkg_gen_unix_name = gen_unixpkg_gen_unix_description = Erlang Unix socket interfacepkg_gen_unix_homepage = https://github.com/msantos/gen_unixpkg_gen_unix_fetch = gitpkg_gen_unix_repo = https://github.com/msantos/gen_unixpkg_gen_unix_commit = masterPACKAGES += geodepkg_geode_name = geodepkg_geode_description = geohash/proximity lookup in pure, uncut erlang.pkg_geode_homepage = https://github.com/bradfordw/geodepkg_geode_fetch = gitpkg_geode_repo = https://github.com/bradfordw/geodepkg_geode_commit = masterPACKAGES += getoptpkg_getopt_name = getoptpkg_getopt_description = Module to parse command line arguments using the GNU getopt syntaxpkg_getopt_homepage = https://github.com/jcomellas/getoptpkg_getopt_fetch = gitpkg_getopt_repo = https://github.com/jcomellas/getoptpkg_getopt_commit = masterPACKAGES += gettextpkg_gettext_name = gettextpkg_gettext_description = Erlang internationalization library.pkg_gettext_homepage = https://github.com/etnt/gettextpkg_gettext_fetch = gitpkg_gettext_repo = https://github.com/etnt/gettextpkg_gettext_commit = masterPACKAGES += giallopkg_giallo_name = giallopkg_giallo_description = Small and flexible web framework on top of Cowboypkg_giallo_homepage = https://github.com/kivra/giallopkg_giallo_fetch = gitpkg_giallo_repo = https://github.com/kivra/giallopkg_giallo_commit = masterPACKAGES += ginpkg_gin_name = ginpkg_gin_description = The guards and for Erlang parse_transformpkg_gin_homepage = https://github.com/mad-cocktail/ginpkg_gin_fetch = gitpkg_gin_repo = https://github.com/mad-cocktail/ginpkg_gin_commit = masterPACKAGES += gittypkg_gitty_name = gittypkg_gitty_description = Git access in erlangpkg_gitty_homepage = https://github.com/maxlapshin/gittypkg_gitty_fetch = gitpkg_gitty_repo = https://github.com/maxlapshin/gittypkg_gitty_commit = masterPACKAGES += gpbpkg_gpb_name = gpbpkg_gpb_description = A Google Protobuf implementation for Erlangpkg_gpb_homepage = https://github.com/tomas-abrahamsson/gpbpkg_gpb_fetch = gitpkg_gpb_repo = https://github.com/tomas-abrahamsson/gpbpkg_gpb_commit = masterPACKAGES += gprocpkg_gproc_name = gprocpkg_gproc_description = Extended process registry for Erlangpkg_gproc_homepage = https://github.com/uwiger/gprocpkg_gproc_fetch = gitpkg_gproc_repo = https://github.com/uwiger/gprocpkg_gproc_commit = masterPACKAGES += grapherlpkg_grapherl_name = grapherlpkg_grapherl_description = Create graphs of Erlang systems and programspkg_grapherl_homepage = https://github.com/eproxus/grapherlpkg_grapherl_fetch = gitpkg_grapherl_repo = https://github.com/eproxus/grapherlpkg_grapherl_commit = masterPACKAGES += grpcpkg_grpc_name = grpcpkg_grpc_description = gRPC server in Erlangpkg_grpc_homepage = https://github.com/Bluehouse-Technology/grpcpkg_grpc_fetch = gitpkg_grpc_repo = https://github.com/Bluehouse-Technology/grpcpkg_grpc_commit = masterPACKAGES += grpc_clientpkg_grpc_client_name = grpc_clientpkg_grpc_client_description = gRPC client in Erlangpkg_grpc_client_homepage = https://github.com/Bluehouse-Technology/grpc_clientpkg_grpc_client_fetch = gitpkg_grpc_client_repo = https://github.com/Bluehouse-Technology/grpc_clientpkg_grpc_client_commit = masterPACKAGES += gunpkg_gun_name = gunpkg_gun_description = Asynchronous SPDY, HTTP and Websocket client written in Erlang.pkg_gun_homepage = http//ninenines.eupkg_gun_fetch = gitpkg_gun_repo = https://github.com/ninenines/gunpkg_gun_commit = masterPACKAGES += hackneypkg_hackney_name = hackneypkg_hackney_description = simple HTTP client in Erlangpkg_hackney_homepage = https://github.com/benoitc/hackneypkg_hackney_fetch = gitpkg_hackney_repo = https://github.com/benoitc/hackneypkg_hackney_commit = masterPACKAGES += hamcrestpkg_hamcrest_name = hamcrestpkg_hamcrest_description = Erlang port of Hamcrestpkg_hamcrest_homepage = https://github.com/hyperthunk/hamcrest-erlangpkg_hamcrest_fetch = gitpkg_hamcrest_repo = https://github.com/hyperthunk/hamcrest-erlangpkg_hamcrest_commit = masterPACKAGES += hottubpkg_hottub_name = hottubpkg_hottub_description = Permanent Erlang Worker Poolpkg_hottub_homepage = https://github.com/bfrog/hottubpkg_hottub_fetch = gitpkg_hottub_repo = https://github.com/bfrog/hottubpkg_hottub_commit = masterPACKAGES += hpackpkg_hpack_name = hpackpkg_hpack_description = HPACK Implementation for Erlangpkg_hpack_homepage = https://github.com/joedevivo/hpackpkg_hpack_fetch = gitpkg_hpack_repo = https://github.com/joedevivo/hpackpkg_hpack_commit = masterPACKAGES += hyperpkg_hyper_name = hyperpkg_hyper_description = Erlang implementation of HyperLogLogpkg_hyper_homepage = https://github.com/GameAnalytics/hyperpkg_hyper_fetch = gitpkg_hyper_repo = https://github.com/GameAnalytics/hyperpkg_hyper_commit = masterPACKAGES += i18npkg_i18n_name = i18npkg_i18n_description = International components for unicode from Erlang (unicode, date, string, number, format, locale, localization, transliteration, icu4e)pkg_i18n_homepage = https://github.com/erlang-unicode/i18npkg_i18n_fetch = gitpkg_i18n_repo = https://github.com/erlang-unicode/i18npkg_i18n_commit = masterPACKAGES += ibrowsepkg_ibrowse_name = ibrowsepkg_ibrowse_description = Erlang HTTP clientpkg_ibrowse_homepage = https://github.com/cmullaparthi/ibrowsepkg_ibrowse_fetch = gitpkg_ibrowse_repo = https://github.com/cmullaparthi/ibrowsepkg_ibrowse_commit = masterPACKAGES += idnapkg_idna_name = idnapkg_idna_description = Erlang IDNA libpkg_idna_homepage = https://github.com/benoitc/erlang-idnapkg_idna_fetch = gitpkg_idna_repo = https://github.com/benoitc/erlang-idnapkg_idna_commit = masterPACKAGES += irc_libpkg_irc_lib_name = irc_libpkg_irc_lib_description = Erlang irc client librarypkg_irc_lib_homepage = https://github.com/OtpChatBot/irc_libpkg_irc_lib_fetch = gitpkg_irc_lib_repo = https://github.com/OtpChatBot/irc_libpkg_irc_lib_commit = masterPACKAGES += ircdpkg_ircd_name = ircdpkg_ircd_description = A pluggable IRC daemon application/library for Erlang.pkg_ircd_homepage = https://github.com/tonyg/erlang-ircdpkg_ircd_fetch = gitpkg_ircd_repo = https://github.com/tonyg/erlang-ircdpkg_ircd_commit = masterPACKAGES += irispkg_iris_name = irispkg_iris_description = Iris Erlang bindingpkg_iris_homepage = https://github.com/project-iris/iris-erlpkg_iris_fetch = gitpkg_iris_repo = https://github.com/project-iris/iris-erlpkg_iris_commit = masterPACKAGES += iso8601pkg_iso8601_name = iso8601pkg_iso8601_description = Erlang ISO 8601 date formatter/parserpkg_iso8601_homepage = https://github.com/seansawyer/erlang_iso8601pkg_iso8601_fetch = gitpkg_iso8601_repo = https://github.com/seansawyer/erlang_iso8601pkg_iso8601_commit = masterPACKAGES += jamdb_sybasepkg_jamdb_sybase_name = jamdb_sybasepkg_jamdb_sybase_description = Erlang driver for SAP Sybase ASEpkg_jamdb_sybase_homepage = https://github.com/erlangbureau/jamdb_sybasepkg_jamdb_sybase_fetch = gitpkg_jamdb_sybase_repo = https://github.com/erlangbureau/jamdb_sybasepkg_jamdb_sybase_commit = masterPACKAGES += jessepkg_jesse_name = jessepkg_jesse_description = jesse (JSon Schema Erlang) is an implementation of a json schema validator for Erlang.pkg_jesse_homepage = https://github.com/for-GET/jessepkg_jesse_fetch = gitpkg_jesse_repo = https://github.com/for-GET/jessepkg_jesse_commit = masterPACKAGES += jiffypkg_jiffy_name = jiffypkg_jiffy_description = JSON NIFs for Erlang.pkg_jiffy_homepage = https://github.com/davisp/jiffypkg_jiffy_fetch = gitpkg_jiffy_repo = https://github.com/davisp/jiffypkg_jiffy_commit = masterPACKAGES += jiffy_vpkg_jiffy_v_name = jiffy_vpkg_jiffy_v_description = JSON validation utilitypkg_jiffy_v_homepage = https://github.com/shizzard/jiffy-vpkg_jiffy_v_fetch = gitpkg_jiffy_v_repo = https://github.com/shizzard/jiffy-vpkg_jiffy_v_commit = masterPACKAGES += jobspkg_jobs_name = jobspkg_jobs_description = Job scheduler for load regulationpkg_jobs_homepage = https://github.com/uwiger/jobspkg_jobs_fetch = gitpkg_jobs_repo = https://github.com/uwiger/jobspkg_jobs_commit = masterPACKAGES += joxapkg_joxa_name = joxapkg_joxa_description = A Modern Lisp for the Erlang VMpkg_joxa_homepage = https://github.com/joxa/joxapkg_joxa_fetch = gitpkg_joxa_repo = https://github.com/joxa/joxapkg_joxa_commit = masterPACKAGES += json_recpkg_json_rec_name = json_recpkg_json_rec_description = JSON to erlang recordpkg_json_rec_homepage = https://github.com/justinkirby/json_recpkg_json_rec_fetch = gitpkg_json_rec_repo = https://github.com/justinkirby/json_recpkg_json_rec_commit = masterPACKAGES += jsonepkg_jsone_name = jsonepkg_jsone_description = An Erlang library for encoding, decoding JSON data.pkg_jsone_homepage = https://github.com/sile/jsone.gitpkg_jsone_fetch = gitpkg_jsone_repo = https://github.com/sile/jsone.gitpkg_jsone_commit = masterPACKAGES += jsonpathpkg_jsonpath_name = jsonpathpkg_jsonpath_description = Fast Erlang JSON data retrieval and updates via javascript-like notationpkg_jsonpath_homepage = https://github.com/GeneStevens/jsonpathpkg_jsonpath_fetch = gitpkg_jsonpath_repo = https://github.com/GeneStevens/jsonpathpkg_jsonpath_commit = masterPACKAGES += jsonxpkg_jsonx_name = jsonxpkg_jsonx_description = JSONX is an Erlang library for efficient decode and encode JSON, written in C.pkg_jsonx_homepage = https://github.com/iskra/jsonxpkg_jsonx_fetch = gitpkg_jsonx_repo = https://github.com/iskra/jsonxpkg_jsonx_commit = masterPACKAGES += jsxpkg_jsx_name = jsxpkg_jsx_description = An Erlang application for consuming, producing and manipulating JSON.pkg_jsx_homepage = https://github.com/talentdeficit/jsxpkg_jsx_fetch = gitpkg_jsx_repo = https://github.com/talentdeficit/jsxpkg_jsx_commit = mainPACKAGES += kafka_protocolpkg_kafka_protocol_name = kafka_protocolpkg_kafka_protocol_description = Kafka protocol Erlang librarypkg_kafka_protocol_homepage = https://github.com/kafka4beam/kafka_protocolpkg_kafka_protocol_fetch = gitpkg_kafka_protocol_repo = https://github.com/kafka4beam/kafka_protocolpkg_kafka_protocol_commit = masterPACKAGES += kaipkg_kai_name = kaipkg_kai_description = DHT storage by Takeshi Inouepkg_kai_homepage = https://github.com/synrc/kaipkg_kai_fetch = gitpkg_kai_repo = https://github.com/synrc/kaipkg_kai_commit = masterPACKAGES += katjapkg_katja_name = katjapkg_katja_description = A simple Riemann client written in Erlang.pkg_katja_homepage = https://github.com/nifoc/katjapkg_katja_fetch = gitpkg_katja_repo = https://github.com/nifoc/katjapkg_katja_commit = masterPACKAGES += key2valuepkg_key2value_name = key2valuepkg_key2value_description = Erlang 2-way mappkg_key2value_homepage = https://github.com/okeuday/key2valuepkg_key2value_fetch = gitpkg_key2value_repo = https://github.com/okeuday/key2valuepkg_key2value_commit = masterPACKAGES += keys1valuepkg_keys1value_name = keys1valuepkg_keys1value_description = Erlang set associative map for key listspkg_keys1value_homepage = https://github.com/okeuday/keys1valuepkg_keys1value_fetch = gitpkg_keys1value_repo = https://github.com/okeuday/keys1valuepkg_keys1value_commit = masterPACKAGES += kineticpkg_kinetic_name = kineticpkg_kinetic_description = Erlang Kinesis Clientpkg_kinetic_homepage = https://github.com/AdRoll/kineticpkg_kinetic_fetch = gitpkg_kinetic_repo = https://github.com/AdRoll/kineticpkg_kinetic_commit = mainPACKAGES += kjellpkg_kjell_name = kjellpkg_kjell_description = Erlang Shellpkg_kjell_homepage = https://github.com/karlll/kjellpkg_kjell_fetch = gitpkg_kjell_repo = https://github.com/karlll/kjellpkg_kjell_commit = masterPACKAGES += krakenpkg_kraken_name = krakenpkg_kraken_description = Distributed Pubsub Server for Realtime Appspkg_kraken_homepage = https://github.com/Asana/krakenpkg_kraken_fetch = gitpkg_kraken_repo = https://github.com/Asana/krakenpkg_kraken_commit = masterPACKAGES += kucumberlpkg_kucumberl_name = kucumberlpkg_kucumberl_description = A pure-erlang, open-source, implementation of Cucumberpkg_kucumberl_homepage = https://github.com/openshine/kucumberlpkg_kucumberl_fetch = gitpkg_kucumberl_repo = https://github.com/openshine/kucumberlpkg_kucumberl_commit = masterPACKAGES += kvcpkg_kvc_name = kvcpkg_kvc_description = KVC - Key Value Coding for Erlang data structurespkg_kvc_homepage = https://github.com/etrepum/kvcpkg_kvc_fetch = gitpkg_kvc_repo = https://github.com/etrepum/kvcpkg_kvc_commit = masterPACKAGES += kvlistspkg_kvlists_name = kvlistspkg_kvlists_description = Lists of key-value pairs (decoded JSON) in Erlangpkg_kvlists_homepage = https://github.com/jcomellas/kvlistspkg_kvlists_fetch = gitpkg_kvlists_repo = https://github.com/jcomellas/kvlistspkg_kvlists_commit = masterPACKAGES += kvspkg_kvs_name = kvspkg_kvs_description = Container and Iteratorpkg_kvs_homepage = https://github.com/synrc/kvspkg_kvs_fetch = gitpkg_kvs_repo = https://github.com/synrc/kvspkg_kvs_commit = masterPACKAGES += lagerpkg_lager_name = lagerpkg_lager_description = A logging framework for Erlang/OTP.pkg_lager_homepage = https://github.com/erlang-lager/lagerpkg_lager_fetch = gitpkg_lager_repo = https://github.com/erlang-lager/lagerpkg_lager_commit = masterPACKAGES += lager_syslogpkg_lager_syslog_name = lager_syslogpkg_lager_syslog_description = Syslog backend for lagerpkg_lager_syslog_homepage = https://github.com/erlang-lager/lager_syslogpkg_lager_syslog_fetch = gitpkg_lager_syslog_repo = https://github.com/erlang-lager/lager_syslogpkg_lager_syslog_commit = masterPACKAGES += lassepkg_lasse_name = lassepkg_lasse_description = SSE handler for Cowboypkg_lasse_homepage = https://github.com/inaka/lassepkg_lasse_fetch = gitpkg_lasse_repo = https://github.com/inaka/lassepkg_lasse_commit = masterPACKAGES += ldappkg_ldap_name = ldappkg_ldap_description = LDAP server written in Erlangpkg_ldap_homepage = https://github.com/spawnproc/ldappkg_ldap_fetch = gitpkg_ldap_repo = https://github.com/spawnproc/ldappkg_ldap_commit = masterPACKAGES += lfepkg_lfe_name = lfepkg_lfe_description = Lisp Flavoured Erlang (LFE)pkg_lfe_homepage = https://github.com/rvirding/lfepkg_lfe_fetch = gitpkg_lfe_repo = https://github.com/rvirding/lfepkg_lfe_commit = masterPACKAGES += livepkg_live_name = livepkg_live_description = Automated module and configuration reloader.pkg_live_homepage = http://ninenines.eupkg_live_fetch = gitpkg_live_repo = https://github.com/ninenines/livepkg_live_commit = masterPACKAGES += lockerpkg_locker_name = lockerpkg_locker_description = Atomic distributed 'check and set' for short-lived keyspkg_locker_homepage = https://github.com/wooga/lockerpkg_locker_fetch = gitpkg_locker_repo = https://github.com/wooga/lockerpkg_locker_commit = masterPACKAGES += lockspkg_locks_name = lockspkg_locks_description = A scalable, deadlock-resolving resource lockerpkg_locks_homepage = https://github.com/uwiger/lockspkg_locks_fetch = gitpkg_locks_repo = https://github.com/uwiger/lockspkg_locks_commit = masterPACKAGES += log4erlpkg_log4erl_name = log4erlpkg_log4erl_description = A logger for erlang in the spirit of Log4J.pkg_log4erl_homepage = https://github.com/ahmednawras/log4erlpkg_log4erl_fetch = gitpkg_log4erl_repo = https://github.com/ahmednawras/log4erlpkg_log4erl_commit = masterPACKAGES += lolpkg_lol_name = lolpkg_lol_description = Lisp on erLang, and programming is fun againpkg_lol_homepage = https://github.com/b0oh/lolpkg_lol_fetch = gitpkg_lol_repo = https://github.com/b0oh/lolpkg_lol_commit = masterPACKAGES += lucidpkg_lucid_name = lucidpkg_lucid_description = HTTP/2 server written in Erlangpkg_lucid_homepage = https://github.com/tatsuhiro-t/lucidpkg_lucid_fetch = gitpkg_lucid_repo = https://github.com/tatsuhiro-t/lucidpkg_lucid_commit = masterPACKAGES += luerlpkg_luerl_name = luerlpkg_luerl_description = Lua in Erlangpkg_luerl_homepage = https://github.com/rvirding/luerlpkg_luerl_fetch = gitpkg_luerl_repo = https://github.com/rvirding/luerlpkg_luerl_commit = developPACKAGES += luxpkg_lux_name = luxpkg_lux_description = Lux (LUcid eXpect scripting) simplifies test automation and provides an Expect-style execution of commandspkg_lux_homepage = https://github.com/hawk/luxpkg_lux_fetch = gitpkg_lux_repo = https://github.com/hawk/luxpkg_lux_commit = masterPACKAGES += madpkg_mad_name = madpkg_mad_description = Small and Fast Rebar Replacementpkg_mad_homepage = https://github.com/synrc/madpkg_mad_fetch = gitpkg_mad_repo = https://github.com/synrc/madpkg_mad_commit = masterPACKAGES += marinapkg_marina_name = marinapkg_marina_description = Non-blocking Erlang Cassandra CQL3 clientpkg_marina_homepage = https://github.com/lpgauth/marinapkg_marina_fetch = gitpkg_marina_repo = https://github.com/lpgauth/marinapkg_marina_commit = masterPACKAGES += mavgpkg_mavg_name = mavgpkg_mavg_description = Erlang :: Exponential moving average librarypkg_mavg_homepage = https://github.com/EchoTeam/mavgpkg_mavg_fetch = gitpkg_mavg_repo = https://github.com/EchoTeam/mavgpkg_mavg_commit = masterPACKAGES += meckpkg_meck_name = meckpkg_meck_description = A mocking library for Erlangpkg_meck_homepage = https://github.com/eproxus/meckpkg_meck_fetch = gitpkg_meck_repo = https://github.com/eproxus/meckpkg_meck_commit = masterPACKAGES += mekaopkg_mekao_name = mekaopkg_mekao_description = SQL constructorpkg_mekao_homepage = https://github.com/ddosia/mekaopkg_mekao_fetch = gitpkg_mekao_repo = https://github.com/ddosia/mekaopkg_mekao_commit = masterPACKAGES += merlpkg_merl_name = merlpkg_merl_description = Metaprogramming in Erlangpkg_merl_homepage = https://github.com/richcarl/merlpkg_merl_fetch = gitpkg_merl_repo = https://github.com/richcarl/merlpkg_merl_commit = masterPACKAGES += mimerlpkg_mimerl_name = mimerlpkg_mimerl_description = library to handle mimetypespkg_mimerl_homepage = https://github.com/benoitc/mimerlpkg_mimerl_fetch = gitpkg_mimerl_repo = https://github.com/benoitc/mimerlpkg_mimerl_commit = masterPACKAGES += mimetypespkg_mimetypes_name = mimetypespkg_mimetypes_description = Erlang MIME types librarypkg_mimetypes_homepage = https://github.com/spawngrid/mimetypespkg_mimetypes_fetch = gitpkg_mimetypes_repo = https://github.com/spawngrid/mimetypespkg_mimetypes_commit = masterPACKAGES += mixerpkg_mixer_name = mixerpkg_mixer_description = Mix in functions from other modulespkg_mixer_homepage = https://github.com/chef/mixerpkg_mixer_fetch = gitpkg_mixer_repo = https://github.com/chef/mixerpkg_mixer_commit = mainPACKAGES += mochiwebpkg_mochiweb_name = mochiwebpkg_mochiweb_description = MochiWeb is an Erlang library for building lightweight HTTP servers.pkg_mochiweb_homepage = https://github.com/mochi/mochiwebpkg_mochiweb_fetch = gitpkg_mochiweb_repo = https://github.com/mochi/mochiwebpkg_mochiweb_commit = mainPACKAGES += mochiweb_xpathpkg_mochiweb_xpath_name = mochiweb_xpathpkg_mochiweb_xpath_description = XPath support for mochiweb's html parserpkg_mochiweb_xpath_homepage = https://github.com/retnuh/mochiweb_xpathpkg_mochiweb_xpath_fetch = gitpkg_mochiweb_xpath_repo = https://github.com/retnuh/mochiweb_xpathpkg_mochiweb_xpath_commit = masterPACKAGES += mockgyverpkg_mockgyver_name = mockgyverpkg_mockgyver_description = A mocking library for Erlangpkg_mockgyver_homepage = https://github.com/klajo/mockgyverpkg_mockgyver_fetch = gitpkg_mockgyver_repo = https://github.com/klajo/mockgyverpkg_mockgyver_commit = masterPACKAGES += modlibpkg_modlib_name = modlibpkg_modlib_description = Web framework based on Erlang's inets httpdpkg_modlib_homepage = https://github.com/gar1t/modlibpkg_modlib_fetch = gitpkg_modlib_repo = https://github.com/gar1t/modlibpkg_modlib_commit = masterPACKAGES += mongodbpkg_mongodb_name = mongodbpkg_mongodb_description = MongoDB driver for Erlangpkg_mongodb_homepage = https://github.com/comtihon/mongodb-erlangpkg_mongodb_fetch = gitpkg_mongodb_repo = https://github.com/comtihon/mongodb-erlangpkg_mongodb_commit = masterPACKAGES += mongooseimpkg_mongooseim_name = mongooseimpkg_mongooseim_description = Jabber / XMPP server with focus on performance and scalability, by Erlang Solutionspkg_mongooseim_homepage = https://www.erlang-solutions.com/products/mongooseim-massively-scalable-ejabberd-platformpkg_mongooseim_fetch = gitpkg_mongooseim_repo = https://github.com/esl/MongooseIMpkg_mongooseim_commit = masterPACKAGES += moyopkg_moyo_name = moyopkg_moyo_description = Erlang utility functions librarypkg_moyo_homepage = https://github.com/dwango/moyopkg_moyo_fetch = gitpkg_moyo_repo = https://github.com/dwango/moyopkg_moyo_commit = masterPACKAGES += msgpackpkg_msgpack_name = msgpackpkg_msgpack_description = MessagePack (de)serializer implementation for Erlangpkg_msgpack_homepage = https://github.com/msgpack/msgpack-erlangpkg_msgpack_fetch = gitpkg_msgpack_repo = https://github.com/msgpack/msgpack-erlangpkg_msgpack_commit = masterPACKAGES += mu2pkg_mu2_name = mu2pkg_mu2_description = Erlang mutation testing toolpkg_mu2_homepage = https://github.com/ramsay-t/mu2pkg_mu2_fetch = gitpkg_mu2_repo = https://github.com/ramsay-t/mu2pkg_mu2_commit = masterPACKAGES += mustachepkg_mustache_name = mustachepkg_mustache_description = Mustache template engine for Erlang.pkg_mustache_homepage = https://github.com/mojombo/mustache.erlpkg_mustache_fetch = gitpkg_mustache_repo = https://github.com/mojombo/mustache.erlpkg_mustache_commit = masterPACKAGES += myprotopkg_myproto_name = myprotopkg_myproto_description = MySQL Server Protocol in Erlangpkg_myproto_homepage = https://github.com/altenwald/myprotopkg_myproto_fetch = gitpkg_myproto_repo = https://github.com/altenwald/myprotopkg_myproto_commit = masterPACKAGES += mysqlpkg_mysql_name = mysqlpkg_mysql_description = MySQL client library for Erlang/OTPpkg_mysql_homepage = https://github.com/mysql-otp/mysql-otppkg_mysql_fetch = gitpkg_mysql_repo = https://github.com/mysql-otp/mysql-otppkg_mysql_commit = 1.7.0PACKAGES += n2opkg_n2o_name = n2opkg_n2o_description = WebSocket Application Serverpkg_n2o_homepage = https://github.com/5HT/n2opkg_n2o_fetch = gitpkg_n2o_repo = https://github.com/5HT/n2opkg_n2o_commit = masterPACKAGES += nat_upnppkg_nat_upnp_name = nat_upnppkg_nat_upnp_description = Erlang library to map your internal port to an external using UNP IGDpkg_nat_upnp_homepage = https://github.com/benoitc/nat_upnppkg_nat_upnp_fetch = gitpkg_nat_upnp_repo = https://github.com/benoitc/nat_upnppkg_nat_upnp_commit = masterPACKAGES += neo4jpkg_neo4j_name = neo4jpkg_neo4j_description = Erlang client library for Neo4J.pkg_neo4j_homepage = https://github.com/dmitriid/neo4j-erlangpkg_neo4j_fetch = gitpkg_neo4j_repo = https://github.com/dmitriid/neo4j-erlangpkg_neo4j_commit = masterPACKAGES += neotomapkg_neotoma_name = neotomapkg_neotoma_description = Erlang library and packrat parser-generator for parsing expression grammars.pkg_neotoma_homepage = https://github.com/seancribbs/neotomapkg_neotoma_fetch = gitpkg_neotoma_repo = https://github.com/seancribbs/neotomapkg_neotoma_commit = masterPACKAGES += niftypkg_nifty_name = niftypkg_nifty_description = Erlang NIF wrapper generatorpkg_nifty_homepage = https://github.com/parapluu/niftypkg_nifty_fetch = gitpkg_nifty_repo = https://github.com/parapluu/niftypkg_nifty_commit = masterPACKAGES += nitrogen_corepkg_nitrogen_core_name = nitrogen_corepkg_nitrogen_core_description = The core Nitrogen library.pkg_nitrogen_core_homepage = http://nitrogenproject.com/pkg_nitrogen_core_fetch = gitpkg_nitrogen_core_repo = https://github.com/nitrogen/nitrogen_corepkg_nitrogen_core_commit = masterPACKAGES += nkpacketpkg_nkpacket_name = nkpacketpkg_nkpacket_description = Generic Erlang transport layerpkg_nkpacket_homepage = https://github.com/Nekso/nkpacketpkg_nkpacket_fetch = gitpkg_nkpacket_repo = https://github.com/Nekso/nkpacketpkg_nkpacket_commit = masterPACKAGES += nksippkg_nksip_name = nksippkg_nksip_description = Erlang SIP application serverpkg_nksip_homepage = https://github.com/kalta/nksippkg_nksip_fetch = gitpkg_nksip_repo = https://github.com/kalta/nksippkg_nksip_commit = masterPACKAGES += nodefinderpkg_nodefinder_name = nodefinderpkg_nodefinder_description = automatic node discovery via UDP multicastpkg_nodefinder_homepage = https://github.com/erlanger/nodefinderpkg_nodefinder_fetch = gitpkg_nodefinder_repo = https://github.com/okeuday/nodefinderpkg_nodefinder_commit = masterPACKAGES += nprocregpkg_nprocreg_name = nprocregpkg_nprocreg_description = Minimal Distributed Erlang Process Registrypkg_nprocreg_homepage = http://nitrogenproject.com/pkg_nprocreg_fetch = gitpkg_nprocreg_repo = https://github.com/nitrogen/nprocregpkg_nprocreg_commit = masterPACKAGES += oauthpkg_oauth_name = oauthpkg_oauth_description = An Erlang OAuth 1.0 implementationpkg_oauth_homepage = https://github.com/tim/erlang-oauthpkg_oauth_fetch = gitpkg_oauth_repo = https://github.com/tim/erlang-oauthpkg_oauth_commit = mainPACKAGES += oauth2pkg_oauth2_name = oauth2pkg_oauth2_description = Erlang Oauth2 implementationpkg_oauth2_homepage = https://github.com/kivra/oauth2pkg_oauth2_fetch = gitpkg_oauth2_repo = https://github.com/kivra/oauth2pkg_oauth2_commit = masterPACKAGES += observer_clipkg_observer_cli_name = observer_clipkg_observer_cli_description = Visualize Erlang/Elixir Nodes On The Command Linepkg_observer_cli_homepage = http://zhongwencool.github.io/observer_clipkg_observer_cli_fetch = gitpkg_observer_cli_repo = https://github.com/zhongwencool/observer_clipkg_observer_cli_commit = masterPACKAGES += octopuspkg_octopus_name = octopuspkg_octopus_description = Small and flexible pool manager written in Erlangpkg_octopus_homepage = https://github.com/erlangbureau/octopuspkg_octopus_fetch = gitpkg_octopus_repo = https://github.com/erlangbureau/octopuspkg_octopus_commit = masterPACKAGES += openflowpkg_openflow_name = openflowpkg_openflow_description = An OpenFlow controller written in pure erlangpkg_openflow_homepage = https://github.com/renatoaguiar/erlang-openflowpkg_openflow_fetch = gitpkg_openflow_repo = https://github.com/renatoaguiar/erlang-openflowpkg_openflow_commit = masterPACKAGES += openidpkg_openid_name = openidpkg_openid_description = Erlang OpenIDpkg_openid_homepage = https://github.com/brendonh/erl_openidpkg_openid_fetch = gitpkg_openid_repo = https://github.com/brendonh/erl_openidpkg_openid_commit = masterPACKAGES += openpokerpkg_openpoker_name = openpokerpkg_openpoker_description = Genesis Texas hold'em Game Serverpkg_openpoker_homepage = https://github.com/hpyhacking/openpokerpkg_openpoker_fetch = gitpkg_openpoker_repo = https://github.com/hpyhacking/openpokerpkg_openpoker_commit = masterPACKAGES += otpbppkg_otpbp_name = otpbppkg_otpbp_description = Parse transformer for use new OTP functions in old Erlang/OTP releases (R15, R16, 17, 18, 19)pkg_otpbp_homepage = https://github.com/Ledest/otpbppkg_otpbp_fetch = gitpkg_otpbp_repo = https://github.com/Ledest/otpbppkg_otpbp_commit = masterPACKAGES += palpkg_pal_name = palpkg_pal_description = Pragmatic Authentication Librarypkg_pal_homepage = https://github.com/manifest/palpkg_pal_fetch = gitpkg_pal_repo = https://github.com/manifest/palpkg_pal_commit = masterPACKAGES += parse_transpkg_parse_trans_name = parse_transpkg_parse_trans_description = Parse transform utilities for Erlangpkg_parse_trans_homepage = https://github.com/uwiger/parse_transpkg_parse_trans_fetch = gitpkg_parse_trans_repo = https://github.com/uwiger/parse_transpkg_parse_trans_commit = masterPACKAGES += parsexmlpkg_parsexml_name = parsexmlpkg_parsexml_description = Simple DOM XML parser with convenient and very simple APIpkg_parsexml_homepage = https://github.com/maxlapshin/parsexmlpkg_parsexml_fetch = gitpkg_parsexml_repo = https://github.com/maxlapshin/parsexmlpkg_parsexml_commit = masterPACKAGES += partisanpkg_partisan_name = partisanpkg_partisan_description = High-performance, high-scalability distributed computing with Erlang and Elixir.pkg_partisan_homepage = http://partisan.cloudpkg_partisan_fetch = gitpkg_partisan_repo = https://github.com/lasp-lang/partisanpkg_partisan_commit = masterPACKAGES += pegjspkg_pegjs_name = pegjspkg_pegjs_description = An implementation of PEG.js grammar for Erlang.pkg_pegjs_homepage = https://github.com/dmitriid/pegjspkg_pegjs_fetch = gitpkg_pegjs_repo = https://github.com/dmitriid/pegjspkg_pegjs_commit = masterPACKAGES += percept2pkg_percept2_name = percept2pkg_percept2_description = Concurrent profiling tool for Erlangpkg_percept2_homepage = https://github.com/huiqing/percept2pkg_percept2_fetch = gitpkg_percept2_repo = https://github.com/huiqing/percept2pkg_percept2_commit = masterPACKAGES += pgopkg_pgo_name = pgopkg_pgo_description = Erlang Postgres client and connection poolpkg_pgo_homepage = https://github.com/erleans/pgo.gitpkg_pgo_fetch = gitpkg_pgo_repo = https://github.com/erleans/pgo.gitpkg_pgo_commit = mainPACKAGES += pgsqlpkg_pgsql_name = pgsqlpkg_pgsql_description = Erlang PostgreSQL driverpkg_pgsql_homepage = https://github.com/semiocast/pgsqlpkg_pgsql_fetch = gitpkg_pgsql_repo = https://github.com/semiocast/pgsqlpkg_pgsql_commit = masterPACKAGES += pkgxpkg_pkgx_name = pkgxpkg_pkgx_description = Build .deb packages from Erlang releasespkg_pkgx_homepage = https://github.com/arjan/pkgxpkg_pkgx_fetch = gitpkg_pkgx_repo = https://github.com/arjan/pkgxpkg_pkgx_commit = masterPACKAGES += pktpkg_pkt_name = pktpkg_pkt_description = Erlang network protocol librarypkg_pkt_homepage = https://github.com/msantos/pktpkg_pkt_fetch = gitpkg_pkt_repo = https://github.com/msantos/pktpkg_pkt_commit = masterPACKAGES += plain_fsmpkg_plain_fsm_name = plain_fsmpkg_plain_fsm_description = A behaviour/support library for writing plain Erlang FSMs.pkg_plain_fsm_homepage = https://github.com/uwiger/plain_fsmpkg_plain_fsm_fetch = gitpkg_plain_fsm_repo = https://github.com/uwiger/plain_fsmpkg_plain_fsm_commit = masterPACKAGES += pmod_transformpkg_pmod_transform_name = pmod_transformpkg_pmod_transform_description = Parse transform for parameterized modulespkg_pmod_transform_homepage = https://github.com/erlang/pmod_transformpkg_pmod_transform_fetch = gitpkg_pmod_transform_repo = https://github.com/erlang/pmod_transformpkg_pmod_transform_commit = masterPACKAGES += poboxpkg_pobox_name = poboxpkg_pobox_description = External buffer processes to protect against mailbox overflow in Erlangpkg_pobox_homepage = https://github.com/ferd/poboxpkg_pobox_fetch = gitpkg_pobox_repo = https://github.com/ferd/poboxpkg_pobox_commit = masterPACKAGES += ponospkg_ponos_name = ponospkg_ponos_description = ponos is a simple yet powerful load generator written in erlangpkg_ponos_homepage = https://github.com/klarna/ponospkg_ponos_fetch = gitpkg_ponos_repo = https://github.com/klarna/ponospkg_ponos_commit = masterPACKAGES += poolboypkg_poolboy_name = poolboypkg_poolboy_description = A hunky Erlang worker pool factorypkg_poolboy_homepage = https://github.com/devinus/poolboypkg_poolboy_fetch = gitpkg_poolboy_repo = https://github.com/devinus/poolboypkg_poolboy_commit = masterPACKAGES += poolerpkg_pooler_name = poolerpkg_pooler_description = An OTP Process Pool Applicationpkg_pooler_homepage = https://github.com/seth/poolerpkg_pooler_fetch = gitpkg_pooler_repo = https://github.com/seth/poolerpkg_pooler_commit = masterPACKAGES += pqueuepkg_pqueue_name = pqueuepkg_pqueue_description = Erlang Priority Queuespkg_pqueue_homepage = https://github.com/okeuday/pqueuepkg_pqueue_fetch = gitpkg_pqueue_repo = https://github.com/okeuday/pqueuepkg_pqueue_commit = masterPACKAGES += procketpkg_procket_name = procketpkg_procket_description = Erlang interface to low level socket operationspkg_procket_homepage = http://blog.listincomprehension.com/search/label/procketpkg_procket_fetch = gitpkg_procket_repo = https://github.com/msantos/procketpkg_procket_commit = masterPACKAGES += prometheuspkg_prometheus_name = prometheuspkg_prometheus_description = Prometheus.io client in Erlangpkg_prometheus_homepage = https://github.com/deadtrickster/prometheus.erlpkg_prometheus_fetch = gitpkg_prometheus_repo = https://github.com/deadtrickster/prometheus.erlpkg_prometheus_commit = masterPACKAGES += proppkg_prop_name = proppkg_prop_description = An Erlang code scaffolding and generator system.pkg_prop_homepage = https://github.com/nuex/proppkg_prop_fetch = gitpkg_prop_repo = https://github.com/nuex/proppkg_prop_commit = masterPACKAGES += properpkg_proper_name = properpkg_proper_description = PropEr: a QuickCheck-inspired property-based testing tool for Erlang.pkg_proper_homepage = http://proper.softlab.ntua.grpkg_proper_fetch = gitpkg_proper_repo = https://github.com/manopapad/properpkg_proper_commit = masterPACKAGES += propspkg_props_name = propspkg_props_description = Property structure librarypkg_props_homepage = https://github.com/greyarea/propspkg_props_fetch = gitpkg_props_repo = https://github.com/greyarea/propspkg_props_commit = masterPACKAGES += protobuffspkg_protobuffs_name = protobuffspkg_protobuffs_description = An implementation of Google's Protocol Buffers for Erlang, based on ngerakines/erlang_protobuffs.pkg_protobuffs_homepage = https://github.com/basho/erlang_protobuffspkg_protobuffs_fetch = gitpkg_protobuffs_repo = https://github.com/basho/erlang_protobuffspkg_protobuffs_commit = masterPACKAGES += psychopkg_psycho_name = psychopkg_psycho_description = HTTP server that provides a WSGI-like interface for applications and middleware.pkg_psycho_homepage = https://github.com/gar1t/psychopkg_psycho_fetch = gitpkg_psycho_repo = https://github.com/gar1t/psychopkg_psycho_commit = masterPACKAGES += puritypkg_purity_name = puritypkg_purity_description = A side-effect analyzer for Erlangpkg_purity_homepage = https://github.com/mpitid/puritypkg_purity_fetch = gitpkg_purity_repo = https://github.com/mpitid/puritypkg_purity_commit = masterPACKAGES += qdatepkg_qdate_name = qdatepkg_qdate_description = Date, time, and timezone parsing, formatting, and conversion for Erlang.pkg_qdate_homepage = https://github.com/choptastic/qdatepkg_qdate_fetch = gitpkg_qdate_repo = https://github.com/choptastic/qdatepkg_qdate_commit = masterPACKAGES += qrcodepkg_qrcode_name = qrcodepkg_qrcode_description = QR Code encoder in Erlangpkg_qrcode_homepage = https://github.com/komone/qrcodepkg_qrcode_fetch = gitpkg_qrcode_repo = https://github.com/komone/qrcodepkg_qrcode_commit = masterPACKAGES += questpkg_quest_name = questpkg_quest_description = Learn Erlang through this set of challenges. An interactive system for getting to know Erlang.pkg_quest_homepage = https://github.com/eriksoe/ErlangQuestpkg_quest_fetch = gitpkg_quest_repo = https://github.com/eriksoe/ErlangQuestpkg_quest_commit = masterPACKAGES += quickrandpkg_quickrand_name = quickrandpkg_quickrand_description = Quick Erlang Random Number Generationpkg_quickrand_homepage = https://github.com/okeuday/quickrandpkg_quickrand_fetch = gitpkg_quickrand_repo = https://github.com/okeuday/quickrandpkg_quickrand_commit = masterPACKAGES += rabbit_exchange_type_riakpkg_rabbit_exchange_type_riak_name = rabbit_exchange_type_riakpkg_rabbit_exchange_type_riak_description = Custom RabbitMQ exchange type for sticking messages in Riakpkg_rabbit_exchange_type_riak_homepage = https://github.com/jbrisbin/riak-exchangepkg_rabbit_exchange_type_riak_fetch = gitpkg_rabbit_exchange_type_riak_repo = https://github.com/jbrisbin/riak-exchangepkg_rabbit_exchange_type_riak_commit = masterPACKAGES += rackpkg_rack_name = rackpkg_rack_description = Rack handler for erlangpkg_rack_homepage = https://github.com/erlyvideo/rackpkg_rack_fetch = gitpkg_rack_repo = https://github.com/erlyvideo/rackpkg_rack_commit = masterPACKAGES += radierlpkg_radierl_name = radierlpkg_radierl_description = RADIUS protocol stack implemented in Erlang.pkg_radierl_homepage = https://github.com/vances/radierlpkg_radierl_fetch = gitpkg_radierl_repo = https://github.com/vances/radierlpkg_radierl_commit = masterPACKAGES += ranchpkg_ranch_name = ranchpkg_ranch_description = Socket acceptor pool for TCP protocols.pkg_ranch_homepage = http://ninenines.eupkg_ranch_fetch = gitpkg_ranch_repo = https://github.com/ninenines/ranchpkg_ranch_commit = 1.2.1PACKAGES += rbeaconpkg_rbeacon_name = rbeaconpkg_rbeacon_description = LAN discovery and presence in Erlang.pkg_rbeacon_homepage = https://github.com/refuge/rbeaconpkg_rbeacon_fetch = gitpkg_rbeacon_repo = https://github.com/refuge/rbeaconpkg_rbeacon_commit = masterPACKAGES += re2pkg_re2_name = re2pkg_re2_description = Erlang NIF bindings for RE2 regex librarypkg_re2_homepage = https://github.com/dukesoferl/re2pkg_re2_fetch = gitpkg_re2_repo = https://github.com/dukesoferl/re2pkg_re2_commit = masterPACKAGES += rebuspkg_rebus_name = rebuspkg_rebus_description = A stupid simple, internal, pub/sub event bus written in- and for Erlang.pkg_rebus_homepage = https://github.com/olle/rebuspkg_rebus_fetch = gitpkg_rebus_repo = https://github.com/olle/rebuspkg_rebus_commit = masterPACKAGES += rec2jsonpkg_rec2json_name = rec2jsonpkg_rec2json_description = Compile erlang record definitions into modules to convert them to/from json easily.pkg_rec2json_homepage = https://github.com/lordnull/rec2jsonpkg_rec2json_fetch = gitpkg_rec2json_repo = https://github.com/lordnull/rec2jsonpkg_rec2json_commit = masterPACKAGES += reconpkg_recon_name = reconpkg_recon_description = Collection of functions and scripts to debug Erlang in production.pkg_recon_homepage = https://github.com/ferd/reconpkg_recon_fetch = gitpkg_recon_repo = https://github.com/ferd/reconpkg_recon_commit = masterPACKAGES += record_infopkg_record_info_name = record_infopkg_record_info_description = Convert between record and proplistpkg_record_info_homepage = https://github.com/bipthelin/erlang-record_infopkg_record_info_fetch = gitpkg_record_info_repo = https://github.com/bipthelin/erlang-record_infopkg_record_info_commit = masterPACKAGES += redgridpkg_redgrid_name = redgridpkg_redgrid_description = automatic Erlang node discovery via redispkg_redgrid_homepage = https://github.com/jkvor/redgridpkg_redgrid_fetch = gitpkg_redgrid_repo = https://github.com/jkvor/redgridpkg_redgrid_commit = masterPACKAGES += redopkg_redo_name = redopkg_redo_description = pipelined erlang redis clientpkg_redo_homepage = https://github.com/jkvor/redopkg_redo_fetch = gitpkg_redo_repo = https://github.com/jkvor/redopkg_redo_commit = masterPACKAGES += reload_mkpkg_reload_mk_name = reload_mkpkg_reload_mk_description = Live reload plugin for erlang.mk.pkg_reload_mk_homepage = https://github.com/bullno1/reload.mkpkg_reload_mk_fetch = gitpkg_reload_mk_repo = https://github.com/bullno1/reload.mkpkg_reload_mk_commit = masterPACKAGES += reltool_utilpkg_reltool_util_name = reltool_utilpkg_reltool_util_description = Erlang reltool utility functionality applicationpkg_reltool_util_homepage = https://github.com/okeuday/reltool_utilpkg_reltool_util_fetch = gitpkg_reltool_util_repo = https://github.com/okeuday/reltool_utilpkg_reltool_util_commit = masterPACKAGES += relxpkg_relx_name = relxpkg_relx_description = Sane, simple release creation for Erlangpkg_relx_homepage = https://github.com/erlware/relxpkg_relx_fetch = gitpkg_relx_repo = https://github.com/erlware/relxpkg_relx_commit = mainPACKAGES += resource_discoverypkg_resource_discovery_name = resource_discoverypkg_resource_discovery_description = An application used to dynamically discover resources present in an Erlang node cluster.pkg_resource_discovery_homepage = http://erlware.org/pkg_resource_discovery_fetch = gitpkg_resource_discovery_repo = https://github.com/erlware/resource_discoverypkg_resource_discovery_commit = masterPACKAGES += restcpkg_restc_name = restcpkg_restc_description = Erlang Rest Clientpkg_restc_homepage = https://github.com/kivra/restclientpkg_restc_fetch = gitpkg_restc_repo = https://github.com/kivra/restclientpkg_restc_commit = masterPACKAGES += rfc4627_jsonrpcpkg_rfc4627_jsonrpc_name = rfc4627_jsonrpcpkg_rfc4627_jsonrpc_description = Erlang RFC4627 (JSON) codec and JSON-RPC server implementation.pkg_rfc4627_jsonrpc_homepage = https://github.com/tonyg/erlang-rfc4627pkg_rfc4627_jsonrpc_fetch = gitpkg_rfc4627_jsonrpc_repo = https://github.com/tonyg/erlang-rfc4627pkg_rfc4627_jsonrpc_commit = masterPACKAGES += riak_corepkg_riak_core_name = riak_corepkg_riak_core_description = Distributed systems infrastructure used by Riak.pkg_riak_core_homepage = https://github.com/basho/riak_corepkg_riak_core_fetch = gitpkg_riak_core_repo = https://github.com/basho/riak_corepkg_riak_core_commit = developPACKAGES += riak_dtpkg_riak_dt_name = riak_dtpkg_riak_dt_description = Convergent replicated datatypes in Erlangpkg_riak_dt_homepage = https://github.com/basho/riak_dtpkg_riak_dt_fetch = gitpkg_riak_dt_repo = https://github.com/basho/riak_dtpkg_riak_dt_commit = masterPACKAGES += riak_ensemblepkg_riak_ensemble_name = riak_ensemblepkg_riak_ensemble_description = Multi-Paxos framework in Erlangpkg_riak_ensemble_homepage = https://github.com/basho/riak_ensemblepkg_riak_ensemble_fetch = gitpkg_riak_ensemble_repo = https://github.com/basho/riak_ensemblepkg_riak_ensemble_commit = developPACKAGES += riak_kvpkg_riak_kv_name = riak_kvpkg_riak_kv_description = Riak Key/Value Storepkg_riak_kv_homepage = https://github.com/basho/riak_kvpkg_riak_kv_fetch = gitpkg_riak_kv_repo = https://github.com/basho/riak_kvpkg_riak_kv_commit = developPACKAGES += riak_pipepkg_riak_pipe_name = riak_pipepkg_riak_pipe_description = Riak Pipelinespkg_riak_pipe_homepage = https://github.com/basho/riak_pipepkg_riak_pipe_fetch = gitpkg_riak_pipe_repo = https://github.com/basho/riak_pipepkg_riak_pipe_commit = developPACKAGES += riak_sysmonpkg_riak_sysmon_name = riak_sysmonpkg_riak_sysmon_description = Simple OTP app for managing Erlang VM system_monitor event messagespkg_riak_sysmon_homepage = https://github.com/basho/riak_sysmonpkg_riak_sysmon_fetch = gitpkg_riak_sysmon_repo = https://github.com/basho/riak_sysmonpkg_riak_sysmon_commit = masterPACKAGES += riakcpkg_riakc_name = riakcpkg_riakc_description = Erlang clients for Riak.pkg_riakc_homepage = https://github.com/basho/riak-erlang-clientpkg_riakc_fetch = gitpkg_riakc_repo = https://github.com/basho/riak-erlang-clientpkg_riakc_commit = masterPACKAGES += rlimitpkg_rlimit_name = rlimitpkg_rlimit_description = Magnus Klaar's rate limiter code from etorrentpkg_rlimit_homepage = https://github.com/jlouis/rlimitpkg_rlimit_fetch = gitpkg_rlimit_repo = https://github.com/jlouis/rlimitpkg_rlimit_commit = masterPACKAGES += rust_mkpkg_rust_mk_name = rust_mkpkg_rust_mk_description = Build Rust crates in an Erlang applicationpkg_rust_mk_homepage = https://github.com/goertzenator/rust.mkpkg_rust_mk_fetch = gitpkg_rust_mk_repo = https://github.com/goertzenator/rust.mkpkg_rust_mk_commit = masterPACKAGES += safetyvalvepkg_safetyvalve_name = safetyvalvepkg_safetyvalve_description = A safety valve for your erlang nodepkg_safetyvalve_homepage = https://github.com/jlouis/safetyvalvepkg_safetyvalve_fetch = gitpkg_safetyvalve_repo = https://github.com/jlouis/safetyvalvepkg_safetyvalve_commit = masterPACKAGES += seestarpkg_seestar_name = seestarpkg_seestar_description = The Erlang client for Cassandra 1.2+ binary protocolpkg_seestar_homepage = https://github.com/iamaleksey/seestarpkg_seestar_fetch = gitpkg_seestar_repo = https://github.com/iamaleksey/seestarpkg_seestar_commit = masterPACKAGES += setuppkg_setup_name = setuppkg_setup_description = Generic setup utility for Erlang-based systemspkg_setup_homepage = https://github.com/uwiger/setuppkg_setup_fetch = gitpkg_setup_repo = https://github.com/uwiger/setuppkg_setup_commit = masterPACKAGES += sextpkg_sext_name = sextpkg_sext_description = Sortable Erlang Term Serializationpkg_sext_homepage = https://github.com/uwiger/sextpkg_sext_fetch = gitpkg_sext_repo = https://github.com/uwiger/sextpkg_sext_commit = masterPACKAGES += sfmtpkg_sfmt_name = sfmtpkg_sfmt_description = SFMT pseudo random number generator for Erlang.pkg_sfmt_homepage = https://github.com/jj1bdx/sfmt-erlangpkg_sfmt_fetch = gitpkg_sfmt_repo = https://github.com/jj1bdx/sfmt-erlangpkg_sfmt_commit = masterPACKAGES += sgtepkg_sgte_name = sgtepkg_sgte_description = A simple Erlang Template Enginepkg_sgte_homepage = https://github.com/filippo/sgtepkg_sgte_fetch = gitpkg_sgte_repo = https://github.com/filippo/sgtepkg_sgte_commit = masterPACKAGES += sheriffpkg_sheriff_name = sheriffpkg_sheriff_description = Parse transform for type based validation.pkg_sheriff_homepage = http://ninenines.eupkg_sheriff_fetch = gitpkg_sheriff_repo = https://github.com/extend/sheriffpkg_sheriff_commit = masterPACKAGES += shotgunpkg_shotgun_name = shotgunpkg_shotgun_description = better than just a gunpkg_shotgun_homepage = https://github.com/inaka/shotgunpkg_shotgun_fetch = gitpkg_shotgun_repo = https://github.com/inaka/shotgunpkg_shotgun_commit = masterPACKAGES += sidejobpkg_sidejob_name = sidejobpkg_sidejob_description = Parallel worker and capacity limiting library for Erlangpkg_sidejob_homepage = https://github.com/basho/sidejobpkg_sidejob_fetch = gitpkg_sidejob_repo = https://github.com/basho/sidejobpkg_sidejob_commit = developPACKAGES += sievepkg_sieve_name = sievepkg_sieve_description = sieve is a simple TCP routing proxy (layer 7) in erlangpkg_sieve_homepage = https://github.com/benoitc/sievepkg_sieve_fetch = gitpkg_sieve_repo = https://github.com/benoitc/sievepkg_sieve_commit = masterPACKAGES += simhashpkg_simhash_name = simhashpkg_simhash_description = Simhashing for Erlang -- hashing algorithm to find near-duplicates in binary data.pkg_simhash_homepage = https://github.com/ferd/simhashpkg_simhash_fetch = gitpkg_simhash_repo = https://github.com/ferd/simhashpkg_simhash_commit = masterPACKAGES += simple_bridgepkg_simple_bridge_name = simple_bridgepkg_simple_bridge_description = A simple, standardized interface library to Erlang HTTP Servers.pkg_simple_bridge_homepage = https://github.com/nitrogen/simple_bridgepkg_simple_bridge_fetch = gitpkg_simple_bridge_repo = https://github.com/nitrogen/simple_bridgepkg_simple_bridge_commit = masterPACKAGES += simple_oauth2pkg_simple_oauth2_name = simple_oauth2pkg_simple_oauth2_description = Simple erlang OAuth2 client module for any http server framework (Google, Facebook, Yandex, Vkontakte are preconfigured)pkg_simple_oauth2_homepage = https://github.com/virtan/simple_oauth2pkg_simple_oauth2_fetch = gitpkg_simple_oauth2_repo = https://github.com/virtan/simple_oauth2pkg_simple_oauth2_commit = masterPACKAGES += skelpkg_skel_name = skelpkg_skel_description = A Streaming Process-based Skeleton Library for Erlangpkg_skel_homepage = https://github.com/ParaPhrase/skelpkg_skel_fetch = gitpkg_skel_repo = https://github.com/ParaPhrase/skelpkg_skel_commit = masterPACKAGES += slackpkg_slack_name = slackpkg_slack_description = Minimal slack notification OTP library.pkg_slack_homepage = https://github.com/DonBranson/slackpkg_slack_fetch = gitpkg_slack_repo = https://github.com/DonBranson/slack.gitpkg_slack_commit = masterPACKAGES += snappyerpkg_snappyer_name = snappyerpkg_snappyer_description = Snappy as nif for Erlangpkg_snappyer_homepage = https://github.com/zmstone/snappyerpkg_snappyer_fetch = gitpkg_snappyer_repo = https://github.com/zmstone/snappyer.gitpkg_snappyer_commit = masterPACKAGES += socialpkg_social_name = socialpkg_social_description = Cowboy handler for social login via OAuth2 providerspkg_social_homepage = https://github.com/dvv/socialpkg_social_fetch = gitpkg_social_repo = https://github.com/dvv/socialpkg_social_commit = masterPACKAGES += sqerlpkg_sqerl_name = sqerlpkg_sqerl_description = An Erlang-flavoured SQL DSLpkg_sqerl_homepage = https://github.com/hairyhum/sqerlpkg_sqerl_fetch = gitpkg_sqerl_repo = https://github.com/hairyhum/sqerlpkg_sqerl_commit = masterPACKAGES += srlypkg_srly_name = srlypkg_srly_description = Native Erlang Unix serial interfacepkg_srly_homepage = https://github.com/msantos/srlypkg_srly_fetch = gitpkg_srly_repo = https://github.com/msantos/srlypkg_srly_commit = masterPACKAGES += sshrpcpkg_sshrpc_name = sshrpcpkg_sshrpc_description = Erlang SSH RPC module (experimental)pkg_sshrpc_homepage = https://github.com/jj1bdx/sshrpcpkg_sshrpc_fetch = gitpkg_sshrpc_repo = https://github.com/jj1bdx/sshrpcpkg_sshrpc_commit = masterPACKAGES += stablepkg_stable_name = stablepkg_stable_description = Library of assorted helpers for Cowboy web server.pkg_stable_homepage = https://github.com/dvv/stablepkg_stable_fetch = gitpkg_stable_repo = https://github.com/dvv/stablepkg_stable_commit = masterPACKAGES += stateboxpkg_statebox_name = stateboxpkg_statebox_description = Erlang state monad with merge/conflict-resolution capabilities. Useful for Riak.pkg_statebox_homepage = https://github.com/mochi/stateboxpkg_statebox_fetch = gitpkg_statebox_repo = https://github.com/mochi/stateboxpkg_statebox_commit = masterPACKAGES += statmanpkg_statman_name = statmanpkg_statman_description = Efficiently collect massive volumes of metrics inside the Erlang VMpkg_statman_homepage = https://github.com/knutin/statmanpkg_statman_fetch = gitpkg_statman_repo = https://github.com/knutin/statmanpkg_statman_commit = masterPACKAGES += statsderlpkg_statsderl_name = statsderlpkg_statsderl_description = StatsD client (erlang)pkg_statsderl_homepage = https://github.com/lpgauth/statsderlpkg_statsderl_fetch = gitpkg_statsderl_repo = https://github.com/lpgauth/statsderlpkg_statsderl_commit = masterPACKAGES += stdinout_poolpkg_stdinout_pool_name = stdinout_poolpkg_stdinout_pool_description = stdinout_pool : stuff goes in, stuff goes out. there's never any miscommunication.pkg_stdinout_pool_homepage = https://github.com/mattsta/erlang-stdinout-poolpkg_stdinout_pool_fetch = gitpkg_stdinout_pool_repo = https://github.com/mattsta/erlang-stdinout-poolpkg_stdinout_pool_commit = masterPACKAGES += stockdbpkg_stockdb_name = stockdbpkg_stockdb_description = Database for storing Stock Exchange quotes in erlangpkg_stockdb_homepage = https://github.com/maxlapshin/stockdbpkg_stockdb_fetch = gitpkg_stockdb_repo = https://github.com/maxlapshin/stockdbpkg_stockdb_commit = masterPACKAGES += subprocpkg_subproc_name = subprocpkg_subproc_description = unix subprocess manager with {active,once|false} modespkg_subproc_homepage = http://dozzie.jarowit.net/trac/wiki/subprocpkg_subproc_fetch = gitpkg_subproc_repo = https://github.com/dozzie/subprocpkg_subproc_commit = v0.1.0PACKAGES += supervisor3pkg_supervisor3_name = supervisor3pkg_supervisor3_description = OTP supervisor with additional strategiespkg_supervisor3_homepage = https://github.com/klarna/supervisor3pkg_supervisor3_fetch = gitpkg_supervisor3_repo = https://github.com/klarna/supervisor3.gitpkg_supervisor3_commit = masterPACKAGES += swabpkg_swab_name = swabpkg_swab_description = General purpose buffer handling modulepkg_swab_homepage = https://github.com/crownedgrouse/swabpkg_swab_fetch = gitpkg_swab_repo = https://github.com/crownedgrouse/swabpkg_swab_commit = masterPACKAGES += swarmpkg_swarm_name = swarmpkg_swarm_description = Fast and simple acceptor pool for Erlangpkg_swarm_homepage = https://github.com/jeremey/swarmpkg_swarm_fetch = gitpkg_swarm_repo = https://github.com/jeremey/swarmpkg_swarm_commit = masterPACKAGES += switchboardpkg_switchboard_name = switchboardpkg_switchboard_description = A framework for processing email using worker plugins.pkg_switchboard_homepage = https://github.com/thusfresh/switchboardpkg_switchboard_fetch = gitpkg_switchboard_repo = https://github.com/thusfresh/switchboardpkg_switchboard_commit = masterPACKAGES += synpkg_syn_name = synpkg_syn_description = A global Process Registry and Process Group manager for Erlang.pkg_syn_homepage = https://github.com/ostinelli/synpkg_syn_fetch = gitpkg_syn_repo = https://github.com/ostinelli/synpkg_syn_commit = masterPACKAGES += syncpkg_sync_name = syncpkg_sync_description = On-the-fly recompiling and reloading in Erlang.pkg_sync_homepage = https://github.com/rustyio/syncpkg_sync_fetch = gitpkg_sync_repo = https://github.com/rustyio/syncpkg_sync_commit = masterPACKAGES += syntaxerlpkg_syntaxerl_name = syntaxerlpkg_syntaxerl_description = Syntax checker for Erlangpkg_syntaxerl_homepage = https://github.com/ten0s/syntaxerlpkg_syntaxerl_fetch = gitpkg_syntaxerl_repo = https://github.com/ten0s/syntaxerlpkg_syntaxerl_commit = masterPACKAGES += syslogpkg_syslog_name = syslogpkg_syslog_description = Erlang port driver for interacting with syslog via syslog(3)pkg_syslog_homepage = https://github.com/Vagabond/erlang-syslogpkg_syslog_fetch = gitpkg_syslog_repo = https://github.com/Vagabond/erlang-syslogpkg_syslog_commit = masterPACKAGES += taskforcepkg_taskforce_name = taskforcepkg_taskforce_description = Erlang worker pools for controlled parallelisation of arbitrary tasks.pkg_taskforce_homepage = https://github.com/g-andrade/taskforcepkg_taskforce_fetch = gitpkg_taskforce_repo = https://github.com/g-andrade/taskforcepkg_taskforce_commit = masterPACKAGES += tddreloaderpkg_tddreloader_name = tddreloaderpkg_tddreloader_description = Shell utility for recompiling, reloading, and testing code as it changespkg_tddreloader_homepage = https://github.com/version2beta/tddreloaderpkg_tddreloader_fetch = gitpkg_tddreloader_repo = https://github.com/version2beta/tddreloaderpkg_tddreloader_commit = masterPACKAGES += tempopkg_tempo_name = tempopkg_tempo_description = NIF-based date and time parsing and formatting for Erlang.pkg_tempo_homepage = https://github.com/selectel/tempopkg_tempo_fetch = gitpkg_tempo_repo = https://github.com/selectel/tempopkg_tempo_commit = masterPACKAGES += tinymqpkg_tinymq_name = tinymqpkg_tinymq_description = TinyMQ - a diminutive, in-memory message queuepkg_tinymq_homepage = https://github.com/ChicagoBoss/tinymqpkg_tinymq_fetch = gitpkg_tinymq_repo = https://github.com/ChicagoBoss/tinymqpkg_tinymq_commit = masterPACKAGES += tinymtpkg_tinymt_name = tinymtpkg_tinymt_description = TinyMT pseudo random number generator for Erlang.pkg_tinymt_homepage = https://github.com/jj1bdx/tinymt-erlangpkg_tinymt_fetch = gitpkg_tinymt_repo = https://github.com/jj1bdx/tinymt-erlangpkg_tinymt_commit = masterPACKAGES += tirerlpkg_tirerl_name = tirerlpkg_tirerl_description = Erlang interface to Elastic Searchpkg_tirerl_homepage = https://github.com/inaka/tirerlpkg_tirerl_fetch = gitpkg_tirerl_repo = https://github.com/inaka/tirerlpkg_tirerl_commit = masterPACKAGES += tomlpkg_toml_name = tomlpkg_toml_description = TOML (0.4.0) config parserpkg_toml_homepage = http://dozzie.jarowit.net/trac/wiki/TOMLpkg_toml_fetch = gitpkg_toml_repo = https://github.com/dozzie/tomlpkg_toml_commit = v0.2.0PACKAGES += traffic_toolspkg_traffic_tools_name = traffic_toolspkg_traffic_tools_description = Simple traffic limiting librarypkg_traffic_tools_homepage = https://github.com/systra/traffic_toolspkg_traffic_tools_fetch = gitpkg_traffic_tools_repo = https://github.com/systra/traffic_toolspkg_traffic_tools_commit = masterPACKAGES += trailspkg_trails_name = trailspkg_trails_description = A couple of improvements over Cowboy Routespkg_trails_homepage = http://inaka.github.io/cowboy-trails/pkg_trails_fetch = gitpkg_trails_repo = https://github.com/inaka/cowboy-trailspkg_trails_commit = masterPACKAGES += tranepkg_trane_name = tranepkg_trane_description = SAX style broken HTML parser in Erlangpkg_trane_homepage = https://github.com/massemanet/tranepkg_trane_fetch = gitpkg_trane_repo = https://github.com/massemanet/tranepkg_trane_commit = masterPACKAGES += triepkg_trie_name = triepkg_trie_description = Erlang Trie Implementationpkg_trie_homepage = https://github.com/okeuday/triepkg_trie_fetch = gitpkg_trie_repo = https://github.com/okeuday/triepkg_trie_commit = masterPACKAGES += triqpkg_triq_name = triqpkg_triq_description = Trifork QuickCheckpkg_triq_homepage = https://triq.gitlab.iopkg_triq_fetch = gitpkg_triq_repo = https://gitlab.com/triq/triq.gitpkg_triq_commit = masterPACKAGES += tunctlpkg_tunctl_name = tunctlpkg_tunctl_description = Erlang TUN/TAP interfacepkg_tunctl_homepage = https://github.com/msantos/tunctlpkg_tunctl_fetch = gitpkg_tunctl_repo = https://github.com/msantos/tunctlpkg_tunctl_commit = masterPACKAGES += unicornpkg_unicorn_name = unicornpkg_unicorn_description = Generic configuration serverpkg_unicorn_homepage = https://github.com/shizzard/unicornpkg_unicorn_fetch = gitpkg_unicorn_repo = https://github.com/shizzard/unicornpkg_unicorn_commit = masterPACKAGES += unsplitpkg_unsplit_name = unsplitpkg_unsplit_description = Resolves conflicts in Mnesia after network splitspkg_unsplit_homepage = https://github.com/uwiger/unsplitpkg_unsplit_fetch = gitpkg_unsplit_repo = https://github.com/uwiger/unsplitpkg_unsplit_commit = masterPACKAGES += uuidpkg_uuid_name = uuidpkg_uuid_description = Erlang UUID Implementationpkg_uuid_homepage = https://github.com/okeuday/uuidpkg_uuid_fetch = gitpkg_uuid_repo = https://github.com/okeuday/uuidpkg_uuid_commit = masterPACKAGES += uxpkg_ux_name = uxpkg_ux_description = Unicode eXtention for Erlang (Strings, Collation)pkg_ux_homepage = https://github.com/erlang-unicode/uxpkg_ux_fetch = gitpkg_ux_repo = https://github.com/erlang-unicode/uxpkg_ux_commit = masterPACKAGES += verxpkg_verx_name = verxpkg_verx_description = Erlang implementation of the libvirtd remote protocolpkg_verx_homepage = https://github.com/msantos/verxpkg_verx_fetch = gitpkg_verx_repo = https://github.com/msantos/verxpkg_verx_commit = masterPACKAGES += vmq_bridgepkg_vmq_bridge_name = vmq_bridgepkg_vmq_bridge_description = Component of VerneMQ: A distributed MQTT message brokerpkg_vmq_bridge_homepage = https://verne.mq/pkg_vmq_bridge_fetch = gitpkg_vmq_bridge_repo = https://github.com/erlio/vmq_bridgepkg_vmq_bridge_commit = masterPACKAGES += vmstatspkg_vmstats_name = vmstatspkg_vmstats_description = tiny Erlang app that works in conjunction with statsderl in order to generate information on the Erlang VM for graphite logs.pkg_vmstats_homepage = https://github.com/ferd/vmstatspkg_vmstats_fetch = gitpkg_vmstats_repo = https://github.com/ferd/vmstatspkg_vmstats_commit = masterPACKAGES += walruspkg_walrus_name = walruspkg_walrus_description = Walrus - Mustache-like Templatingpkg_walrus_homepage = https://github.com/devinus/walruspkg_walrus_fetch = gitpkg_walrus_repo = https://github.com/devinus/walruspkg_walrus_commit = masterPACKAGES += webmachinepkg_webmachine_name = webmachinepkg_webmachine_description = A REST-based system for building web applications.pkg_webmachine_homepage = https://github.com/basho/webmachinepkg_webmachine_fetch = gitpkg_webmachine_repo = https://github.com/basho/webmachinepkg_webmachine_commit = masterPACKAGES += websocket_clientpkg_websocket_client_name = websocket_clientpkg_websocket_client_description = Erlang websocket client (ws and wss supported)pkg_websocket_client_homepage = https://github.com/jeremyong/websocket_clientpkg_websocket_client_fetch = gitpkg_websocket_client_repo = https://github.com/jeremyong/websocket_clientpkg_websocket_client_commit = masterPACKAGES += worker_poolpkg_worker_pool_name = worker_poolpkg_worker_pool_description = a simple erlang worker poolpkg_worker_pool_homepage = https://github.com/inaka/worker_poolpkg_worker_pool_fetch = gitpkg_worker_pool_repo = https://github.com/inaka/worker_poolpkg_worker_pool_commit = mainPACKAGES += wranglerpkg_wrangler_name = wranglerpkg_wrangler_description = Import of the Wrangler svn repository.pkg_wrangler_homepage = http://www.cs.kent.ac.uk/projects/wrangler/Home.htmlpkg_wrangler_fetch = gitpkg_wrangler_repo = https://github.com/RefactoringTools/wranglerpkg_wrangler_commit = masterPACKAGES += wsockpkg_wsock_name = wsockpkg_wsock_description = Erlang library to build WebSocket clients and serverspkg_wsock_homepage = https://github.com/madtrick/wsockpkg_wsock_fetch = gitpkg_wsock_repo = https://github.com/madtrick/wsockpkg_wsock_commit = masterPACKAGES += xhttpcpkg_xhttpc_name = xhttpcpkg_xhttpc_description = Extensible HTTP Client for Erlangpkg_xhttpc_homepage = https://github.com/seriyps/xhttpcpkg_xhttpc_fetch = gitpkg_xhttpc_repo = https://github.com/seriyps/xhttpcpkg_xhttpc_commit = masterPACKAGES += xref_runnerpkg_xref_runner_name = xref_runnerpkg_xref_runner_description = Erlang Xref Runner (inspired in rebar xref)pkg_xref_runner_homepage = https://github.com/inaka/xref_runnerpkg_xref_runner_fetch = gitpkg_xref_runner_repo = https://github.com/inaka/xref_runnerpkg_xref_runner_commit = masterPACKAGES += yamerlpkg_yamerl_name = yamerlpkg_yamerl_description = YAML 1.2 parser in pure Erlangpkg_yamerl_homepage = https://github.com/yakaz/yamerlpkg_yamerl_fetch = gitpkg_yamerl_repo = https://github.com/yakaz/yamerlpkg_yamerl_commit = masterPACKAGES += yamlerpkg_yamler_name = yamlerpkg_yamler_description = libyaml-based yaml loader for Erlangpkg_yamler_homepage = https://github.com/goertzenator/yamlerpkg_yamler_fetch = gitpkg_yamler_repo = https://github.com/goertzenator/yamlerpkg_yamler_commit = masterPACKAGES += yawspkg_yaws_name = yawspkg_yaws_description = Yaws webserverpkg_yaws_homepage = http://yaws.hyber.orgpkg_yaws_fetch = gitpkg_yaws_repo = https://github.com/klacke/yawspkg_yaws_commit = masterPACKAGES += zipperspkg_zippers_name = zipperspkg_zippers_description = A library for functional zipper data structures in Erlang. Read more on zipperspkg_zippers_homepage = https://github.com/ferd/zipperspkg_zippers_fetch = gitpkg_zippers_repo = https://github.com/ferd/zipperspkg_zippers_commit = masterPACKAGES += zlistspkg_zlists_name = zlistspkg_zlists_description = Erlang lazy lists library.pkg_zlists_homepage = https://github.com/vjache/erlang-zlistspkg_zlists_fetch = gitpkg_zlists_repo = https://github.com/vjache/erlang-zlistspkg_zlists_commit = masterPACKAGES += zucchinipkg_zucchini_name = zucchinipkg_zucchini_description = An Erlang INI parserpkg_zucchini_homepage = https://github.com/devinus/zucchinipkg_zucchini_fetch = gitpkg_zucchini_repo = https://github.com/devinus/zucchinipkg_zucchini_commit = master# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: searchdefine pkg_print$(verbose) printf "%s\n" \$(if $(call core_eq,$(1),$(pkg_$(1)_name)),,"Pkg name: $(1)") \"App name: $(pkg_$(1)_name)" \"Description: $(pkg_$(1)_description)" \"Home page: $(pkg_$(1)_homepage)" \"Fetch with: $(pkg_$(1)_fetch)" \"Repository: $(pkg_$(1)_repo)" \"Commit: $(pkg_$(1)_commit)" \""endefsearch:ifdef q$(foreach p,$(PACKAGES), \$(if $(findstring $(call core_lc,$(q)),$(call core_lc,$(pkg_$(p)_name) $(pkg_$(p)_description))), \$(call pkg_print,$(p))))else$(foreach p,$(PACKAGES),$(call pkg_print,$(p)))endif# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: distclean-deps clean-tmp-deps.log# Configuration.ifdef OTP_DEPS$(warning The variable OTP_DEPS is deprecated in favor of LOCAL_DEPS.)endifIGNORE_DEPS ?=export IGNORE_DEPSAPPS_DIR ?= $(CURDIR)/appsexport APPS_DIRDEPS_DIR ?= $(CURDIR)/depsexport DEPS_DIRREBAR_DEPS_DIR = $(DEPS_DIR)export REBAR_DEPS_DIRREBAR3_GIT ?= https://github.com/erlang/rebar3REBAR3_COMMIT ?= 3f563feaf1091a1980241adefa83a32dd2eebf7c # 3.20.0CACHE_DEPS ?= 0CACHE_DIR ?= $(if $(XDG_CACHE_HOME),$(XDG_CACHE_HOME),$(HOME)/.cache)/erlang.mkexport CACHE_DIR# External "early" plugins (see core/plugins.mk for regular plugins).# They both use the core_dep_plugin macro.define core_dep_pluginifeq ($(2),$(PROJECT))-include $$(patsubst $(PROJECT)/%,%,$(1))else-include $(DEPS_DIR)/$(1)$(DEPS_DIR)/$(1): $(DEPS_DIR)/$(2) ;endifendefDEP_EARLY_PLUGINS ?=$(foreach p,$(DEP_EARLY_PLUGINS),\$(eval $(if $(findstring /,$p),\$(call core_dep_plugin,$p,$(firstword $(subst /, ,$p))),\$(call core_dep_plugin,$p/early-plugins.mk,$p))))# Query functions.query_fetch_method = $(if $(dep_$(1)),$(call _qfm_dep,$(word 1,$(dep_$(1)))),$(call _qfm_pkg,$(1)))_qfm_dep = $(if $(dep_fetch_$(1)),$(1),$(if $(IS_DEP),legacy,fail))_qfm_pkg = $(if $(pkg_$(1)_fetch),$(pkg_$(1)_fetch),fail)query_name = $(if $(dep_$(1)),$(1),$(if $(pkg_$(1)_name),$(pkg_$(1)_name),$(1)))query_repo = $(call _qr,$(1),$(call query_fetch_method,$(1)))_qr = $(if $(query_repo_$(2)),$(call query_repo_$(2),$(1)),$(call dep_repo,$(1)))query_repo_default = $(if $(dep_$(1)),$(word 2,$(dep_$(1))),$(pkg_$(1)_repo))query_repo_git = $(patsubst git://github.com/%,https://github.com/%,$(call query_repo_default,$(1)))query_repo_git-subfolder = $(call query_repo_git,$(1))query_repo_git-submodule = -query_repo_hg = $(call query_repo_default,$(1))query_repo_svn = $(call query_repo_default,$(1))query_repo_cp = $(call query_repo_default,$(1))query_repo_ln = $(call query_repo_default,$(1))query_repo_hex = https://hex.pm/packages/$(if $(word 3,$(dep_$(1))),$(word 3,$(dep_$(1))),$(1))query_repo_fail = -query_repo_legacy = -query_version = $(call _qv,$(1),$(call query_fetch_method,$(1)))_qv = $(if $(query_version_$(2)),$(call query_version_$(2),$(1)),$(call dep_commit,$(1)))query_version_default = $(if $(dep_$(1)_commit),$(dep_$(1)_commit),$(if $(dep_$(1)),$(word 3,$(dep_$(1))),$(pkg_$(1)_commit)))query_version_git = $(call query_version_default,$(1))query_version_git-subfolder = $(call query_version_git,$(1))query_version_git-submodule = -query_version_hg = $(call query_version_default,$(1))query_version_svn = -query_version_cp = -query_version_ln = -query_version_hex = $(if $(dep_$(1)_commit),$(dep_$(1)_commit),$(if $(dep_$(1)),$(word 2,$(dep_$(1))),$(pkg_$(1)_commit)))query_version_fail = -query_version_legacy = -query_extra = $(call _qe,$(1),$(call query_fetch_method,$(1)))_qe = $(if $(query_extra_$(2)),$(call query_extra_$(2),$(1)),-)query_extra_git = -query_extra_git-subfolder = $(if $(dep_$(1)),subfolder=$(word 4,$(dep_$(1))),-)query_extra_git-submodule = -query_extra_hg = -query_extra_svn = -query_extra_cp = -query_extra_ln = -query_extra_hex = $(if $(dep_$(1)),package-name=$(word 3,$(dep_$(1))),-)query_extra_fail = -query_extra_legacy = -query_absolute_path = $(addprefix $(DEPS_DIR)/,$(call query_name,$(1)))# Deprecated legacy query functions.dep_fetch = $(call query_fetch_method,$(1))dep_name = $(call query_name,$(1))dep_repo = $(call query_repo_git,$(1))dep_commit = $(if $(dep_$(1)_commit),$(dep_$(1)_commit),$(if $(dep_$(1)),$(if $(filter hex,$(word 1,$(dep_$(1)))),$(word 2,$(dep_$(1))),$(word 3,$(dep_$(1)))),$(pkg_$(1)_commit)))LOCAL_DEPS_DIRS = $(foreach a,$(LOCAL_DEPS),$(if $(wildcard $(APPS_DIR)/$(a)),$(APPS_DIR)/$(a)))ALL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(foreach dep,$(filter-out $(IGNORE_DEPS),$(BUILD_DEPS) $(DEPS)),$(call dep_name,$(dep))))# When we are calling an app directly we don't want to include it here# otherwise it'll be treated both as an apps and a top-level project.ALL_APPS_DIRS = $(if $(wildcard $(APPS_DIR)/),$(filter-out $(APPS_DIR),$(shell find $(APPS_DIR) -maxdepth 1 -type d)))ifdef ROOT_DIRifndef IS_APPALL_APPS_DIRS := $(filter-out $(APPS_DIR)/$(notdir $(CURDIR)),$(ALL_APPS_DIRS))endifendififeq ($(filter $(APPS_DIR) $(DEPS_DIR),$(subst :, ,$(ERL_LIBS))),)ifeq ($(ERL_LIBS),)ERL_LIBS = $(APPS_DIR):$(DEPS_DIR)elseERL_LIBS := $(ERL_LIBS):$(APPS_DIR):$(DEPS_DIR)endifendifexport ERL_LIBSexport NO_AUTOPATCH# Verbosity.dep_verbose_0 = @echo " DEP $1 ($(call dep_commit,$1))";dep_verbose_2 = set -x;dep_verbose = $(dep_verbose_$(V))# Optimization: don't recompile deps unless truly necessary.ifndef IS_DEPifneq ($(MAKELEVEL),0)$(shell rm -f ebin/dep_built)endifendif# Core targets.ALL_APPS_DIRS_TO_BUILD = $(if $(LOCAL_DEPS_DIRS)$(IS_APP),$(LOCAL_DEPS_DIRS),$(ALL_APPS_DIRS))apps:: $(ALL_APPS_DIRS) clean-tmp-deps.log | $(ERLANG_MK_TMP)# Create ebin directory for all apps to make sure Erlang recognizes them# as proper OTP applications when using -include_lib. This is a temporary# fix, a proper fix would be to compile apps/* in the right order.ifndef IS_APPifneq ($(ALL_APPS_DIRS),)$(verbose) set -e; for dep in $(ALL_APPS_DIRS) ; do \mkdir -p $$dep/ebin; \doneendifendif# At the toplevel: if LOCAL_DEPS is defined with at least one local app, only# compile that list of apps. Otherwise, compile everything.# Within an app: compile all LOCAL_DEPS that are (uncompiled) local apps.ifneq ($(ALL_APPS_DIRS_TO_BUILD),)$(verbose) set -e; for dep in $(ALL_APPS_DIRS_TO_BUILD); do \if grep -qs ^$$dep$$ $(ERLANG_MK_TMP)/apps.log; then \:; \else \echo $$dep >> $(ERLANG_MK_TMP)/apps.log; \$(MAKE) -C $$dep $(if $(IS_TEST),test-build-app) IS_APP=1; \fi \doneendifclean-tmp-deps.log:ifeq ($(IS_APP)$(IS_DEP),)$(verbose) rm -f $(ERLANG_MK_TMP)/apps.log $(ERLANG_MK_TMP)/deps.logendif# Erlang.mk does not rebuild dependencies after they were compiled# once. If a developer is working on the top-level project and some# dependencies at the same time, he may want to change this behavior.# There are two solutions:# 1. Set `FULL=1` so that all dependencies are visited and# recursively recompiled if necessary.# 2. Set `FORCE_REBUILD=` to the specific list of dependencies that# should be recompiled (instead of the whole set).FORCE_REBUILD ?=ifeq ($(origin FULL),undefined)ifneq ($(strip $(force_rebuild_dep)$(FORCE_REBUILD)),)define force_rebuild_depecho "$(FORCE_REBUILD)" | grep -qw "$$(basename "$1")"endefendifendififneq ($(SKIP_DEPS),)deps::elsedeps:: $(ALL_DEPS_DIRS) apps clean-tmp-deps.log | $(ERLANG_MK_TMP)ifneq ($(ALL_DEPS_DIRS),)$(verbose) set -e; for dep in $(ALL_DEPS_DIRS); do \if grep -qs ^$$dep$$ $(ERLANG_MK_TMP)/deps.log; then \:; \else \echo $$dep >> $(ERLANG_MK_TMP)/deps.log; \if [ -z "$(strip $(FULL))" ] $(if $(force_rebuild_dep),&& ! ($(call force_rebuild_dep,$$dep)),) && [ ! -L $$dep ] && [ -f $$dep/ebin/dep_built ]; then \:; \elif [ "$$dep" = "$(DEPS_DIR)/hut" -a "$(HUT_PATCH)" ]; then \$(MAKE) -C $$dep app IS_DEP=1; \if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \elif [ -f $$dep/GNUmakefile ] || [ -f $$dep/makefile ] || [ -f $$dep/Makefile ]; then \$(MAKE) -C $$dep IS_DEP=1; \if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \else \echo "Error: No Makefile to build dependency $$dep." >&2; \exit 2; \fi \fi \doneendifendif# Deps related targets.# @todo rename GNUmakefile and makefile into Makefile first, if they exist# While Makefile file could be GNUmakefile or makefile,# in practice only Makefile is needed so far.define dep_autopatchif [ -f $(DEPS_DIR)/$(1)/erlang.mk ]; then \rm -rf $(DEPS_DIR)/$1/ebin/; \$(call erlang,$(call dep_autopatch_appsrc.erl,$(1))); \$(call dep_autopatch_erlang_mk,$(1)); \elif [ -f $(DEPS_DIR)/$(1)/Makefile ]; then \if [ -f $(DEPS_DIR)/$1/rebar.lock ]; then \$(call dep_autopatch2,$1); \elif [ 0 != `grep -c "include ../\w*\.mk" $(DEPS_DIR)/$(1)/Makefile` ]; then \$(call dep_autopatch2,$(1)); \elif [ 0 != `grep -ci "^[^#].*rebar" $(DEPS_DIR)/$(1)/Makefile` ]; then \$(call dep_autopatch2,$(1)); \elif [ -n "`find $(DEPS_DIR)/$(1)/ -type f -name \*.mk -not -name erlang.mk -exec grep -i "^[^#].*rebar" '{}' \;`" ]; then \$(call dep_autopatch2,$(1)); \fi \else \if [ ! -d $(DEPS_DIR)/$(1)/src/ ]; then \$(call dep_autopatch_noop,$(1)); \else \$(call dep_autopatch2,$(1)); \fi \fiendefdefine dep_autopatch2! test -f $(DEPS_DIR)/$1/ebin/$1.app || \mv -n $(DEPS_DIR)/$1/ebin/$1.app $(DEPS_DIR)/$1/src/$1.app.src; \rm -f $(DEPS_DIR)/$1/ebin/$1.app; \if [ -f $(DEPS_DIR)/$1/src/$1.app.src.script ]; then \$(call erlang,$(call dep_autopatch_appsrc_script.erl,$(1))); \fi; \$(call erlang,$(call dep_autopatch_appsrc.erl,$(1))); \if [ -f $(DEPS_DIR)/$(1)/rebar -o -f $(DEPS_DIR)/$(1)/rebar.config -o -f $(DEPS_DIR)/$(1)/rebar.config.script -o -f $(DEPS_DIR)/$1/rebar.lock ]; then \$(call dep_autopatch_fetch_rebar); \$(call dep_autopatch_rebar,$(1)); \else \$(call dep_autopatch_gen,$(1)); \fiendefdefine dep_autopatch_noopprintf "noop:\n" > $(DEPS_DIR)/$(1)/Makefileendef# Replace "include erlang.mk" with a line that will load the parent Erlang.mk# if given. Do it for all 3 possible Makefile file names.ifeq ($(NO_AUTOPATCH_ERLANG_MK),)define dep_autopatch_erlang_mkfor f in Makefile makefile GNUmakefile; do \if [ -f $(DEPS_DIR)/$1/$$f ]; then \sed -i.bak s/'include *erlang.mk'/'include $$(if $$(ERLANG_MK_FILENAME),$$(ERLANG_MK_FILENAME),erlang.mk)'/ $(DEPS_DIR)/$1/$$f; \fi \doneendefelsedefine dep_autopatch_erlang_mk:endefendifdefine dep_autopatch_genprintf "%s\n" \"ERLC_OPTS = +debug_info" \"include ../../erlang.mk" > $(DEPS_DIR)/$(1)/Makefileendef# We use flock/lockf when available to avoid concurrency issues.define dep_autopatch_fetch_rebarif command -v flock >/dev/null; then \flock $(ERLANG_MK_TMP)/rebar.lock sh -c "$(call dep_autopatch_fetch_rebar2)"; \elif command -v lockf >/dev/null; then \lockf $(ERLANG_MK_TMP)/rebar.lock sh -c "$(call dep_autopatch_fetch_rebar2)"; \else \$(call dep_autopatch_fetch_rebar2); \fiendefdefine dep_autopatch_fetch_rebar2if [ ! -d $(ERLANG_MK_TMP)/rebar3 ]; then \git clone -q -n -- $(REBAR3_GIT) $(ERLANG_MK_TMP)/rebar3; \cd $(ERLANG_MK_TMP)/rebar3; \git checkout -q $(REBAR3_COMMIT); \./bootstrap; \cd -; \fiendefdefine dep_autopatch_rebarif [ -f $(DEPS_DIR)/$(1)/Makefile ]; then \mv $(DEPS_DIR)/$(1)/Makefile $(DEPS_DIR)/$(1)/Makefile.orig.mk; \fi; \$(call erlang,$(call dep_autopatch_rebar.erl,$(1))); \rm -f $(DEPS_DIR)/$(1)/ebin/$(1).appendefdefine dep_autopatch_rebar.erlapplication:load(rebar),application:set_env(rebar, log_level, debug),{module, rebar3} = c:l(rebar3),Conf1 = case file:consult("$(call core_native_path,$(DEPS_DIR)/$1/rebar.config)") of{ok, Conf0} -> Conf0;_ -> []end,{Conf, OsEnv} = fun() ->case filelib:is_file("$(call core_native_path,$(DEPS_DIR)/$1/rebar.config.script)") offalse -> {Conf1, []};true ->Bindings0 = erl_eval:new_bindings(),Bindings1 = erl_eval:add_binding('CONFIG', Conf1, Bindings0),Bindings = erl_eval:add_binding('SCRIPT', "$(call core_native_path,$(DEPS_DIR)/$1/rebar.config.script)", Bindings1),Before = os:getenv(),{ok, Conf2} = file:script("$(call core_native_path,$(DEPS_DIR)/$1/rebar.config.script)", Bindings),{Conf2, lists:foldl(fun(E, Acc) -> lists:delete(E, Acc) end, os:getenv(), Before)}endend(),Write = fun (Text) ->file:write_file("$(call core_native_path,$(DEPS_DIR)/$1/Makefile)", Text, [append])end,Escape = fun (Text) ->re:replace(Text, "\\\\$$", "\$$$$", [global, {return, list}])end,Write("IGNORE_DEPS += edown eper eunit_formatters meck node_package ""rebar_lock_deps_plugin rebar_vsn_plugin reltool_util\n"),Write("C_SRC_DIR = /path/do/not/exist\n"),Write("C_SRC_TYPE = rebar\n"),Write("DRV_CFLAGS = -fPIC\nexport DRV_CFLAGS\n"),Write(["ERLANG_ARCH = ", rebar_utils:wordsize(), "\nexport ERLANG_ARCH\n"]),ToList = fun(V) when is_atom(V) -> atom_to_list(V);(V) when is_list(V) -> "'\\"" ++ V ++ "\\"'"end,fun() ->Write("ERLC_OPTS = +debug_info\n"),case lists:keyfind(erl_opts, 1, Conf) offalse -> ok;{_, ErlOpts} ->lists:foreach(fun({d, D}) ->Write("ERLC_OPTS += -D" ++ ToList(D) ++ "=1\n");({d, DKey, DVal}) ->Write("ERLC_OPTS += -D" ++ ToList(DKey) ++ "=" ++ ToList(DVal) ++ "\n");({i, I}) ->Write(["ERLC_OPTS += -I ", I, "\n"]);({platform_define, Regex, D}) ->case rebar_utils:is_arch(Regex) oftrue -> Write("ERLC_OPTS += -D" ++ ToList(D) ++ "=1\n");false -> okend;({parse_transform, PT}) ->Write("ERLC_OPTS += +'{parse_transform, " ++ ToList(PT) ++ "}'\n");(_) -> okend, ErlOpts)end,Write("\n")end(),GetHexVsn2 = fun(N, NP) ->case file:consult("$(call core_native_path,$(DEPS_DIR)/$1/rebar.lock)") of{ok, Lock} ->io:format("~p~n", [Lock]),LockPkgs = case lists:keyfind("1.2.0", 1, Lock) of{_, LP} ->LP;_ ->case lists:keyfind("1.1.0", 1, Lock) of{_, LP} ->LP;_ ->falseendend,ifis_list(LockPkgs) ->io:format("~p~n", [LockPkgs]),case lists:keyfind(atom_to_binary(N, latin1), 1, LockPkgs) of{_, {pkg, _, Vsn}, _} ->io:format("~p~n", [Vsn]),{N, {hex, NP, binary_to_list(Vsn)}};_ ->falseend;true ->falseend;_ ->falseendend,GetHexVsn3Common = fun(N, NP, S0) ->case GetHexVsn2(N, NP) offalse ->S2 = case S0 of" " ++ S1 -> S1;_ -> S0end,S = case length([ok || $$. <- S2]) of0 -> S2 ++ ".0.0";1 -> S2 ++ ".0";_ -> S2end,{N, {hex, NP, S}};NameSource ->NameSourceendend,GetHexVsn3 = fun(N, NP, "~>" ++ S0) ->GetHexVsn3Common(N, NP, S0);(N, NP, ">=" ++ S0) ->GetHexVsn3Common(N, NP, S0);(N, NP, S) -> {N, {hex, NP, S}}end,fun() ->File = case lists:keyfind(deps, 1, Conf) offalse -> [];{_, Deps} ->[begin case case Dep ofN when is_atom(N) -> GetHexVsn2(N, N);{N, S} when is_atom(N), is_list(S) -> GetHexVsn3(N, N, S);{N, {pkg, NP}} when is_atom(N) -> GetHexVsn2(N, NP);{N, S, {pkg, NP}} -> GetHexVsn3(N, NP, S);{N, S} when is_tuple(S) -> {N, S};{N, _, S} -> {N, S};{N, _, S, _} -> {N, S};_ -> falseend offalse -> ok;{Name, Source} ->{Method, Repo, Commit} = case Source of{hex, NPV, V} -> {hex, V, NPV};{git, R} -> {git, R, master};{M, R, {branch, C}} -> {M, R, C};{M, R, {ref, C}} -> {M, R, C};{M, R, {tag, C}} -> {M, R, C};{M, R, C} -> {M, R, C}end,Write(io_lib:format("DEPS += ~s\ndep_~s = ~s ~s ~s~n", [Name, Name, Method, Repo, Commit]))end end || Dep <- Deps]endend(),fun() ->case lists:keyfind(erl_first_files, 1, Conf) offalse -> ok;{_, Files0} ->Files = [beginhd(filelib:wildcard("$(call core_native_path,$(DEPS_DIR)/$1/src/**/" ++ filename:rootname(F) ++ ".*rl")))end || "src/" ++ F <- Files0],Names = [[" ", case lists:reverse(F) of"lre." ++ Elif -> lists:reverse(Elif);"lrx." ++ Elif -> lists:reverse(Elif);"lry." ++ Elif -> lists:reverse(Elif);Elif -> lists:reverse(Elif)end] || "$(call core_native_path,$(DEPS_DIR)/$1/src/)" ++ F <- Files],Write(io_lib:format("COMPILE_FIRST +=~s\n", [Names]))endend(),Write("\n\nrebar_dep: preprocess pre-deps deps pre-app app\n"),Write("\npreprocess::\n"),Write("\npre-deps::\n"),Write("\npre-app::\n"),PatchHook = fun(Cmd) ->Cmd2 = re:replace(Cmd, "^([g]?make)(.*)( -C.*)", "\\\\1\\\\3\\\\2", [{return, list}]),case Cmd2 of"make -C" ++ Cmd1 -> "$$\(MAKE) -C" ++ Escape(Cmd1);"gmake -C" ++ Cmd1 -> "$$\(MAKE) -C" ++ Escape(Cmd1);"make " ++ Cmd1 -> "$$\(MAKE) -f Makefile.orig.mk " ++ Escape(Cmd1);"gmake " ++ Cmd1 -> "$$\(MAKE) -f Makefile.orig.mk " ++ Escape(Cmd1);_ -> Escape(Cmd)endend,fun() ->case lists:keyfind(pre_hooks, 1, Conf) offalse -> ok;{_, Hooks} ->[case H of{'get-deps', Cmd} ->Write("\npre-deps::\n\t" ++ PatchHook(Cmd) ++ "\n");{compile, Cmd} ->Write("\npre-app::\n\tCC=$$\(CC) " ++ PatchHook(Cmd) ++ "\n");{{pc, compile}, Cmd} ->Write("\npre-app::\n\tCC=$$\(CC) " ++ PatchHook(Cmd) ++ "\n");{Regex, compile, Cmd} ->case rebar_utils:is_arch(Regex) oftrue -> Write("\npre-app::\n\tCC=$$\(CC) " ++ PatchHook(Cmd) ++ "\n");false -> okend;_ -> okend || H <- Hooks]endend(),ShellToMk = fun(V0) ->V1 = re:replace(V0, "[$$][(]", "$$\(shell ", [global]),V = re:replace(V1, "([$$])(?![(])(\\\\w*)", "\\\\1(\\\\2)", [global]),re:replace(V, "-Werror\\\\b", "", [{return, list}, global])end,PortSpecs = fun() ->case lists:keyfind(port_specs, 1, Conf) offalse ->case filelib:is_dir("$(call core_native_path,$(DEPS_DIR)/$1/c_src)") offalse -> [];true ->[{"priv/" ++ proplists:get_value(so_name, Conf, "$(1)_drv.so"),proplists:get_value(port_sources, Conf, ["c_src/*.c"]), []}]end;{_, Specs} ->lists:flatten([case S of{Output, Input} -> {ShellToMk(Output), Input, []};{Regex, Output, Input} ->case rebar_utils:is_arch(Regex) oftrue -> {ShellToMk(Output), Input, []};false -> []end;{Regex, Output, Input, [{env, Env}]} ->case rebar_utils:is_arch(Regex) oftrue -> {ShellToMk(Output), Input, Env};false -> []endend || S <- Specs])endend(),PortSpecWrite = fun (Text) ->file:write_file("$(call core_native_path,$(DEPS_DIR)/$1/c_src/Makefile.erlang.mk)", Text, [append])end,case PortSpecs of[] -> ok;_ ->Write("\npre-app::\n\t@$$\(MAKE) --no-print-directory -f c_src/Makefile.erlang.mk\n"),PortSpecWrite(io_lib:format("ERL_CFLAGS ?= -finline-functions -Wall -fPIC -I \\"~s/erts-~s/include\\" -I \\"~s\\"\n",[code:root_dir(), erlang:system_info(version), code:lib_dir(erl_interface, include)])),PortSpecWrite(io_lib:format("ERL_LDFLAGS ?= -L \\"~s\\" -lei\n",[code:lib_dir(erl_interface, lib)])),[PortSpecWrite(["\n", E, "\n"]) || E <- OsEnv],FilterEnv = fun(Env) ->lists:flatten([case E of{_, _} -> E;{Regex, K, V} ->case rebar_utils:is_arch(Regex) oftrue -> {K, V};false -> []endend || E <- Env])end,MergeEnv = fun(Env) ->lists:foldl(fun ({K, V}, Acc) ->case lists:keyfind(K, 1, Acc) offalse -> [{K, rebar_utils:expand_env_variable(V, K, "")}|Acc];{_, V0} -> [{K, rebar_utils:expand_env_variable(V, K, V0)}|Acc]endend, [], Env)end,PortEnv = case lists:keyfind(port_env, 1, Conf) offalse -> [];{_, PortEnv0} -> FilterEnv(PortEnv0)end,PortSpec = fun ({Output, Input0, Env}) ->filelib:ensure_dir("$(call core_native_path,$(DEPS_DIR)/$1/)" ++ Output),Input = [[" ", I] || I <- Input0],PortSpecWrite([[["\n", K, " = ", ShellToMk(V)] || {K, V} <- lists:reverse(MergeEnv(PortEnv))],case $(PLATFORM) ofdarwin -> "\n\nLDFLAGS += -flat_namespace -undefined suppress";_ -> ""end,"\n\nall:: ", Output, "\n\t@:\n\n","%.o: %.c\n\t$$\(CC) -c -o $$\@ $$\< $$\(CFLAGS) $$\(ERL_CFLAGS) $$\(DRV_CFLAGS) $$\(EXE_CFLAGS)\n\n","%.o: %.C\n\t$$\(CXX) -c -o $$\@ $$\< $$\(CXXFLAGS) $$\(ERL_CFLAGS) $$\(DRV_CFLAGS) $$\(EXE_CFLAGS)\n\n","%.o: %.cc\n\t$$\(CXX) -c -o $$\@ $$\< $$\(CXXFLAGS) $$\(ERL_CFLAGS) $$\(DRV_CFLAGS) $$\(EXE_CFLAGS)\n\n","%.o: %.cpp\n\t$$\(CXX) -c -o $$\@ $$\< $$\(CXXFLAGS) $$\(ERL_CFLAGS) $$\(DRV_CFLAGS) $$\(EXE_CFLAGS)\n\n",[[Output, ": ", K, " += ", ShellToMk(V), "\n"] || {K, V} <- lists:reverse(MergeEnv(FilterEnv(Env)))],Output, ": $$\(foreach ext,.c .C .cc .cpp,","$$\(patsubst %$$\(ext),%.o,$$\(filter %$$\(ext),$$\(wildcard", Input, "))))\n","\t$$\(CC) -o $$\@ $$\? $$\(LDFLAGS) $$\(ERL_LDFLAGS) $$\(DRV_LDFLAGS) $$\(LDLIBS) $$\(EXE_LDFLAGS)",case {filename:extension(Output), $(PLATFORM)} of{[], _} -> "\n";{".so", darwin} -> "-shared\n";{".dylib", darwin} -> "-shared\n";{_, darwin} -> "\n";_ -> " -shared\n"end])end,[PortSpec(S) || S <- PortSpecs]end,fun() ->case lists:keyfind(plugins, 1, Conf) offalse -> ok;{_, Plugins0} ->Plugins = [P || P <- Plugins0, is_tuple(P)],case lists:keyfind('lfe-compile', 1, Plugins) offalse -> ok;_ -> Write("\nBUILD_DEPS = lfe lfe.mk\ndep_lfe.mk = git https://github.com/ninenines/lfe.mk master\nDEP_PLUGINS = lfe.mk\n")endendend(),Write("\ninclude $$\(if $$\(ERLANG_MK_FILENAME),$$\(ERLANG_MK_FILENAME),erlang.mk)"),RunPlugin = fun(Plugin, Step) ->case erlang:function_exported(Plugin, Step, 2) offalse -> ok;true ->c:cd("$(call core_native_path,$(DEPS_DIR)/$1/)"),Ret = Plugin:Step({config, "", Conf, dict:new(), dict:new(), dict:new(),dict:store(base_dir, "", dict:new())}, undefined),io:format("rebar plugin ~p step ~p ret ~p~n", [Plugin, Step, Ret])endend,fun() ->case lists:keyfind(plugins, 1, Conf) offalse -> ok;{_, Plugins0} ->Plugins = [P || P <- Plugins0, is_atom(P)],[begincase lists:keyfind(deps, 1, Conf) offalse -> ok;{_, Deps} ->case lists:keyfind(P, 1, Deps) offalse -> ok;_ ->Path = "$(call core_native_path,$(DEPS_DIR)/)" ++ atom_to_list(P),io:format("~s", [os:cmd("$(MAKE) -C $(call core_native_path,$(DEPS_DIR)/$1) " ++ Path)]),io:format("~s", [os:cmd("$(MAKE) -C " ++ Path ++ " IS_DEP=1")]),code:add_patha(Path ++ "/ebin")endendend || P <- Plugins],[case code:load_file(P) of{module, P} -> ok;_ ->case lists:keyfind(plugin_dir, 1, Conf) offalse -> ok;{_, PluginsDir} ->ErlFile = "$(call core_native_path,$(DEPS_DIR)/$1/)" ++ PluginsDir ++ "/" ++ atom_to_list(P) ++ ".erl",{ok, P, Bin} = compile:file(ErlFile, [binary]),{module, P} = code:load_binary(P, ErlFile, Bin)endend || P <- Plugins],[RunPlugin(P, preprocess) || P <- Plugins],[RunPlugin(P, pre_compile) || P <- Plugins],[RunPlugin(P, compile) || P <- Plugins]endend(),halt()endefdefine dep_autopatch_appsrc_script.erlAppSrc = "$(call core_native_path,$(DEPS_DIR)/$1/src/$1.app.src)",AppSrcScript = AppSrc ++ ".script",Conf1 = case file:consult(AppSrc) of{ok, Conf0} -> Conf0;{error, enoent} -> []end,Bindings0 = erl_eval:new_bindings(),Bindings1 = erl_eval:add_binding('CONFIG', Conf1, Bindings0),Bindings = erl_eval:add_binding('SCRIPT', AppSrcScript, Bindings1),Conf = case file:script(AppSrcScript, Bindings) of{ok, [C]} -> C;{ok, C} -> Cend,ok = file:write_file(AppSrc, io_lib:format("~p.~n", [Conf])),halt()endefdefine dep_autopatch_appsrc.erlAppSrcOut = "$(call core_native_path,$(DEPS_DIR)/$1/src/$1.app.src)",AppSrcIn = case filelib:is_regular(AppSrcOut) of false -> "$(call core_native_path,$(DEPS_DIR)/$1/ebin/$1.app)"; true -> AppSrcOut end,case filelib:is_regular(AppSrcIn) offalse -> ok;true ->{ok, [{application, $(1), L0}]} = file:consult(AppSrcIn),L1 = lists:keystore(modules, 1, L0, {modules, []}),L2 = case lists:keyfind(vsn, 1, L1) of{_, git} -> lists:keyreplace(vsn, 1, L1, {vsn, lists:droplast(os:cmd("git -C $(DEPS_DIR)/$1 describe --dirty --tags --always"))});{_, {cmd, _}} -> lists:keyreplace(vsn, 1, L1, {vsn, "cmd"});_ -> L1end,L3 = case lists:keyfind(registered, 1, L2) of false -> [{registered, []}|L2]; _ -> L2 end,ok = file:write_file(AppSrcOut, io_lib:format("~p.~n", [{application, $(1), L3}])),case AppSrcOut of AppSrcIn -> ok; _ -> ok = file:delete(AppSrcIn) endend,halt()endefifeq ($(CACHE_DEPS),1)define dep_cache_fetch_gitmkdir -p $(CACHE_DIR)/git; \if test -d "$(join $(CACHE_DIR)/git/,$(call dep_name,$1))"; then \cd $(join $(CACHE_DIR)/git/,$(call dep_name,$1)); \if ! git checkout -q $(call dep_commit,$1); then \git remote set-url origin $(call dep_repo,$1) && \git pull --all && \git cat-file -e $(call dep_commit,$1) 2>/dev/null; \fi; \else \git clone -q -n -- $(call dep_repo,$1) $(join $(CACHE_DIR)/git/,$(call dep_name,$1)); \fi; \git clone -q --branch $(call dep_commit,$1) --single-branch -- $(join $(CACHE_DIR)/git/,$(call dep_name,$1)) $2endefdefine dep_fetch_git$(call dep_cache_fetch_git,$1,$(DEPS_DIR)/$(call dep_name,$1));endefdefine dep_fetch_git-subfoldermkdir -p $(ERLANG_MK_TMP)/git-subfolder; \$(call dep_cache_fetch_git,$1,$(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)); \ln -s $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)/$(word 4,$(dep_$1)) \$(DEPS_DIR)/$(call dep_name,$1);endefelsedefine dep_fetch_gitgit clone -q -n -- $(call dep_repo,$1) $(DEPS_DIR)/$(call dep_name,$1); \cd $(DEPS_DIR)/$(call dep_name,$1) && git checkout -q $(call dep_commit,$1);endefdefine dep_fetch_git-subfoldermkdir -p $(ERLANG_MK_TMP)/git-subfolder; \git clone -q -n -- $(call dep_repo,$1) \$(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1); \cd $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1) \&& git checkout -q $(call dep_commit,$1); \ln -s $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)/$(word 4,$(dep_$1)) \$(DEPS_DIR)/$(call dep_name,$1);endefendifdefine dep_fetch_git-submodulegit submodule update --init -- $(DEPS_DIR)/$1;endefdefine dep_fetch_hghg clone -q -U $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1)); \cd $(DEPS_DIR)/$(call dep_name,$(1)) && hg update -q $(call dep_commit,$(1));endefdefine dep_fetch_svnsvn checkout -q $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1));endefdefine dep_fetch_cpcp -R $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1));endefdefine dep_fetch_lnln -s $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1));endefifeq ($(CACHE_DEPS),1)# Hex only has a package version. No need to look in the Erlang.mk packages.define dep_fetch_hexmkdir -p $(CACHE_DIR)/hex $(DEPS_DIR)/$1; \$(eval hex_tar_name=$(if $(word 3,$(dep_$1)),$(word 3,$(dep_$1)),$1)-$(strip $(word 2,$(dep_$1))).tar) \$(if $(wildcard $(CACHE_DIR)/hex/$(hex_tar_name)),,$(call core_http_get,$(CACHE_DIR)/hex/$(hex_tar_name),\https://repo.hex.pm/tarballs/$(hex_tar_name);)) \tar -xOf $(CACHE_DIR)/hex/$(hex_tar_name) contents.tar.gz | tar -C $(DEPS_DIR)/$1 -xzf -;endefelse# Hex only has a package version. No need to look in the Erlang.mk packages.define dep_fetch_hexmkdir -p $(ERLANG_MK_TMP)/hex $(DEPS_DIR)/$1; \$(call core_http_get,$(ERLANG_MK_TMP)/hex/$1.tar,\https://repo.hex.pm/tarballs/$(if $(word 3,$(dep_$1)),$(word 3,$(dep_$1)),$1)-$(strip $(word 2,$(dep_$1))).tar); \tar -xOf $(ERLANG_MK_TMP)/hex/$1.tar contents.tar.gz | tar -C $(DEPS_DIR)/$1 -xzf -;endefendifdefine dep_fetch_failecho "Error: Unknown or invalid dependency: $(1)." >&2; \exit 78;endef# Kept for compatibility purposes with older Erlang.mk configuration.define dep_fetch_legacy$(warning WARNING: '$(1)' dependency configuration uses deprecated format.) \git clone -q -n -- $(word 1,$(dep_$(1))) $(DEPS_DIR)/$(1); \cd $(DEPS_DIR)/$(1) && git checkout -q $(if $(word 2,$(dep_$(1))),$(word 2,$(dep_$(1))),master);endefdefine dep_target$(DEPS_DIR)/$(call dep_name,$1): | $(ERLANG_MK_TMP)$(eval DEP_NAME := $(call dep_name,$1))$(eval DEP_STR := $(if $(filter $1,$(DEP_NAME)),$1,"$1 ($(DEP_NAME))"))$(verbose) if test -d $(APPS_DIR)/$(DEP_NAME); then \echo "Error: Dependency" $(DEP_STR) "conflicts with application found in $(APPS_DIR)/$(DEP_NAME)." >&2; \exit 17; \fi$(verbose) mkdir -p $(DEPS_DIR)$(dep_verbose) $(call dep_fetch_$(strip $(call dep_fetch,$(1))),$(1))$(verbose) if [ -f $(DEPS_DIR)/$(1)/configure.ac -o -f $(DEPS_DIR)/$(1)/configure.in ] \&& [ ! -f $(DEPS_DIR)/$(1)/configure ]; then \echo " AUTO " $(DEP_STR); \cd $(DEPS_DIR)/$(1) && autoreconf -Wall -vif -I m4; \fi- $(verbose) if [ -f $(DEPS_DIR)/$(DEP_NAME)/configure ]; then \echo " CONF " $(DEP_STR); \cd $(DEPS_DIR)/$(DEP_NAME) && ./configure; \fiifeq ($(filter $(1),$(NO_AUTOPATCH)),)$(verbose) $$(MAKE) --no-print-directory autopatch-$(DEP_NAME)endif.PHONY: autopatch-$(call dep_name,$1)autopatch-$(call dep_name,$1)::$(verbose) if [ "$1" = "elixir" -a "$(ELIXIR_PATCH)" ]; then \ln -s lib/elixir/ebin $(DEPS_DIR)/elixir/; \else \$$(call dep_autopatch,$(call dep_name,$1)) \fiendef$(foreach dep,$(BUILD_DEPS) $(DEPS),$(eval $(call dep_target,$(dep))))ifndef IS_APPclean:: clean-appsclean-apps:$(verbose) set -e; for dep in $(ALL_APPS_DIRS) ; do \$(MAKE) -C $$dep clean IS_APP=1; \donedistclean:: distclean-appsdistclean-apps:$(verbose) set -e; for dep in $(ALL_APPS_DIRS) ; do \$(MAKE) -C $$dep distclean IS_APP=1; \doneendififndef SKIP_DEPSdistclean:: distclean-depsdistclean-deps:$(gen_verbose) rm -rf $(DEPS_DIR)endififeq ($(CACHE_DEPS),1)cacheclean:: cacheclean-git cacheclean-hexcacheclean-git:$(gen_verbose) rm -rf $(CACHE_DIR)/gitcacheclean-hex:$(gen_verbose) rm -rf $(CACHE_DIR)/hexendif# Forward-declare variables used in core/deps-tools.mk. This is required# in case plugins use them.ERLANG_MK_RECURSIVE_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-deps-list.logERLANG_MK_RECURSIVE_DOC_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-doc-deps-list.logERLANG_MK_RECURSIVE_REL_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-rel-deps-list.logERLANG_MK_RECURSIVE_TEST_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-test-deps-list.logERLANG_MK_RECURSIVE_SHELL_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-shell-deps-list.logERLANG_MK_QUERY_DEPS_FILE = $(ERLANG_MK_TMP)/query-deps.logERLANG_MK_QUERY_DOC_DEPS_FILE = $(ERLANG_MK_TMP)/query-doc-deps.logERLANG_MK_QUERY_REL_DEPS_FILE = $(ERLANG_MK_TMP)/query-rel-deps.logERLANG_MK_QUERY_TEST_DEPS_FILE = $(ERLANG_MK_TMP)/query-test-deps.logERLANG_MK_QUERY_SHELL_DEPS_FILE = $(ERLANG_MK_TMP)/query-shell-deps.log# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: clean-app# Configuration.ERLC_OPTS ?= -Werror +debug_info +warn_export_vars +warn_shadow_vars \+warn_obsolete_guard # +bin_opt_info +warn_export_all +warn_missing_specCOMPILE_FIRST ?=COMPILE_FIRST_PATHS = $(addprefix src/,$(addsuffix .erl,$(COMPILE_FIRST)))ERLC_EXCLUDE ?=ERLC_EXCLUDE_PATHS = $(addprefix src/,$(addsuffix .erl,$(ERLC_EXCLUDE)))ERLC_ASN1_OPTS ?=ERLC_MIB_OPTS ?=COMPILE_MIB_FIRST ?=COMPILE_MIB_FIRST_PATHS = $(addprefix mibs/,$(addsuffix .mib,$(COMPILE_MIB_FIRST)))# Verbosity.app_verbose_0 = @echo " APP " $(PROJECT);app_verbose_2 = set -x;app_verbose = $(app_verbose_$(V))appsrc_verbose_0 = @echo " APP " $(PROJECT).app.src;appsrc_verbose_2 = set -x;appsrc_verbose = $(appsrc_verbose_$(V))makedep_verbose_0 = @echo " DEPEND" $(PROJECT).d;makedep_verbose_2 = set -x;makedep_verbose = $(makedep_verbose_$(V))erlc_verbose_0 = @echo " ERLC " $(filter-out $(patsubst %,%.erl,$(ERLC_EXCLUDE)),\$(filter %.erl %.core,$(?F)));erlc_verbose_2 = set -x;erlc_verbose = $(erlc_verbose_$(V))xyrl_verbose_0 = @echo " XYRL " $(filter %.xrl %.yrl,$(?F));xyrl_verbose_2 = set -x;xyrl_verbose = $(xyrl_verbose_$(V))asn1_verbose_0 = @echo " ASN1 " $(filter %.asn1,$(?F));asn1_verbose_2 = set -x;asn1_verbose = $(asn1_verbose_$(V))mib_verbose_0 = @echo " MIB " $(filter %.bin %.mib,$(?F));mib_verbose_2 = set -x;mib_verbose = $(mib_verbose_$(V))ifneq ($(wildcard src/),)# Targets.app:: $(if $(wildcard ebin/test),clean) deps$(verbose) $(MAKE) --no-print-directory $(PROJECT).d$(verbose) $(MAKE) --no-print-directory app-buildifeq ($(wildcard src/$(PROJECT_MOD).erl),)define app_file{application, '$(PROJECT)', [{description, "$(PROJECT_DESCRIPTION)"},{vsn, "$(PROJECT_VERSION)"},$(if $(IS_DEP),{id$(comma)$(space)"$(1)"}$(comma)){modules, [$(call comma_list,$(2))]},{registered, []},{applications, [$(call comma_list,kernel stdlib $(OTP_DEPS) $(LOCAL_DEPS) $(OPTIONAL_DEPS) $(foreach dep,$(DEPS),$(call dep_name,$(dep))))]},{optional_applications, [$(call comma_list,$(OPTIONAL_DEPS))]},{env, $(subst \,\\,$(PROJECT_ENV))}$(if $(findstring {,$(PROJECT_APP_EXTRA_KEYS)),$(comma)$(newline)$(tab)$(subst \,\\,$(PROJECT_APP_EXTRA_KEYS)),)]}.endefelsedefine app_file{application, '$(PROJECT)', [{description, "$(PROJECT_DESCRIPTION)"},{vsn, "$(PROJECT_VERSION)"},$(if $(IS_DEP),{id$(comma)$(space)"$(1)"}$(comma)){modules, [$(call comma_list,$(2))]},{registered, [$(call comma_list,$(PROJECT)_sup $(PROJECT_REGISTERED))]},{applications, [$(call comma_list,kernel stdlib $(OTP_DEPS) $(LOCAL_DEPS) $(OPTIONAL_DEPS) $(foreach dep,$(DEPS),$(call dep_name,$(dep))))]},{optional_applications, [$(call comma_list,$(OPTIONAL_DEPS))]},{mod, {$(PROJECT_MOD), []}},{env, $(subst \,\\,$(PROJECT_ENV))}$(if $(findstring {,$(PROJECT_APP_EXTRA_KEYS)),$(comma)$(newline)$(tab)$(subst \,\\,$(PROJECT_APP_EXTRA_KEYS)),)]}.endefendifapp-build: ebin/$(PROJECT).app$(verbose) :# Source files.ALL_SRC_FILES := $(sort $(call core_find,src/,*))ERL_FILES := $(filter %.erl,$(ALL_SRC_FILES))CORE_FILES := $(filter %.core,$(ALL_SRC_FILES))# ASN.1 files.ifneq ($(wildcard asn1/),)ASN1_FILES = $(sort $(call core_find,asn1/,*.asn1))ERL_FILES += $(addprefix src/,$(patsubst %.asn1,%.erl,$(notdir $(ASN1_FILES))))define compile_asn1$(verbose) mkdir -p include/$(asn1_verbose) erlc -v -I include/ -o asn1/ +noobj $(ERLC_ASN1_OPTS) $(1)$(verbose) mv asn1/*.erl src/-$(verbose) mv asn1/*.hrl include/$(verbose) mv asn1/*.asn1db include/endef$(PROJECT).d:: $(ASN1_FILES)$(if $(strip $?),$(call compile_asn1,$?))endif# SNMP MIB files.ifneq ($(wildcard mibs/),)MIB_FILES = $(sort $(call core_find,mibs/,*.mib))$(PROJECT).d:: $(COMPILE_MIB_FIRST_PATHS) $(MIB_FILES)$(verbose) mkdir -p include/ priv/mibs/$(mib_verbose) erlc -v $(ERLC_MIB_OPTS) -o priv/mibs/ -I priv/mibs/ $?$(mib_verbose) erlc -o include/ -- $(addprefix priv/mibs/,$(patsubst %.mib,%.bin,$(notdir $?)))endif# Leex and Yecc files.XRL_FILES := $(filter %.xrl,$(ALL_SRC_FILES))XRL_ERL_FILES = $(addprefix src/,$(patsubst %.xrl,%.erl,$(notdir $(XRL_FILES))))ERL_FILES += $(XRL_ERL_FILES)YRL_FILES := $(filter %.yrl,$(ALL_SRC_FILES))YRL_ERL_FILES = $(addprefix src/,$(patsubst %.yrl,%.erl,$(notdir $(YRL_FILES))))ERL_FILES += $(YRL_ERL_FILES)$(PROJECT).d:: $(XRL_FILES) $(YRL_FILES)$(if $(strip $?),$(xyrl_verbose) erlc -v -o src/ $(YRL_ERLC_OPTS) $?)# Erlang and Core Erlang files.define makedep.erlE = ets:new(makedep, [bag]),G = digraph:new([acyclic]),ErlFiles = lists:usort(string:tokens("$(ERL_FILES)", " ")),DepsDir = "$(call core_native_path,$(DEPS_DIR))",AppsDir = "$(call core_native_path,$(APPS_DIR))",DepsDirsSrc = "$(if $(wildcard $(DEPS_DIR)/*/src), $(call core_native_path,$(wildcard $(DEPS_DIR)/*/src)))",DepsDirsInc = "$(if $(wildcard $(DEPS_DIR)/*/include), $(call core_native_path,$(wildcard $(DEPS_DIR)/*/include)))",AppsDirsSrc = "$(if $(wildcard $(APPS_DIR)/*/src), $(call core_native_path,$(wildcard $(APPS_DIR)/*/src)))",AppsDirsInc = "$(if $(wildcard $(APPS_DIR)/*/include), $(call core_native_path,$(wildcard $(APPS_DIR)/*/include)))",DepsDirs = lists:usort(string:tokens(DepsDirsSrc++DepsDirsInc, " ")),AppsDirs = lists:usort(string:tokens(AppsDirsSrc++AppsDirsInc, " ")),Modules = [{list_to_atom(filename:basename(F, ".erl")), F} || F <- ErlFiles],Add = fun (Mod, Dep) ->case lists:keyfind(Dep, 1, Modules) offalse -> ok;{_, DepFile} ->{_, ModFile} = lists:keyfind(Mod, 1, Modules),ets:insert(E, {ModFile, DepFile}),digraph:add_vertex(G, Mod),digraph:add_vertex(G, Dep),digraph:add_edge(G, Mod, Dep)endend,AddHd = fun (F, Mod, DepFile) ->case file:open(DepFile, [read]) of{error, enoent} ->ok;{ok, Fd} ->{_, ModFile} = lists:keyfind(Mod, 1, Modules),case ets:match(E, {ModFile, DepFile}) of[] ->ets:insert(E, {ModFile, DepFile}),F(F, Fd, Mod,0);_ -> okendendend,SearchHrl = funF(_Hrl, []) -> {error,enoent};F(Hrl, [Dir|Dirs]) ->HrlF = filename:join([Dir,Hrl]),case filelib:is_file(HrlF) oftrue ->{ok, HrlF};false -> F(Hrl,Dirs)endend,Attr = fun(_F, Mod, behavior, Dep) ->Add(Mod, Dep);(_F, Mod, behaviour, Dep) ->Add(Mod, Dep);(_F, Mod, compile, {parse_transform, Dep}) ->Add(Mod, Dep);(_F, Mod, compile, Opts) when is_list(Opts) ->case proplists:get_value(parse_transform, Opts) ofundefined -> ok;Dep -> Add(Mod, Dep)end;(F, Mod, include, Hrl) ->case SearchHrl(Hrl, ["src", "include",AppsDir,DepsDir]++AppsDirs++DepsDirs) of{ok, FoundHrl} -> AddHd(F, Mod, FoundHrl);{error, _} -> falseend;(F, Mod, include_lib, Hrl) ->case SearchHrl(Hrl, ["src", "include",AppsDir,DepsDir]++AppsDirs++DepsDirs) of{ok, FoundHrl} -> AddHd(F, Mod, FoundHrl);{error, _} -> falseend;(F, Mod, import, {Imp, _}) ->IsFile =case lists:keyfind(Imp, 1, Modules) offalse -> false;{_, FilePath} -> filelib:is_file(FilePath)end,case IsFile offalse -> ok;true -> Add(Mod, Imp)end;(_, _, _, _) -> okend,MakeDepend = fun(F, Fd, Mod, StartLocation) ->{ok, Filename} = file:pid2name(Fd),case io:parse_erl_form(Fd, undefined, StartLocation) of{ok, AbsData, EndLocation} ->case AbsData of{attribute, _, Key, Value} ->Attr(F, Mod, Key, Value),F(F, Fd, Mod, EndLocation);_ -> F(F, Fd, Mod, EndLocation)end;{eof, _ } -> file:close(Fd);{error, ErrorDescription } ->file:close(Fd);{error, ErrorInfo, ErrorLocation} ->F(F, Fd, Mod, ErrorLocation)end,okend,[beginMod = list_to_atom(filename:basename(F, ".erl")),case file:open(F, [read]) of{ok, Fd} -> MakeDepend(MakeDepend, Fd, Mod,0);{error, enoent} -> okendend || F <- ErlFiles],Depend = sofs:to_external(sofs:relation_to_family(sofs:relation(ets:tab2list(E)))),CompileFirst = [X || X <- lists:reverse(digraph_utils:topsort(G)), [] =/= digraph:in_neighbours(G, X)],TargetPath = fun(Target) ->case lists:keyfind(Target, 1, Modules) offalse -> "";{_, DepFile} ->DirSubname = tl(string:tokens(filename:dirname(DepFile), "/")),string:join(DirSubname ++ [atom_to_list(Target)], "/")endend,Output0 = ["# Generated by Erlang.mk. Edit at your own risk!\n\n",[[F, "::", [[" ", D] || D <- Deps], "; @touch \$$@\n"] || {F, Deps} <- Depend],"\nCOMPILE_FIRST +=", [[" ", TargetPath(CF)] || CF <- CompileFirst], "\n"],Output = case "é" of[233] -> unicode:characters_to_binary(Output0);_ -> Output0end,ok = file:write_file("$(1)", Output),halt()endefifeq ($(if $(NO_MAKEDEP),$(wildcard $(PROJECT).d),),)$(PROJECT).d:: $(ERL_FILES) $(call core_find,include/,*.hrl) $(MAKEFILE_LIST)$(makedep_verbose) $(call erlang,$(call makedep.erl,$@))endififeq ($(IS_APP)$(IS_DEP),)ifneq ($(words $(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES)),0)# Rebuild everything when the Makefile changes.$(ERLANG_MK_TMP)/last-makefile-change: $(MAKEFILE_LIST) | $(ERLANG_MK_TMP)$(verbose) if test -f $@; then \touch $(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES); \touch -c $(PROJECT).d; \fi$(verbose) touch $@$(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES):: $(ERLANG_MK_TMP)/last-makefile-changeebin/$(PROJECT).app:: $(ERLANG_MK_TMP)/last-makefile-changeendifendif$(PROJECT).d::$(verbose) :include $(wildcard $(PROJECT).d)ebin/$(PROJECT).app:: ebin/ebin/:$(verbose) mkdir -p ebin/define compile_erl$(erlc_verbose) erlc -v $(if $(IS_DEP),$(filter-out -Werror,$(ERLC_OPTS)),$(ERLC_OPTS)) -o ebin/ \-pa ebin/ -I include/ $(filter-out $(ERLC_EXCLUDE_PATHS),$(COMPILE_FIRST_PATHS) $(1))endefdefine validate_app_filecase file:consult("ebin/$(PROJECT).app") of{ok, _} -> halt();_ -> halt(1)endendefebin/$(PROJECT).app:: $(ERL_FILES) $(CORE_FILES) $(wildcard src/$(PROJECT).app.src)$(eval FILES_TO_COMPILE := $(filter-out src/$(PROJECT).app.src,$?))$(if $(strip $(FILES_TO_COMPILE)),$(call compile_erl,$(FILES_TO_COMPILE)))# Older git versions do not have the --first-parent flag. Do without in that case.$(eval GITDESCRIBE := $(shell git describe --dirty --abbrev=7 --tags --always --first-parent 2>/dev/null \|| git describe --dirty --abbrev=7 --tags --always 2>/dev/null || true))$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \$(filter-out $(ERLC_EXCLUDE_PATHS),$(ERL_FILES) $(CORE_FILES) $(BEAM_FILES)))))))ifeq ($(wildcard src/$(PROJECT).app.src),)$(app_verbose) printf '$(subst %,%%,$(subst $(newline),\n,$(subst ','\'',$(call app_file,$(GITDESCRIBE),$(MODULES)))))' \> ebin/$(PROJECT).app$(verbose) if ! $(call erlang,$(call validate_app_file)); then \echo "The .app file produced is invalid. Please verify the value of PROJECT_ENV." >&2; \exit 1; \fielse$(verbose) if [ -z "$$(grep -e '^[^%]*{\s*modules\s*,' src/$(PROJECT).app.src)" ]; then \echo "Empty modules entry not found in $(PROJECT).app.src. Please consult the erlang.mk documentation for instructions." >&2; \exit 1; \fi$(appsrc_verbose) cat src/$(PROJECT).app.src \| sed "s/{[[:space:]]*modules[[:space:]]*,[[:space:]]*\[\]}/{modules, \[$(call comma_list,$(MODULES))\]}/" \| sed "s/{id,[[:space:]]*\"git\"}/{id, \"$(subst /,\/,$(GITDESCRIBE))\"}/" \> ebin/$(PROJECT).appendififneq ($(wildcard src/$(PROJECT).appup),)$(verbose) cp src/$(PROJECT).appup ebin/endifclean:: clean-appclean-app:$(gen_verbose) rm -rf $(PROJECT).d ebin/ priv/mibs/ $(XRL_ERL_FILES) $(YRL_ERL_FILES) \$(addprefix include/,$(patsubst %.mib,%.hrl,$(notdir $(MIB_FILES)))) \$(addprefix include/,$(patsubst %.asn1,%.hrl,$(notdir $(ASN1_FILES)))) \$(addprefix include/,$(patsubst %.asn1,%.asn1db,$(notdir $(ASN1_FILES)))) \$(addprefix src/,$(patsubst %.asn1,%.erl,$(notdir $(ASN1_FILES))))endif# Copyright (c) 2016, Loïc Hoguin <essen@ninenines.eu># Copyright (c) 2015, Viktor Söderqvist <viktor@zuiderkwast.se># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: docs-deps# Configuration.ALL_DOC_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(DOC_DEPS))# Targets.$(foreach dep,$(DOC_DEPS),$(eval $(call dep_target,$(dep))))ifneq ($(SKIP_DEPS),)doc-deps:elsedoc-deps: $(ALL_DOC_DEPS_DIRS)$(verbose) set -e; for dep in $(ALL_DOC_DEPS_DIRS) ; do $(MAKE) -C $$dep IS_DEP=1; doneendif# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: rel-deps# Configuration.ALL_REL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(REL_DEPS))# Targets.$(foreach dep,$(REL_DEPS),$(eval $(call dep_target,$(dep))))ifneq ($(SKIP_DEPS),)rel-deps:elserel-deps: $(ALL_REL_DEPS_DIRS)$(verbose) set -e; for dep in $(ALL_REL_DEPS_DIRS) ; do $(MAKE) -C $$dep; doneendif# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: test-deps test-dir test-build clean-test-dir# Configuration.TEST_DIR ?= $(CURDIR)/testALL_TEST_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(TEST_DEPS))TEST_ERLC_OPTS ?= +debug_info +warn_export_vars +warn_shadow_vars +warn_obsolete_guardTEST_ERLC_OPTS += -DTEST=1# Targets.$(foreach dep,$(TEST_DEPS),$(eval $(call dep_target,$(dep))))ifneq ($(SKIP_DEPS),)test-deps:elsetest-deps: $(ALL_TEST_DEPS_DIRS)$(verbose) set -e; for dep in $(ALL_TEST_DEPS_DIRS) ; do \if [ -z "$(strip $(FULL))" ] && [ ! -L $$dep ] && [ -f $$dep/ebin/dep_built ]; then \:; \else \$(MAKE) -C $$dep IS_DEP=1; \if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \fi \doneendififneq ($(wildcard $(TEST_DIR)),)test-dir: $(ERLANG_MK_TMP)/$(PROJECT).last-testdir-build@:test_erlc_verbose_0 = @echo " ERLC " $(filter-out $(patsubst %,%.erl,$(ERLC_EXCLUDE)),\$(filter %.erl %.core,$(notdir $(FILES_TO_COMPILE))));test_erlc_verbose_2 = set -x;test_erlc_verbose = $(test_erlc_verbose_$(V))define compile_test_erl$(test_erlc_verbose) erlc -v $(TEST_ERLC_OPTS) -o $(TEST_DIR) \-pa ebin/ -I include/ $(1)endefERL_TEST_FILES = $(call core_find,$(TEST_DIR)/,*.erl)$(ERLANG_MK_TMP)/$(PROJECT).last-testdir-build: $(ERL_TEST_FILES) $(MAKEFILE_LIST)$(eval FILES_TO_COMPILE := $(if $(filter $(MAKEFILE_LIST),$?),$(filter $(ERL_TEST_FILES),$^),$?))$(if $(strip $(FILES_TO_COMPILE)),$(call compile_test_erl,$(FILES_TO_COMPILE)) && touch $@)endiftest-build:: IS_TEST=1test-build:: ERLC_OPTS=$(TEST_ERLC_OPTS)test-build:: $(if $(wildcard src),$(if $(wildcard ebin/test),,clean)) $(if $(IS_APP),,deps test-deps)# We already compiled everything when IS_APP=1.ifndef IS_APPifneq ($(wildcard src),)$(verbose) $(MAKE) --no-print-directory $(PROJECT).d ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"$(verbose) $(MAKE) --no-print-directory app-build ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"$(gen_verbose) touch ebin/testendififneq ($(wildcard $(TEST_DIR)),)$(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"endifendif# Roughly the same as test-build, but when IS_APP=1.# We only care about compiling the current application.ifdef IS_APPtest-build-app:: ERLC_OPTS=$(TEST_ERLC_OPTS)test-build-app:: deps test-depsifneq ($(wildcard src),)$(verbose) $(MAKE) --no-print-directory $(PROJECT).d ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"$(verbose) $(MAKE) --no-print-directory app-build ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"$(gen_verbose) touch ebin/testendififneq ($(wildcard $(TEST_DIR)),)$(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"endifendifclean:: clean-test-dirclean-test-dir:ifneq ($(wildcard $(TEST_DIR)/*.beam),)$(gen_verbose) rm -f $(TEST_DIR)/*.beam $(ERLANG_MK_TMP)/$(PROJECT).last-testdir-buildendif# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: rebar.config# We strip out -Werror because we don't want to fail due to# warnings when used as a dependency.compat_prepare_erlc_opts = $(shell echo "$1" | sed 's/, */,/g')define compat_convert_erlc_opts$(if $(filter-out -Werror,$1),\$(if $(findstring +,$1),\$(shell echo $1 | cut -b 2-)))endefdefine compat_erlc_opts_to_list[$(call comma_list,$(foreach o,$(call compat_prepare_erlc_opts,$1),$(call compat_convert_erlc_opts,$o)))]endefdefine compat_rebar_config{deps, [$(call comma_list,$(foreach d,$(DEPS),\$(if $(filter hex,$(call dep_fetch,$d)),\{$(call dep_name,$d)$(comma)"$(call dep_repo,$d)"},\{$(call dep_name,$d)$(comma)".*"$(comma){git,"$(call dep_repo,$d)"$(comma)"$(call dep_commit,$d)"}})))]}.{erl_opts, $(call compat_erlc_opts_to_list,$(ERLC_OPTS))}.endefrebar.config:$(gen_verbose) $(call core_render,compat_rebar_config,rebar.config)# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.ifeq ($(filter asciideck,$(DEPS) $(DOC_DEPS)),asciideck).PHONY: asciidoc asciidoc-guide asciidoc-manual install-asciidoc distclean-asciidoc-guide distclean-asciidoc-manual# Core targets.docs:: asciidocdistclean:: distclean-asciidoc-guide distclean-asciidoc-manual# Plugin-specific targets.asciidoc: asciidoc-guide asciidoc-manual# User guide.ifeq ($(wildcard doc/src/guide/book.asciidoc),)asciidoc-guide:elseasciidoc-guide: distclean-asciidoc-guide doc-depsa2x -v -f pdf doc/src/guide/book.asciidoc && mv doc/src/guide/book.pdf doc/guide.pdfa2x -v -f chunked doc/src/guide/book.asciidoc && mv doc/src/guide/book.chunked/ doc/html/distclean-asciidoc-guide:$(gen_verbose) rm -rf doc/html/ doc/guide.pdfendif# Man pages.ASCIIDOC_MANUAL_FILES := $(wildcard doc/src/manual/*.asciidoc)ifeq ($(ASCIIDOC_MANUAL_FILES),)asciidoc-manual:else# Configuration.MAN_INSTALL_PATH ?= /usr/local/share/manMAN_SECTIONS ?= 3 7MAN_PROJECT ?= $(shell echo $(PROJECT) | sed 's/^./\U&\E/')MAN_VERSION ?= $(PROJECT_VERSION)# Plugin-specific targets.define asciidoc2man.erltry[beginio:format(" ADOC ~s~n", [F]),ok = asciideck:to_manpage(asciideck:parse_file(F), #{compress => gzip,outdir => filename:dirname(F),extra2 => "$(MAN_PROJECT) $(MAN_VERSION)",extra3 => "$(MAN_PROJECT) Function Reference"})end || F <- [$(shell echo $(addprefix $(comma)\",$(addsuffix \",$1)) | sed 's/^.//')]],halt(0)catch C:E$(if $V,:S) ->io:format("Exception: ~p:~p~n$(if $V,Stacktrace: ~p~n)", [C, E$(if $V,$(comma) S)]),halt(1)end.endefasciidoc-manual:: doc-depsasciidoc-manual:: $(ASCIIDOC_MANUAL_FILES)$(gen_verbose) $(call erlang,$(call asciidoc2man.erl,$?))$(verbose) $(foreach s,$(MAN_SECTIONS),mkdir -p doc/man$s/ && mv doc/src/manual/*.$s.gz doc/man$s/;)install-docs:: install-asciidocinstall-asciidoc: asciidoc-manual$(foreach s,$(MAN_SECTIONS),\mkdir -p $(MAN_INSTALL_PATH)/man$s/ && \install -g `id -g` -o `id -u` -m 0644 doc/man$s/*.gz $(MAN_INSTALL_PATH)/man$s/;)distclean-asciidoc-manual:$(gen_verbose) rm -rf $(addprefix doc/man,$(MAN_SECTIONS))endifendif# Copyright (c) 2014-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: bootstrap bootstrap-lib bootstrap-rel new list-templates# Core targets.help::$(verbose) printf "%s\n" "" \"Bootstrap targets:" \" bootstrap Generate a skeleton of an OTP application" \" bootstrap-lib Generate a skeleton of an OTP library" \" bootstrap-rel Generate the files needed to build a release" \" new-app in=NAME Create a new local OTP application NAME" \" new-lib in=NAME Create a new local OTP library NAME" \" new t=TPL n=NAME Generate a module NAME based on the template TPL" \" new t=T n=N in=APP Generate a module NAME based on the template TPL in APP" \" list-templates List available templates"# Bootstrap templates.define bs_appsrc{application, $p, [{description, ""},{vsn, "0.1.0"},{id, "git"},{modules, []},{registered, []},{applications, [kernel,stdlib]},{mod, {$p_app, []}},{env, []}]}.endefdefine bs_appsrc_lib{application, $p, [{description, ""},{vsn, "0.1.0"},{id, "git"},{modules, []},{registered, []},{applications, [kernel,stdlib]}]}.endef# To prevent autocompletion issues with ZSH, we add "include erlang.mk"# separately during the actual bootstrap.define bs_MakefilePROJECT = $pPROJECT_DESCRIPTION = New projectPROJECT_VERSION = 0.1.0$(if $(SP),# Whitespace to be used when creating files from templates.SP = $(SP))endefdefine bs_apps_MakefilePROJECT = $pPROJECT_DESCRIPTION = New projectPROJECT_VERSION = 0.1.0$(if $(SP),# Whitespace to be used when creating files from templates.SP = $(SP))# Make sure we know where the applications are located.ROOT_DIR ?= $(call core_relpath,$(dir $(ERLANG_MK_FILENAME)),$(APPS_DIR)/app)APPS_DIR ?= ..DEPS_DIR ?= $(call core_relpath,$(DEPS_DIR),$(APPS_DIR)/app)include $$(ROOT_DIR)/erlang.mkendefdefine bs_app-module($p_app).-behaviour(application).-export([start/2]).-export([stop/1]).start(_Type, _Args) ->$p_sup:start_link().stop(_State) ->ok.endefdefine bs_relx_config{release, {$p_release, "1"}, [$p, sasl, runtime_tools]}.{dev_mode, false}.{include_erts, true}.{extended_start_script, true}.{sys_config, "config/sys.config"}.{vm_args, "config/vm.args"}.endefdefine bs_sys_config[].endefdefine bs_vm_args-name $p@127.0.0.1-setcookie $p-heartendef# Normal templates.define tpl_supervisor-module($(n)).-behaviour(supervisor).-export([start_link/0]).-export([init/1]).start_link() ->supervisor:start_link({local, ?MODULE}, ?MODULE, []).init([]) ->Procs = [],{ok, {{one_for_one, 1, 5}, Procs}}.endefdefine tpl_gen_server-module($(n)).-behaviour(gen_server).%% API.-export([start_link/0]).%% gen_server.-export([init/1]).-export([handle_call/3]).-export([handle_cast/2]).-export([handle_info/2]).-export([terminate/2]).-export([code_change/3]).-record(state, {}).%% API.-spec start_link() -> {ok, pid()}.start_link() ->gen_server:start_link(?MODULE, [], []).%% gen_server.init([]) ->{ok, #state{}}.handle_call(_Request, _From, State) ->{reply, ignored, State}.handle_cast(_Msg, State) ->{noreply, State}.handle_info(_Info, State) ->{noreply, State}.terminate(_Reason, _State) ->ok.code_change(_OldVsn, State, _Extra) ->{ok, State}.endefdefine tpl_module-module($(n)).-export([]).endefdefine tpl_cowboy_http-module($(n)).-behaviour(cowboy_http_handler).-export([init/3]).-export([handle/2]).-export([terminate/3]).-record(state, {}).init(_, Req, _Opts) ->{ok, Req, #state{}}.handle(Req, State=#state{}) ->{ok, Req2} = cowboy_req:reply(200, Req),{ok, Req2, State}.terminate(_Reason, _Req, _State) ->ok.endefdefine tpl_gen_fsm-module($(n)).-behaviour(gen_fsm).%% API.-export([start_link/0]).%% gen_fsm.-export([init/1]).-export([state_name/2]).-export([handle_event/3]).-export([state_name/3]).-export([handle_sync_event/4]).-export([handle_info/3]).-export([terminate/3]).-export([code_change/4]).-record(state, {}).%% API.-spec start_link() -> {ok, pid()}.start_link() ->gen_fsm:start_link(?MODULE, [], []).%% gen_fsm.init([]) ->{ok, state_name, #state{}}.state_name(_Event, StateData) ->{next_state, state_name, StateData}.handle_event(_Event, StateName, StateData) ->{next_state, StateName, StateData}.state_name(_Event, _From, StateData) ->{reply, ignored, state_name, StateData}.handle_sync_event(_Event, _From, StateName, StateData) ->{reply, ignored, StateName, StateData}.handle_info(_Info, StateName, StateData) ->{next_state, StateName, StateData}.terminate(_Reason, _StateName, _StateData) ->ok.code_change(_OldVsn, StateName, StateData, _Extra) ->{ok, StateName, StateData}.endefdefine tpl_gen_statem-module($(n)).-behaviour(gen_statem).%% API.-export([start_link/0]).%% gen_statem.-export([callback_mode/0]).-export([init/1]).-export([state_name/3]).-export([handle_event/4]).-export([terminate/3]).-export([code_change/4]).-record(state, {}).%% API.-spec start_link() -> {ok, pid()}.start_link() ->gen_statem:start_link(?MODULE, [], []).%% gen_statem.callback_mode() ->state_functions.init([]) ->{ok, state_name, #state{}}.state_name(_EventType, _EventData, StateData) ->{next_state, state_name, StateData}.handle_event(_EventType, _EventData, StateName, StateData) ->{next_state, StateName, StateData}.terminate(_Reason, _StateName, _StateData) ->ok.code_change(_OldVsn, StateName, StateData, _Extra) ->{ok, StateName, StateData}.endefdefine tpl_cowboy_loop-module($(n)).-behaviour(cowboy_loop_handler).-export([init/3]).-export([info/3]).-export([terminate/3]).-record(state, {}).init(_, Req, _Opts) ->{loop, Req, #state{}, 5000, hibernate}.info(_Info, Req, State) ->{loop, Req, State, hibernate}.terminate(_Reason, _Req, _State) ->ok.endefdefine tpl_cowboy_rest-module($(n)).-export([init/3]).-export([content_types_provided/2]).-export([get_html/2]).init(_, _Req, _Opts) ->{upgrade, protocol, cowboy_rest}.content_types_provided(Req, State) ->{[{{<<"text">>, <<"html">>, '*'}, get_html}], Req, State}.get_html(Req, State) ->{<<"<html><body>This is REST!</body></html>">>, Req, State}.endefdefine tpl_cowboy_ws-module($(n)).-behaviour(cowboy_websocket_handler).-export([init/3]).-export([websocket_init/3]).-export([websocket_handle/3]).-export([websocket_info/3]).-export([websocket_terminate/3]).-record(state, {}).init(_, _, _) ->{upgrade, protocol, cowboy_websocket}.websocket_init(_, Req, _Opts) ->Req2 = cowboy_req:compact(Req),{ok, Req2, #state{}}.websocket_handle({text, Data}, Req, State) ->{reply, {text, Data}, Req, State};websocket_handle({binary, Data}, Req, State) ->{reply, {binary, Data}, Req, State};websocket_handle(_Frame, Req, State) ->{ok, Req, State}.websocket_info(_Info, Req, State) ->{ok, Req, State}.websocket_terminate(_Reason, _Req, _State) ->ok.endefdefine tpl_ranch_protocol-module($(n)).-behaviour(ranch_protocol).-export([start_link/4]).-export([init/4]).-type opts() :: [].-export_type([opts/0]).-record(state, {socket :: inet:socket(),transport :: module()}).start_link(Ref, Socket, Transport, Opts) ->Pid = spawn_link(?MODULE, init, [Ref, Socket, Transport, Opts]),{ok, Pid}.-spec init(ranch:ref(), inet:socket(), module(), opts()) -> ok.init(Ref, Socket, Transport, _Opts) ->ok = ranch:accept_ack(Ref),loop(#state{socket=Socket, transport=Transport}).loop(State) ->loop(State).endef# Plugin-specific targets.ifndef WSifdef SPWS = $(subst a,,a $(wordlist 1,$(SP),a a a a a a a a a a a a a a a a a a a a))elseWS = $(tab)endifendifbootstrap:ifneq ($(wildcard src/),)$(error Error: src/ directory already exists)endif$(eval p := $(PROJECT))$(if $(shell echo $p | LC_ALL=C grep -x "[a-z0-9_]*"),,\$(error Error: Invalid characters in the application name))$(eval n := $(PROJECT)_sup)$(verbose) $(call core_render,bs_Makefile,Makefile)$(verbose) echo "include erlang.mk" >> Makefile$(verbose) mkdir src/ifdef LEGACY$(verbose) $(call core_render,bs_appsrc,src/$(PROJECT).app.src)endif$(verbose) $(call core_render,bs_app,src/$(PROJECT)_app.erl)$(verbose) $(call core_render,tpl_supervisor,src/$(PROJECT)_sup.erl)bootstrap-lib:ifneq ($(wildcard src/),)$(error Error: src/ directory already exists)endif$(eval p := $(PROJECT))$(if $(shell echo $p | LC_ALL=C grep -x "[a-z0-9_]*"),,\$(error Error: Invalid characters in the application name))$(verbose) $(call core_render,bs_Makefile,Makefile)$(verbose) echo "include erlang.mk" >> Makefile$(verbose) mkdir src/ifdef LEGACY$(verbose) $(call core_render,bs_appsrc_lib,src/$(PROJECT).app.src)endifbootstrap-rel:ifneq ($(wildcard relx.config),)$(error Error: relx.config already exists)endififneq ($(wildcard config/),)$(error Error: config/ directory already exists)endif$(eval p := $(PROJECT))$(verbose) $(call core_render,bs_relx_config,relx.config)$(verbose) mkdir config/$(verbose) $(call core_render,bs_sys_config,config/sys.config)$(verbose) $(call core_render,bs_vm_args,config/vm.args)$(verbose) awk '/^include erlang.mk/ && !ins {print "BUILD_DEPS += relx";ins=1};{print}' Makefile > Makefile.bak$(verbose) mv Makefile.bak Makefilenew-app:ifndef in$(error Usage: $(MAKE) new-app in=APP)endififneq ($(wildcard $(APPS_DIR)/$in),)$(error Error: Application $in already exists)endif$(eval p := $(in))$(if $(shell echo $p | LC_ALL=C grep -x "[a-z0-9_]*"),,\$(error Error: Invalid characters in the application name))$(eval n := $(in)_sup)$(verbose) mkdir -p $(APPS_DIR)/$p/src/$(verbose) $(call core_render,bs_apps_Makefile,$(APPS_DIR)/$p/Makefile)ifdef LEGACY$(verbose) $(call core_render,bs_appsrc,$(APPS_DIR)/$p/src/$p.app.src)endif$(verbose) $(call core_render,bs_app,$(APPS_DIR)/$p/src/$p_app.erl)$(verbose) $(call core_render,tpl_supervisor,$(APPS_DIR)/$p/src/$p_sup.erl)new-lib:ifndef in$(error Usage: $(MAKE) new-lib in=APP)endififneq ($(wildcard $(APPS_DIR)/$in),)$(error Error: Application $in already exists)endif$(eval p := $(in))$(if $(shell echo $p | LC_ALL=C grep -x "[a-z0-9_]*"),,\$(error Error: Invalid characters in the application name))$(verbose) mkdir -p $(APPS_DIR)/$p/src/$(verbose) $(call core_render,bs_apps_Makefile,$(APPS_DIR)/$p/Makefile)ifdef LEGACY$(verbose) $(call core_render,bs_appsrc_lib,$(APPS_DIR)/$p/src/$p.app.src)endifnew:ifeq ($(wildcard src/)$(in),)$(error Error: src/ directory does not exist)endififndef t$(error Usage: $(MAKE) new t=TEMPLATE n=NAME [in=APP])endififndef n$(error Usage: $(MAKE) new t=TEMPLATE n=NAME [in=APP])endififdef in$(verbose) $(call core_render,tpl_$(t),$(APPS_DIR)/$(in)/src/$(n).erl)else$(verbose) $(call core_render,tpl_$(t),src/$(n).erl)endiflist-templates:$(verbose) @echo Available templates:$(verbose) printf " %s\n" $(sort $(patsubst tpl_%,%,$(filter tpl_%,$(.VARIABLES))))# Copyright (c) 2014-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: clean-c_src distclean-c_src-env# Configuration.C_SRC_DIR ?= $(CURDIR)/c_srcC_SRC_ENV ?= $(C_SRC_DIR)/env.mkC_SRC_OUTPUT ?= $(CURDIR)/priv/$(PROJECT)C_SRC_TYPE ?= shared# System type and C compiler/flags.ifeq ($(PLATFORM),msys2)C_SRC_OUTPUT_EXECUTABLE_EXTENSION ?= .exeC_SRC_OUTPUT_SHARED_EXTENSION ?= .dllC_SRC_OUTPUT_STATIC_EXTENSION ?= .libelseC_SRC_OUTPUT_EXECUTABLE_EXTENSION ?=C_SRC_OUTPUT_SHARED_EXTENSION ?= .soC_SRC_OUTPUT_STATIC_EXTENSION ?= .aendififeq ($(C_SRC_TYPE),shared)C_SRC_OUTPUT_FILE = $(C_SRC_OUTPUT)$(C_SRC_OUTPUT_SHARED_EXTENSION)else ifeq ($(C_SRC_TYPE),static)C_SRC_OUTPUT_FILE = $(C_SRC_OUTPUT)$(C_SRC_OUTPUT_STATIC_EXTENSION)elseC_SRC_OUTPUT_FILE = $(C_SRC_OUTPUT)$(C_SRC_OUTPUT_EXECUTABLE_EXTENSION)endifRANLIB ?= ranlibARFLAGS ?= crifeq ($(PLATFORM),msys2)# We hardcode the compiler used on MSYS2. The default CC=cc does# not produce working code. The "gcc" MSYS2 package also doesn't.CC = /mingw64/bin/gccexport CCCFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypesCXXFLAGS ?= -O3 -finline-functions -Wallelse ifeq ($(PLATFORM),darwin)CC ?= ccCFLAGS ?= -O3 -std=c99 -Wall -Wmissing-prototypesCXXFLAGS ?= -O3 -WallLDFLAGS ?= -flat_namespace -undefined suppresselse ifeq ($(PLATFORM),freebsd)CC ?= ccCFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypesCXXFLAGS ?= -O3 -finline-functions -Wallelse ifeq ($(PLATFORM),linux)CC ?= gccCFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypesCXXFLAGS ?= -O3 -finline-functions -Wallendififneq ($(PLATFORM),msys2)CFLAGS += -fPICCXXFLAGS += -fPICendififeq ($(C_SRC_TYPE),static)CFLAGS += -DSTATIC_ERLANG_NIF=1CXXFLAGS += -DSTATIC_ERLANG_NIF=1endifCFLAGS += -I"$(ERTS_INCLUDE_DIR)" -I"$(ERL_INTERFACE_INCLUDE_DIR)"CXXFLAGS += -I"$(ERTS_INCLUDE_DIR)" -I"$(ERL_INTERFACE_INCLUDE_DIR)"LDLIBS += -L"$(ERL_INTERFACE_LIB_DIR)" -lei# Verbosity.c_verbose_0 = @echo " C " $(filter-out $(notdir $(MAKEFILE_LIST) $(C_SRC_ENV)),$(^F));c_verbose = $(c_verbose_$(V))cpp_verbose_0 = @echo " CPP " $(filter-out $(notdir $(MAKEFILE_LIST) $(C_SRC_ENV)),$(^F));cpp_verbose = $(cpp_verbose_$(V))link_verbose_0 = @echo " LD " $(@F);link_verbose = $(link_verbose_$(V))ar_verbose_0 = @echo " AR " $(@F);ar_verbose = $(ar_verbose_$(V))ranlib_verbose_0 = @echo " RANLIB" $(@F);ranlib_verbose = $(ranlib_verbose_$(V))# Targets.ifeq ($(wildcard $(C_SRC_DIR)),)else ifneq ($(wildcard $(C_SRC_DIR)/Makefile),)app:: app-c_srctest-build:: app-c_srcapp-c_src:$(MAKE) -C $(C_SRC_DIR)clean::$(MAKE) -C $(C_SRC_DIR) cleanelseifeq ($(SOURCES),)SOURCES := $(sort $(foreach pat,*.c *.C *.cc *.cpp,$(call core_find,$(C_SRC_DIR)/,$(pat))))endifOBJECTS = $(addsuffix .o, $(basename $(SOURCES)))COMPILE_C = $(c_verbose) $(CC) $(CFLAGS) $(CPPFLAGS) -cCOMPILE_CPP = $(cpp_verbose) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -capp:: $(C_SRC_ENV) $(C_SRC_OUTPUT_FILE)test-build:: $(C_SRC_ENV) $(C_SRC_OUTPUT_FILE)ifneq ($(C_SRC_TYPE),static)$(C_SRC_OUTPUT_FILE): $(OBJECTS)$(verbose) mkdir -p $(dir $@)$(link_verbose) $(CC) $(OBJECTS) \$(LDFLAGS) $(if $(filter $(C_SRC_TYPE),shared),-shared) $(LDLIBS) \-o $(C_SRC_OUTPUT_FILE)else$(C_SRC_OUTPUT_FILE): $(OBJECTS)$(verbose) mkdir -p $(dir $@)$(ar_verbose) $(AR) $(ARFLAGS) $(C_SRC_OUTPUT_FILE) $(OBJECTS)$(ranlib_verbose) $(RANLIB) $(C_SRC_OUTPUT_FILE)endif$(OBJECTS): $(MAKEFILE_LIST) $(C_SRC_ENV)%.o: %.c$(COMPILE_C) $(OUTPUT_OPTION) $<%.o: %.cc$(COMPILE_CPP) $(OUTPUT_OPTION) $<%.o: %.C$(COMPILE_CPP) $(OUTPUT_OPTION) $<%.o: %.cpp$(COMPILE_CPP) $(OUTPUT_OPTION) $<clean:: clean-c_srcclean-c_src:$(gen_verbose) rm -f $(C_SRC_OUTPUT_FILE) $(OBJECTS)endififneq ($(wildcard $(C_SRC_DIR)),)ERL_ERTS_DIR = $(shell $(ERL) -eval 'io:format("~s~n", [code:lib_dir(erts)]), halt().')$(C_SRC_ENV):$(verbose) $(ERL) -eval "file:write_file(\"$(call core_native_path,$(C_SRC_ENV))\", \io_lib:format( \\"# Generated by Erlang.mk. Edit at your own risk!~n~n\" \\"ERTS_INCLUDE_DIR ?= ~s/erts-~s/include/~n\" \\"ERL_INTERFACE_INCLUDE_DIR ?= ~s~n\" \\"ERL_INTERFACE_LIB_DIR ?= ~s~n\" \\"ERTS_DIR ?= $(ERL_ERTS_DIR)~n\", \[code:root_dir(), erlang:system_info(version), \code:lib_dir(erl_interface, include), \code:lib_dir(erl_interface, lib)])), \halt()."distclean:: distclean-c_src-envdistclean-c_src-env:$(gen_verbose) rm -f $(C_SRC_ENV)-include $(C_SRC_ENV)ifneq ($(ERL_ERTS_DIR),$(ERTS_DIR))$(shell rm -f $(C_SRC_ENV))endifendif# Templates.define bs_c_nif#include "erl_nif.h"static int loads = 0;static int load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info){/* Initialize private data. */*priv_data = NULL;loads++;return 0;}static int upgrade(ErlNifEnv* env, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info){/* Convert the private data to the new version. */*priv_data = *old_priv_data;loads++;return 0;}static void unload(ErlNifEnv* env, void* priv_data){if (loads == 1) {/* Destroy the private data. */}loads--;}static ERL_NIF_TERM hello(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]){if (enif_is_atom(env, argv[0])) {return enif_make_tuple2(env,enif_make_atom(env, "hello"),argv[0]);}return enif_make_tuple2(env,enif_make_atom(env, "error"),enif_make_atom(env, "badarg"));}static ErlNifFunc nif_funcs[] = {{"hello", 1, hello}};ERL_NIF_INIT($n, nif_funcs, load, NULL, upgrade, unload)endefdefine bs_erl_nif-module($n).-export([hello/1]).-on_load(on_load/0).on_load() ->PrivDir = case code:priv_dir(?MODULE) of{error, _} ->AppPath = filename:dirname(filename:dirname(code:which(?MODULE))),filename:join(AppPath, "priv");Path ->Pathend,erlang:load_nif(filename:join(PrivDir, atom_to_list(?MODULE)), 0).hello(_) ->erlang:nif_error({not_loaded, ?MODULE}).endefnew-nif:ifneq ($(wildcard $(C_SRC_DIR)/$n.c),)$(error Error: $(C_SRC_DIR)/$n.c already exists)endififneq ($(wildcard src/$n.erl),)$(error Error: src/$n.erl already exists)endififndef n$(error Usage: $(MAKE) new-nif n=NAME [in=APP])endififdef in$(verbose) $(MAKE) -C $(APPS_DIR)/$(in)/ new-nif n=$n in=else$(verbose) mkdir -p $(C_SRC_DIR) src/$(verbose) $(call core_render,bs_c_nif,$(C_SRC_DIR)/$n.c)$(verbose) $(call core_render,bs_erl_nif,src/$n.erl)endif# Copyright (c) 2015-2017, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: ci ci-prepare ci-setupCI_OTP ?=ifeq ($(strip $(CI_OTP)),)ci::elseci:: $(addprefix ci-,$(CI_OTP))ci-prepare: $(addprefix $(KERL_INSTALL_DIR)/,$(CI_OTP))ci-setup::$(verbose) :ci-extra::$(verbose) :ci_verbose_0 = @echo " CI " $(1);ci_verbose = $(ci_verbose_$(V))define ci_targetci-$1: $(KERL_INSTALL_DIR)/$2$(verbose) $(MAKE) --no-print-directory clean$(ci_verbose) \PATH="$(KERL_INSTALL_DIR)/$2/bin:$(PATH)" \CI_OTP_RELEASE="$1" \CT_OPTS="-label $1" \CI_VM="$3" \$(MAKE) ci-setup tests$(verbose) $(MAKE) --no-print-directory ci-extraendef$(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp),$(otp),otp)))$(foreach otp,$(filter-out $(ERLANG_OTP),$(CI_OTP)),$(eval $(call kerl_otp_target,$(otp))))help::$(verbose) printf "%s\n" "" \"Continuous Integration targets:" \" ci Run '$(MAKE) tests' on all configured Erlang versions." \"" \"The CI_OTP variable must be defined with the Erlang versions" \"that must be tested. For example: CI_OTP = OTP-17.3.4 OTP-17.5.3"endif# Copyright (c) 2020, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.ifdef CONCUERROR_TESTS.PHONY: concuerror distclean-concuerror# ConfigurationCONCUERROR_LOGS_DIR ?= $(CURDIR)/logsCONCUERROR_OPTS ?=# Core targets.check:: concuerrorifndef KEEP_LOGSdistclean:: distclean-concuerrorendif# Plugin-specific targets.$(ERLANG_MK_TMP)/Concuerror/bin/concuerror: | $(ERLANG_MK_TMP)$(verbose) git clone https://github.com/parapluu/Concuerror $(ERLANG_MK_TMP)/Concuerror$(verbose) $(MAKE) -C $(ERLANG_MK_TMP)/Concuerror$(CONCUERROR_LOGS_DIR):$(verbose) mkdir -p $(CONCUERROR_LOGS_DIR)define concuerror_html_report<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Concuerror HTML report</title></head><body><h1>Concuerror HTML report</h1><p>Generated on $(concuerror_date)</p><ul>$(foreach t,$(concuerror_targets),<li><a href="$(t).txt">$(t)</a></li>)</ul></body></html>endefconcuerror: $(addprefix concuerror-,$(subst :,-,$(CONCUERROR_TESTS)))$(eval concuerror_date := $(shell date))$(eval concuerror_targets := $^)$(verbose) $(call core_render,concuerror_html_report,$(CONCUERROR_LOGS_DIR)/concuerror.html)define concuerror_target.PHONY: concuerror-$1-$2concuerror-$1-$2: test-build | $(ERLANG_MK_TMP)/Concuerror/bin/concuerror $(CONCUERROR_LOGS_DIR)$(ERLANG_MK_TMP)/Concuerror/bin/concuerror \--pa $(CURDIR)/ebin --pa $(TEST_DIR) \-o $(CONCUERROR_LOGS_DIR)/concuerror-$1-$2.txt \$$(CONCUERROR_OPTS) -m $1 -t $2endef$(foreach test,$(CONCUERROR_TESTS),$(eval $(call concuerror_target,$(firstword $(subst :, ,$(test))),$(lastword $(subst :, ,$(test))))))distclean-concuerror:$(gen_verbose) rm -rf $(CONCUERROR_LOGS_DIR)endif# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: ct apps-ct distclean-ct# Configuration.CT_OPTS ?=ifneq ($(wildcard $(TEST_DIR)),)ifndef CT_SUITESCT_SUITES := $(sort $(subst _SUITE.erl,,$(notdir $(call core_find,$(TEST_DIR)/,*_SUITE.erl))))endifendifCT_SUITES ?=CT_LOGS_DIR ?= $(CURDIR)/logs# Core targets.tests:: ctifndef KEEP_LOGSdistclean:: distclean-ctendifhelp::$(verbose) printf "%s\n" "" \"Common_test targets:" \" ct Run all the common_test suites for this project" \"" \"All your common_test suites have their associated targets." \"A suite named http_SUITE can be ran using the ct-http target."# Plugin-specific targets.CT_RUN = ct_run \-no_auto_compile \-noinput \-pa $(CURDIR)/ebin $(TEST_DIR) \-dir $(TEST_DIR) \-logdir $(CT_LOGS_DIR)ifeq ($(CT_SUITES),)ct: $(if $(IS_APP)$(ROOT_DIR),,apps-ct)else# We do not run tests if we are in an apps/* with no test directory.ifneq ($(IS_APP)$(wildcard $(TEST_DIR)),1)ct: test-build $(if $(IS_APP)$(ROOT_DIR),,apps-ct)$(verbose) mkdir -p $(CT_LOGS_DIR)$(gen_verbose) $(CT_RUN) -sname ct_$(PROJECT) -suite $(addsuffix _SUITE,$(CT_SUITES)) $(CT_OPTS)endifendififneq ($(ALL_APPS_DIRS),)define ct_app_targetapps-ct-$1: test-build$$(MAKE) -C $1 ct IS_APP=1endef$(foreach app,$(ALL_APPS_DIRS),$(eval $(call ct_app_target,$(app))))apps-ct: $(addprefix apps-ct-,$(ALL_APPS_DIRS))endififdef tifeq (,$(findstring :,$t))CT_EXTRA = -group $telset_words = $(subst :, ,$t)CT_EXTRA = -group $(firstword $(t_words)) -case $(lastword $(t_words))endifelseifdef cCT_EXTRA = -case $celseCT_EXTRA =endifendifdefine ct_suite_targetct-$1: test-build$$(verbose) mkdir -p $$(CT_LOGS_DIR)$$(gen_verbose_esc) $$(CT_RUN) -sname ct_$$(PROJECT) -suite $$(addsuffix _SUITE,$1) $$(CT_EXTRA) $$(CT_OPTS)endef$(foreach test,$(CT_SUITES),$(eval $(call ct_suite_target,$(test))))distclean-ct:$(gen_verbose) rm -rf $(CT_LOGS_DIR)# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: plt distclean-plt dialyze# Configuration.DIALYZER_PLT ?= $(CURDIR)/.$(PROJECT).pltexport DIALYZER_PLTPLT_APPS ?=DIALYZER_DIRS ?= --src -r $(wildcard src) $(ALL_APPS_DIRS)DIALYZER_OPTS ?= -Werror_handling -Wunmatched_returns # -WunderspecsDIALYZER_PLT_OPTS ?=# Core targets.check:: dialyzedistclean:: distclean-plthelp::$(verbose) printf "%s\n" "" \"Dialyzer targets:" \" plt Build a PLT file for this project" \" dialyze Analyze the project using Dialyzer"# Plugin-specific targets.define filter_opts.erlOpts = init:get_plain_arguments(),{Filtered, _} = lists:foldl(fun(O, {Os, true}) -> {[O|Os], false};(O = "-D", {Os, _}) -> {[O|Os], true};(O = [\\$$-, \\$$D, _ | _], {Os, _}) -> {[O|Os], false};(O = "-I", {Os, _}) -> {[O|Os], true};(O = [\\$$-, \\$$I, _ | _], {Os, _}) -> {[O|Os], false};(O = "-pa", {Os, _}) -> {[O|Os], true};(_, Acc) -> Accend, {[], false}, Opts),io:format("~s~n", [string:join(lists:reverse(Filtered), " ")]),halt().endef# DIALYZER_PLT is a variable understood directly by Dialyzer.## We append the path to erts at the end of the PLT. This works# because the PLT file is in the external term format and the# function binary_to_term/1 ignores any trailing data.$(DIALYZER_PLT): deps app$(eval DEPS_LOG := $(shell test -f $(ERLANG_MK_TMP)/deps.log && \while read p; do test -d $$p/ebin && echo $$p/ebin; done <$(ERLANG_MK_TMP)/deps.log))$(verbose) dialyzer --build_plt $(DIALYZER_PLT_OPTS) --apps \erts kernel stdlib $(PLT_APPS) $(OTP_DEPS) $(LOCAL_DEPS) $(DEPS_LOG) || test $$? -eq 2$(verbose) $(ERL) -eval 'io:format("~n~s~n", [code:lib_dir(erts)]), halt().' >> $@plt: $(DIALYZER_PLT)distclean-plt:$(gen_verbose) rm -f $(DIALYZER_PLT)ifneq ($(wildcard $(DIALYZER_PLT)),)dialyze: $(if $(filter --src,$(DIALYZER_DIRS)),,deps app)$(verbose) if ! tail -n1 $(DIALYZER_PLT) | \grep -q "^`$(ERL) -eval 'io:format("~s", [code:lib_dir(erts)]), halt().'`$$"; then \rm $(DIALYZER_PLT); \$(MAKE) plt; \fielsedialyze: $(DIALYZER_PLT)endif$(verbose) dialyzer `$(ERL) \-eval "$(subst $(newline),,$(call escape_dquotes,$(call filter_opts.erl)))" \-extra $(ERLC_OPTS)` $(DIALYZER_DIRS) $(DIALYZER_OPTS) $(if $(wildcard ebin/),-pa ebin/)# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: distclean-edoc edoc# Configuration.EDOC_OPTS ?=EDOC_SRC_DIRS ?=EDOC_OUTPUT ?= docdefine edoc.erlSrcPaths = lists:foldl(fun(P, Acc) ->filelib:wildcard(atom_to_list(P) ++ "/{src,c_src}")++ lists:filter(fun(D) ->filelib:is_dir(D)end, filelib:wildcard(atom_to_list(P) ++ "/{src,c_src}/**"))++ Accend, [], [$(call comma_list,$(patsubst %,'%',$(call core_native_path,$(EDOC_SRC_DIRS))))]),DefaultOpts = [{dir, "$(EDOC_OUTPUT)"}, {source_path, SrcPaths}, {subpackages, false}],edoc:application($(1), ".", [$(2)] ++ DefaultOpts),halt(0).endef# Core targets.ifneq ($(strip $(EDOC_SRC_DIRS)$(wildcard doc/overview.edoc)),)docs:: edocendifdistclean:: distclean-edoc# Plugin-specific targets.edoc: distclean-edoc doc-deps$(gen_verbose) $(call erlang,$(call edoc.erl,$(PROJECT),$(EDOC_OPTS)))distclean-edoc:$(gen_verbose) rm -f $(EDOC_OUTPUT)/*.css $(EDOC_OUTPUT)/*.html $(EDOC_OUTPUT)/*.png $(EDOC_OUTPUT)/edoc-info# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.# Configuration.DTL_FULL_PATH ?=DTL_PATH ?= templates/DTL_PREFIX ?=DTL_SUFFIX ?= _dtlDTL_OPTS ?=# Verbosity.dtl_verbose_0 = @echo " DTL " $(filter %.dtl,$(?F));dtl_verbose = $(dtl_verbose_$(V))# Core targets.DTL_PATH := $(abspath $(DTL_PATH))DTL_FILES := $(sort $(call core_find,$(DTL_PATH),*.dtl))ifneq ($(DTL_FILES),)DTL_NAMES = $(addprefix $(DTL_PREFIX),$(addsuffix $(DTL_SUFFIX),$(DTL_FILES:$(DTL_PATH)/%.dtl=%)))DTL_MODULES = $(if $(DTL_FULL_PATH),$(subst /,_,$(DTL_NAMES)),$(notdir $(DTL_NAMES)))BEAM_FILES += $(addsuffix .beam,$(addprefix ebin/,$(DTL_MODULES)))ifneq ($(words $(DTL_FILES)),0)# Rebuild templates when the Makefile changes.$(ERLANG_MK_TMP)/last-makefile-change-erlydtl: $(MAKEFILE_LIST) | $(ERLANG_MK_TMP)$(verbose) if test -f $@; then \touch $(DTL_FILES); \fi$(verbose) touch $@ebin/$(PROJECT).app:: $(ERLANG_MK_TMP)/last-makefile-change-erlydtlendifdefine erlydtl_compile.erl[beginModule0 = case "$(strip $(DTL_FULL_PATH))" of"" ->filename:basename(F, ".dtl");_ ->"$(call core_native_path,$(DTL_PATH))/" ++ F2 = filename:rootname(F, ".dtl"),re:replace(F2, "/", "_", [{return, list}, global])end,Module = list_to_atom("$(DTL_PREFIX)" ++ string:to_lower(Module0) ++ "$(DTL_SUFFIX)"),case erlydtl:compile(F, Module, [$(DTL_OPTS)] ++ [{out_dir, "ebin/"}, return_errors]) ofok -> ok;{ok, _} -> okendend || F <- string:tokens("$(1)", " ")],halt().endefebin/$(PROJECT).app:: $(DTL_FILES) | ebin/$(if $(strip $?),\$(dtl_verbose) $(call erlang,$(call erlydtl_compile.erl,$(call core_native_path,$?)),\-pa ebin/))endif# Copyright (c) 2016, Loïc Hoguin <essen@ninenines.eu># Copyright (c) 2014, Dave Cottlehuber <dch@skunkwerks.at># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: distclean-escript escript escript-zip# Configuration.ESCRIPT_NAME ?= $(PROJECT)ESCRIPT_FILE ?= $(ESCRIPT_NAME)ESCRIPT_SHEBANG ?= /usr/bin/env escriptESCRIPT_COMMENT ?= This is an -*- erlang -*- fileESCRIPT_EMU_ARGS ?= -escript main $(ESCRIPT_NAME)ESCRIPT_ZIP ?= 7z a -tzip -mx=9 -mtc=off $(if $(filter-out 0,$(V)),,> /dev/null)ESCRIPT_ZIP_FILE ?= $(ERLANG_MK_TMP)/escript.zip# Core targets.distclean:: distclean-escripthelp::$(verbose) printf "%s\n" "" \"Escript targets:" \" escript Build an executable escript archive" \# Plugin-specific targets.escript-zip:: FULL=1escript-zip:: deps app$(verbose) mkdir -p $(dir $(abspath $(ESCRIPT_ZIP_FILE)))$(verbose) rm -f $(abspath $(ESCRIPT_ZIP_FILE))$(gen_verbose) cd .. && $(ESCRIPT_ZIP) $(abspath $(ESCRIPT_ZIP_FILE)) $(PROJECT)/ebin/*ifneq ($(DEPS),)$(verbose) cd $(DEPS_DIR) && $(ESCRIPT_ZIP) $(abspath $(ESCRIPT_ZIP_FILE)) \$(subst $(DEPS_DIR)/,,$(addsuffix /*,$(wildcard \$(addsuffix /ebin,$(shell cat $(ERLANG_MK_TMP)/deps.log)))))endifescript:: escript-zip$(gen_verbose) printf "%s\n" \"#!$(ESCRIPT_SHEBANG)" \"%% $(ESCRIPT_COMMENT)" \"%%! $(ESCRIPT_EMU_ARGS)" > $(ESCRIPT_FILE)$(verbose) cat $(abspath $(ESCRIPT_ZIP_FILE)) >> $(ESCRIPT_FILE)$(verbose) chmod +x $(ESCRIPT_FILE)distclean-escript:$(gen_verbose) rm -f $(ESCRIPT_FILE) $(abspath $(ESCRIPT_ZIP_FILE))# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># Copyright (c) 2014, Enrique Fernandez <enrique.fernandez@erlang-solutions.com># This file is contributed to erlang.mk and subject to the terms of the ISC License..PHONY: eunit apps-eunit# ConfigurationEUNIT_OPTS ?=EUNIT_ERL_OPTS ?=EUNIT_TEST_SPEC ?= $1# Core targets.tests:: eunithelp::$(verbose) printf "%s\n" "" \"EUnit targets:" \" eunit Run all the EUnit tests for this project"# Plugin-specific targets.define eunit.erl$(call cover.erl)CoverSetup(),case eunit:test($(call EUNIT_TEST_SPEC,$1), [$(EUNIT_OPTS)]) ofok -> ok;error -> halt(2)end,CoverExport("$(call core_native_path,$(COVER_DATA_DIR))/eunit.coverdata"),halt()endefEUNIT_ERL_OPTS += -pa $(TEST_DIR) $(CURDIR)/ebinifdef tifeq (,$(findstring :,$(t)))eunit: test-build cover-data-dir$(gen_verbose) $(call erlang,$(call eunit.erl,['$(t)']),$(EUNIT_ERL_OPTS))elseeunit: test-build cover-data-dir$(gen_verbose) $(call erlang,$(call eunit.erl,fun $(t)/0),$(EUNIT_ERL_OPTS))endifelseEUNIT_EBIN_MODS = $(notdir $(basename $(ERL_FILES) $(BEAM_FILES)))EUNIT_TEST_MODS = $(notdir $(basename $(call core_find,$(TEST_DIR)/,*.erl)))EUNIT_MODS = $(foreach mod,$(EUNIT_EBIN_MODS) $(filter-out \$(patsubst %,%_tests,$(EUNIT_EBIN_MODS)),$(EUNIT_TEST_MODS)),'$(mod)')eunit: test-build $(if $(IS_APP)$(ROOT_DIR),,apps-eunit) cover-data-dirifneq ($(wildcard src/ $(TEST_DIR)),)$(gen_verbose) $(call erlang,$(call eunit.erl,[$(call comma_list,$(EUNIT_MODS))]),$(EUNIT_ERL_OPTS))endififneq ($(ALL_APPS_DIRS),)apps-eunit: test-build$(verbose) eunit_retcode=0 ; for app in $(ALL_APPS_DIRS); do $(MAKE) -C $$app eunit IS_APP=1; \[ $$? -ne 0 ] && eunit_retcode=1 ; done ; \exit $$eunit_retcodeendifendif# Copyright (c) 2020, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.HEX_CORE_GIT ?= https://github.com/hexpm/hex_coreHEX_CORE_COMMIT ?= v0.7.0PACKAGES += hex_corepkg_hex_core_name = hex_corepkg_hex_core_description = Reference implementation of Hex specificationspkg_hex_core_homepage = $(HEX_CORE_GIT)pkg_hex_core_fetch = gitpkg_hex_core_repo = $(HEX_CORE_GIT)pkg_hex_core_commit = $(HEX_CORE_COMMIT)# We automatically depend on hex_core when the project isn't already.$(if $(filter hex_core,$(DEPS) $(BUILD_DEPS) $(DOC_DEPS) $(REL_DEPS) $(TEST_DEPS)),,\$(eval $(call dep_target,hex_core)))hex-core: $(DEPS_DIR)/hex_core$(verbose) if [ ! -e $(DEPS_DIR)/hex_core/ebin/dep_built ]; then \$(MAKE) -C $(DEPS_DIR)/hex_core IS_DEP=1; \touch $(DEPS_DIR)/hex_core/ebin/dep_built; \fi# @todo This must also apply to fetching.HEX_CONFIG ?=define hex_config.erlbeginConfig0 = hex_core:default_config(),Config0$(HEX_CONFIG)endendefdefine hex_user_create.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),case hex_api_user:create(Config, <<"$(strip $1)">>, <<"$(strip $2)">>, <<"$(strip $3)">>) of{ok, {201, _, #{<<"email">> := Email, <<"url">> := URL, <<"username">> := Username}}} ->io:format("User ~s (~s) created at ~s~n""Please check your inbox for a confirmation email.~n""You must confirm before you are allowed to publish packages.~n",[Username, Email, URL]),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(80)endendef# The $(info ) call inserts a new line after the password prompt.hex-user-create: hex-core$(if $(HEX_USERNAME),,$(eval HEX_USERNAME := $(shell read -p "Username: " username; echo $$username)))$(if $(HEX_PASSWORD),,$(eval HEX_PASSWORD := $(shell stty -echo; read -p "Password: " password; stty echo; echo $$password) $(info )))$(if $(HEX_EMAIL),,$(eval HEX_EMAIL := $(shell read -p "Email: " email; echo $$email)))$(gen_verbose) $(call erlang,$(call hex_user_create.erl,$(HEX_USERNAME),$(HEX_PASSWORD),$(HEX_EMAIL)))define hex_key_add.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => iolist_to_binary([<<"Basic ">>, base64:encode(<<"$(strip $1):$(strip $2)">>)])},Permissions = [case string:split(P, <<":">>) of[D] -> #{domain => D};[D, R] -> #{domain => D, resource => R}end|| P <- string:split(<<"$(strip $4)">>, <<",">>, all)],case hex_api_key:add(ConfigF, <<"$(strip $3)">>, Permissions) of{ok, {201, _, #{<<"secret">> := Secret}}} ->io:format("Key ~s created for user ~s~nSecret: ~s~n""Please store the secret in a secure location, such as a password store.~n""The secret will be requested for most Hex-related operations.~n",[<<"$(strip $3)">>, <<"$(strip $1)">>, Secret]),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(81)endendefhex-key-add: hex-core$(if $(HEX_USERNAME),,$(eval HEX_USERNAME := $(shell read -p "Username: " username; echo $$username)))$(if $(HEX_PASSWORD),,$(eval HEX_PASSWORD := $(shell stty -echo; read -p "Password: " password; stty echo; echo $$password) $(info )))$(gen_verbose) $(call erlang,$(call hex_key_add.erl,$(HEX_USERNAME),$(HEX_PASSWORD),\$(if $(name),$(name),$(shell hostname)-erlang-mk),\$(if $(perm),$(perm),api)))HEX_TARBALL_EXTRA_METADATA ?=# @todo Check that we can += filesHEX_TARBALL_FILES ?= \$(wildcard early-plugins.mk) \$(wildcard ebin/$(PROJECT).app) \$(wildcard ebin/$(PROJECT).appup) \$(wildcard $(notdir $(ERLANG_MK_FILENAME))) \$(sort $(call core_find,include/,*.hrl)) \$(wildcard LICENSE*) \$(wildcard Makefile) \$(wildcard plugins.mk) \$(sort $(call core_find,priv/,*)) \$(wildcard README*) \$(wildcard rebar.config) \$(sort $(call core_find,src/,*))HEX_TARBALL_OUTPUT_FILE ?= $(ERLANG_MK_TMP)/$(PROJECT).tar# @todo Need to check for rebar.config and/or the absence of DEPS to know# whether a project will work with Rebar.## @todo contributors licenses links in HEX_TARBALL_EXTRA_METADATA# In order to build the requirements metadata we look into DEPS.# We do not require that the project use Hex dependencies, however# Hex.pm does require that the package name and version numbers# correspond to a real Hex package.define hex_tarball_create.erlFiles0 = [$(call comma_list,$(patsubst %,"%",$(HEX_TARBALL_FILES)))],Requirements0 = #{$(foreach d,$(DEPS),<<"$(if $(subst hex,,$(call query_fetch_method,$d)),$d,$(if $(word 3,$(dep_$d)),$(word 3,$(dep_$d)),$d))">> => #{<<"app">> => <<"$d">>,<<"optional">> => false,<<"requirement">> => <<"$(call query_version,$d)">>},)$(if $(DEPS),dummy => dummy)},Requirements = maps:remove(dummy, Requirements0),Metadata0 = #{app => <<"$(strip $(PROJECT))">>,build_tools => [<<"make">>, <<"rebar3">>],description => <<"$(strip $(PROJECT_DESCRIPTION))">>,files => [unicode:characters_to_binary(F) || F <- Files0],name => <<"$(strip $(PROJECT))">>,requirements => Requirements,version => <<"$(strip $(PROJECT_VERSION))">>},Metadata = Metadata0$(HEX_TARBALL_EXTRA_METADATA),Files = [case file:read_file(F) of{ok, Bin} ->{F, Bin};{error, Reason} ->io:format("Error trying to open file ~0p: ~0p~n", [F, Reason]),halt(82)end || F <- Files0],case hex_tarball:create(Metadata, Files) of{ok, #{tarball := Tarball}} ->ok = file:write_file("$(strip $(HEX_TARBALL_OUTPUT_FILE))", Tarball),halt(0);{error, Reason} ->io:format("Error ~0p~n", [Reason]),halt(83)endendefhex_tar_verbose_0 = @echo " TAR $(notdir $(ERLANG_MK_TMP))/$(@F)";hex_tar_verbose_2 = set -x;hex_tar_verbose = $(hex_tar_verbose_$(V))$(HEX_TARBALL_OUTPUT_FILE): hex-core app$(hex_tar_verbose) $(call erlang,$(call hex_tarball_create.erl))hex-tarball-create: $(HEX_TARBALL_OUTPUT_FILE)define hex_release_publish_summary.erl{ok, Tarball} = erl_tar:open("$(strip $(HEX_TARBALL_OUTPUT_FILE))", [read]),ok = erl_tar:extract(Tarball, [{cwd, "$(ERLANG_MK_TMP)"}, {files, ["metadata.config"]}]),{ok, Metadata} = file:consult("$(ERLANG_MK_TMP)/metadata.config"),#{<<"name">> := Name,<<"version">> := Version,<<"files">> := Files,<<"requirements">> := Deps} = maps:from_list(Metadata),io:format("Publishing ~s ~s~n Dependencies:~n", [Name, Version]),case Deps of[] ->io:format(" (none)~n");_ ->[begin#{<<"app">> := DA, <<"requirement">> := DR} = maps:from_list(D),io:format(" ~s ~s~n", [DA, DR])end || {_, D} <- Deps]end,io:format(" Included files:~n"),[io:format(" ~s~n", [F]) || F <- Files],io:format("You may also review the contents of the tarball file.~n""Please enter your secret key to proceed.~n"),halt(0)endefdefine hex_release_publish.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => <<"$(strip $1)">>},{ok, Tarball} = file:read_file("$(strip $(HEX_TARBALL_OUTPUT_FILE))"),case hex_api_release:publish(ConfigF, Tarball, [{replace, $2}]) of{ok, {200, _, #{}}} ->io:format("Release replaced~n"),halt(0);{ok, {201, _, #{}}} ->io:format("Release published~n"),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(84)endendefhex-release-tarball: hex-core $(HEX_TARBALL_OUTPUT_FILE)$(verbose) $(call erlang,$(call hex_release_publish_summary.erl))hex-release-publish: hex-core hex-release-tarball$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_release_publish.erl,$(HEX_SECRET),false))hex-release-replace: hex-core hex-release-tarball$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_release_publish.erl,$(HEX_SECRET),true))define hex_release_delete.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => <<"$(strip $1)">>},case hex_api_release:delete(ConfigF, <<"$(strip $(PROJECT))">>, <<"$(strip $(PROJECT_VERSION))">>) of{ok, {204, _, _}} ->io:format("Release $(strip $(PROJECT_VERSION)) deleted~n"),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(85)endendefhex-release-delete: hex-core$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_release_delete.erl,$(HEX_SECRET)))define hex_release_retire.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => <<"$(strip $1)">>},Params = #{<<"reason">> => <<"$(strip $3)">>, <<"message">> => <<"$(strip $4)">>},case hex_api_release:retire(ConfigF, <<"$(strip $(PROJECT))">>, <<"$(strip $2)">>, Params) of{ok, {204, _, _}} ->io:format("Release $(strip $2) has been retired~n"),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(86)endendefhex-release-retire: hex-core$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_release_retire.erl,$(HEX_SECRET),\$(if $(HEX_VERSION),$(HEX_VERSION),$(PROJECT_VERSION)),\$(if $(HEX_REASON),$(HEX_REASON),invalid),\$(HEX_MESSAGE)))define hex_release_unretire.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => <<"$(strip $1)">>},case hex_api_release:unretire(ConfigF, <<"$(strip $(PROJECT))">>, <<"$(strip $2)">>) of{ok, {204, _, _}} ->io:format("Release $(strip $2) is not retired anymore~n"),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(87)endendefhex-release-unretire: hex-core$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_release_unretire.erl,$(HEX_SECRET),\$(if $(HEX_VERSION),$(HEX_VERSION),$(PROJECT_VERSION))))HEX_DOCS_DOC_DIR ?= doc/HEX_DOCS_TARBALL_FILES ?= $(sort $(call core_find,$(HEX_DOCS_DOC_DIR),*))HEX_DOCS_TARBALL_OUTPUT_FILE ?= $(ERLANG_MK_TMP)/$(PROJECT)-docs.tar.gz$(HEX_DOCS_TARBALL_OUTPUT_FILE): hex-core app docs$(hex_tar_verbose) tar czf $(HEX_DOCS_TARBALL_OUTPUT_FILE) -C $(HEX_DOCS_DOC_DIR) \$(HEX_DOCS_TARBALL_FILES:$(HEX_DOCS_DOC_DIR)%=%)hex-docs-tarball-create: $(HEX_DOCS_TARBALL_OUTPUT_FILE)define hex_docs_publish.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => <<"$(strip $1)">>},{ok, Tarball} = file:read_file("$(strip $(HEX_DOCS_TARBALL_OUTPUT_FILE))"),case hex_api:post(ConfigF,["packages", "$(strip $(PROJECT))", "releases", "$(strip $(PROJECT_VERSION))", "docs"],{"application/octet-stream", Tarball}) of{ok, {Status, _, _}} when Status >= 200, Status < 300 ->io:format("Docs published~n"),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(88)endendefhex-docs-publish: hex-core hex-docs-tarball-create$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_docs_publish.erl,$(HEX_SECRET)))define hex_docs_delete.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => <<"$(strip $1)">>},case hex_api:delete(ConfigF,["packages", "$(strip $(PROJECT))", "releases", "$(strip $2)", "docs"]) of{ok, {Status, _, _}} when Status >= 200, Status < 300 ->io:format("Docs removed~n"),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(89)endendefhex-docs-delete: hex-core$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_docs_delete.erl,$(HEX_SECRET),\$(if $(HEX_VERSION),$(HEX_VERSION),$(PROJECT_VERSION))))# Copyright (c) 2015-2017, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.ifeq ($(filter proper,$(DEPS) $(TEST_DEPS)),proper).PHONY: proper# Targets.tests:: properdefine proper_check.erl$(call cover.erl)code:add_pathsa(["$(call core_native_path,$(CURDIR)/ebin)","$(call core_native_path,$(DEPS_DIR)/*/ebin)","$(call core_native_path,$(TEST_DIR))"]),Module = fun(M) ->[true] =:= lists:usort([case atom_to_list(F) of"prop_" ++ _ ->io:format("Testing ~p:~p/0~n", [M, F]),proper:quickcheck(M:F(), nocolors);_ ->trueend|| {F, 0} <- M:module_info(exports)])end,try beginCoverSetup(),Res = case $(1) ofall -> [true] =:= lists:usort([Module(M) || M <- [$(call comma_list,$(3))]]);module -> Module($(2));function -> proper:quickcheck($(2), nocolors)end,CoverExport("$(COVER_DATA_DIR)/proper.coverdata"),Resend oftrue -> halt(0);_ -> halt(1)catch error:undef$(if $V,:Stacktrace) ->io:format("Undefined property or module?~n$(if $V,~p~n)", [$(if $V,Stacktrace)]),halt(0)end.endefifdef tifeq (,$(findstring :,$(t)))proper: test-build cover-data-dir$(verbose) $(call erlang,$(call proper_check.erl,module,$(t)))elseproper: test-build cover-data-dir$(verbose) echo Testing $(t)/0$(verbose) $(call erlang,$(call proper_check.erl,function,$(t)()))endifelseproper: test-build cover-data-dir$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \$(wildcard ebin/*.beam) $(call core_find,$(TEST_DIR)/,*.beam))))))$(gen_verbose) $(call erlang,$(call proper_check.erl,all,undefined,$(MODULES)))endifendif# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.# Verbosity.proto_verbose_0 = @echo " PROTO " $(filter %.proto,$(?F));proto_verbose = $(proto_verbose_$(V))# Core targets.ifneq ($(wildcard src/),)ifneq ($(filter gpb protobuffs,$(BUILD_DEPS) $(DEPS)),)PROTO_FILES := $(filter %.proto,$(ALL_SRC_FILES))ERL_FILES += $(addprefix src/,$(patsubst %.proto,%_pb.erl,$(notdir $(PROTO_FILES))))ifeq ($(PROTO_FILES),)$(ERLANG_MK_TMP)/last-makefile-change-protobuffs:$(verbose) :else# Rebuild proto files when the Makefile changes.# We exclude $(PROJECT).d to avoid a circular dependency.$(ERLANG_MK_TMP)/last-makefile-change-protobuffs: $(filter-out $(PROJECT).d,$(MAKEFILE_LIST)) | $(ERLANG_MK_TMP)$(verbose) if test -f $@; then \touch $(PROTO_FILES); \fi$(verbose) touch $@$(PROJECT).d:: $(ERLANG_MK_TMP)/last-makefile-change-protobuffsendififeq ($(filter gpb,$(BUILD_DEPS) $(DEPS)),)define compile_proto.erl[beginprotobuffs_compile:generate_source(F, [{output_include_dir, "./include"},{output_src_dir, "./src"}])end || F <- string:tokens("$1", " ")],halt().endefelsedefine compile_proto.erl[begingpb_compile:file(F, [$(foreach i,$(sort $(dir $(PROTO_FILES))),{i$(comma) "$i"}$(comma)){include_as_lib, true},{module_name_suffix, "_pb"},{o_hrl, "./include"},{o_erl, "./src"},{use_packages, true}])end || F <- string:tokens("$1", " ")],halt().endefendififneq ($(PROTO_FILES),)$(PROJECT).d:: $(PROTO_FILES)$(verbose) mkdir -p ebin/ include/$(if $(strip $?),$(proto_verbose) $(call erlang,$(call compile_proto.erl,$?)))endifendifendif# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.ifeq ($(filter relx,$(BUILD_DEPS) $(DEPS) $(REL_DEPS)),relx).PHONY: relx-rel relx-relup distclean-relx-rel run# Configuration.RELX_CONFIG ?= $(CURDIR)/relx.configRELX_CONFIG_SCRIPT ?= $(CURDIR)/relx.config.scriptRELX_OUTPUT_DIR ?= _relRELX_REL_EXT ?=RELX_TAR ?= 1ifdef SFXRELX_TAR = 1endif# Core targets.ifeq ($(IS_DEP),)ifneq ($(wildcard $(RELX_CONFIG))$(wildcard $(RELX_CONFIG_SCRIPT)),)rel:: relx-relrelup:: relx-relupendifendifdistclean:: distclean-relx-rel# Plugin-specific targets.define relx_get_config.erl(fun() ->Config0 =case file:consult("$(call core_native_path,$(RELX_CONFIG))") of{ok, Terms} ->Terms;{error, _} ->[]end,case filelib:is_file("$(call core_native_path,$(RELX_CONFIG_SCRIPT))") oftrue ->Bindings = erl_eval:add_binding('CONFIG', Config0, erl_eval:new_bindings()),{ok, Config1} = file:script("$(call core_native_path,$(RELX_CONFIG_SCRIPT))", Bindings),Config1;false ->Config0endend)()endefdefine relx_release.erlConfig = $(call relx_get_config.erl),{release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),Vsn = case Vsn0 of{cmd, Cmd} -> os:cmd(Cmd);semver -> "";{semver, _} -> "";{git, short} -> string:trim(os:cmd("git rev-parse --short HEAD"), both, "\n");{git, long} -> string:trim(os:cmd("git rev-parse HEAD"), both, "\n");VsnStr -> Vsn0end,{ok, _} = relx:build_release(#{name => Name, vsn => Vsn}, Config ++ [{output_dir, "$(RELX_OUTPUT_DIR)"}]),halt(0).endefdefine relx_tar.erlConfig = $(call relx_get_config.erl),{release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),Vsn = case Vsn0 of{cmd, Cmd} -> os:cmd(Cmd);semver -> "";{semver, _} -> "";{git, short} -> string:trim(os:cmd("git rev-parse --short HEAD"), both, "\n");{git, long} -> string:trim(os:cmd("git rev-parse HEAD"), both, "\n");VsnStr -> Vsn0end,{ok, _} = relx:build_tar(#{name => Name, vsn => Vsn}, Config ++ [{output_dir, "$(RELX_OUTPUT_DIR)"}]),halt(0).endefdefine relx_relup.erlConfig = $(call relx_get_config.erl),{release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),Vsn = case Vsn0 of{cmd, Cmd} -> os:cmd(Cmd);semver -> "";{semver, _} -> "";{git, short} -> string:trim(os:cmd("git rev-parse --short HEAD"), both, "\n");{git, long} -> string:trim(os:cmd("git rev-parse HEAD"), both, "\n");VsnStr -> Vsn0end,{ok, _} = relx:build_relup(Name, Vsn, undefined, Config ++ [{output_dir, "$(RELX_OUTPUT_DIR)"}]),halt(0).endefrelx-rel: rel-deps app$(call erlang,$(call relx_release.erl),-pa ebin/)$(verbose) $(MAKE) relx-post-relifeq ($(RELX_TAR),1)$(call erlang,$(call relx_tar.erl),-pa ebin/)endifrelx-relup: rel-deps app$(call erlang,$(call relx_release.erl),-pa ebin/)$(MAKE) relx-post-rel$(call erlang,$(call relx_relup.erl),-pa ebin/)ifeq ($(RELX_TAR),1)$(call erlang,$(call relx_tar.erl),-pa ebin/)endifdistclean-relx-rel:$(gen_verbose) rm -rf $(RELX_OUTPUT_DIR)# Default hooks.relx-post-rel::$(verbose) :# Run target.ifeq ($(wildcard $(RELX_CONFIG))$(wildcard $(RELX_CONFIG_SCRIPT)),)run::elsedefine get_relx_release.erlConfig = $(call relx_get_config.erl),{release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),Vsn = case Vsn0 of{cmd, Cmd} -> os:cmd(Cmd);semver -> "";{semver, _} -> "";{git, short} -> string:trim(os:cmd("git rev-parse --short HEAD"), both, "\n");{git, long} -> string:trim(os:cmd("git rev-parse HEAD"), both, "\n");VsnStr -> Vsn0end,Extended = case lists:keyfind(extended_start_script, 1, Config) of{_, true} -> "1";_ -> ""end,io:format("~s ~s ~s", [Name, Vsn, Extended]),halt(0).endefRELX_REL := $(shell $(call erlang,$(get_relx_release.erl)))RELX_REL_NAME := $(word 1,$(RELX_REL))RELX_REL_VSN := $(word 2,$(RELX_REL))RELX_REL_CMD := $(if $(word 3,$(RELX_REL)),console)ifeq ($(PLATFORM),msys2)RELX_REL_EXT := .cmdendifrun:: all$(verbose) $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/bin/$(RELX_REL_NAME)$(RELX_REL_EXT) $(RELX_REL_CMD)ifdef RELOADrel::$(verbose) $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/bin/$(RELX_REL_NAME)$(RELX_REL_EXT) ping$(verbose) $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/bin/$(RELX_REL_NAME)$(RELX_REL_EXT) \eval "io:format(\"~p~n\", [c:lm()])."endifhelp::$(verbose) printf "%s\n" "" \"Relx targets:" \" run Compile the project, build the release and run it"endifendif# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># Copyright (c) 2014, M Robert Martin <rob@version2beta.com># This file is contributed to erlang.mk and subject to the terms of the ISC License..PHONY: shell# Configuration.SHELL_ERL ?= erlSHELL_PATHS ?= $(CURDIR)/ebin $(TEST_DIR)SHELL_OPTS ?=ALL_SHELL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(SHELL_DEPS))# Core targetshelp::$(verbose) 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))))ifneq ($(SKIP_DEPS),)build-shell-deps:elsebuild-shell-deps: $(ALL_SHELL_DEPS_DIRS)$(verbose) set -e; for dep in $(ALL_SHELL_DEPS_DIRS) ; do \if [ -z "$(strip $(FULL))" ] && [ ! -L $$dep ] && [ -f $$dep/ebin/dep_built ]; then \:; \else \$(MAKE) -C $$dep IS_DEP=1; \if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \fi \doneendifshell:: build-shell-deps$(gen_verbose) $(SHELL_ERL) -pa $(SHELL_PATHS) $(SHELL_OPTS)# Copyright 2017, Stanislaw Klekot <dozzie@jarowit.net># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: distclean-sphinx sphinx# Configuration.SPHINX_BUILD ?= sphinx-buildSPHINX_SOURCE ?= docSPHINX_CONFDIR ?=SPHINX_FORMATS ?= htmlSPHINX_DOCTREES ?= $(ERLANG_MK_TMP)/sphinx.doctreesSPHINX_OPTS ?=#sphinx_html_opts =#sphinx_html_output = html#sphinx_man_opts =#sphinx_man_output = man#sphinx_latex_opts =#sphinx_latex_output = latex# Helpers.sphinx_build_0 = @echo " SPHINX" $1; $(SPHINX_BUILD) -N -qsphinx_build_1 = $(SPHINX_BUILD) -Nsphinx_build_2 = set -x; $(SPHINX_BUILD)sphinx_build = $(sphinx_build_$(V))define sphinx.build$(call sphinx_build,$1) -b $1 -d $(SPHINX_DOCTREES) $(if $(SPHINX_CONFDIR),-c $(SPHINX_CONFDIR)) $(SPHINX_OPTS) $(sphinx_$1_opts) -- $(SPHINX_SOURCE) $(call sphinx.output,$1)endefdefine sphinx.output$(if $(sphinx_$1_output),$(sphinx_$1_output),$1)endef# Targets.ifneq ($(wildcard $(if $(SPHINX_CONFDIR),$(SPHINX_CONFDIR),$(SPHINX_SOURCE))/conf.py),)docs:: sphinxdistclean:: distclean-sphinxendifhelp::$(verbose) printf "%s\n" "" \"Sphinx targets:" \" sphinx Generate Sphinx documentation." \"" \"ReST sources and 'conf.py' file are expected in directory pointed by" \"SPHINX_SOURCE ('doc' by default). SPHINX_FORMATS lists formats to build (only" \"'html' format is generated by default); target directory can be specified by" \'setting sphinx_$${format}_output, for example: sphinx_html_output = output/html' \"Additional Sphinx options can be set in SPHINX_OPTS."# Plugin-specific targets.sphinx:$(foreach F,$(SPHINX_FORMATS),$(call sphinx.build,$F))distclean-sphinx:$(gen_verbose) rm -rf $(filter-out $(SPHINX_SOURCE),$(foreach F,$(SPHINX_FORMATS),$(call sphinx.output,$F)))# Copyright (c) 2017, Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com># This file is contributed to erlang.mk and subject to the terms of the ISC License..PHONY: show-ERL_LIBS show-ERLC_OPTS show-TEST_ERLC_OPTSshow-ERL_LIBS:@echo $(ERL_LIBS)show-ERLC_OPTS:@$(foreach opt,$(ERLC_OPTS) -pa ebin -I include,echo "$(opt)";)show-TEST_ERLC_OPTS:@$(foreach opt,$(TEST_ERLC_OPTS) -pa ebin -I include,echo "$(opt)";)# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.ifeq ($(filter triq,$(DEPS) $(TEST_DEPS)),triq).PHONY: triq# Targets.tests:: triqdefine triq_check.erl$(call cover.erl)code:add_pathsa(["$(call core_native_path,$(CURDIR)/ebin)","$(call core_native_path,$(DEPS_DIR)/*/ebin)","$(call core_native_path,$(TEST_DIR))"]),try beginCoverSetup(),Res = case $(1) ofall -> [true] =:= lists:usort([triq:check(M) || M <- [$(call comma_list,$(3))]]);module -> triq:check($(2));function -> triq:check($(2))end,CoverExport("$(COVER_DATA_DIR)/triq.coverdata"),Resend oftrue -> halt(0);_ -> halt(1)catch error:undef$(if $V,:Stacktrace) ->io:format("Undefined property or module?~n$(if $V,~p~n)", [$(if $V,Stacktrace)]),halt(0)end.endefifdef tifeq (,$(findstring :,$(t)))triq: test-build cover-data-dir$(verbose) $(call erlang,$(call triq_check.erl,module,$(t)))elsetriq: test-build cover-data-dir$(verbose) echo Testing $(t)/0$(verbose) $(call erlang,$(call triq_check.erl,function,$(t)()))endifelsetriq: test-build cover-data-dir$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \$(wildcard ebin/*.beam) $(call core_find,$(TEST_DIR)/,*.beam))))))$(gen_verbose) $(call erlang,$(call triq_check.erl,all,undefined,$(MODULES)))endifendif# Copyright (c) 2022, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: xref# Configuration.# We do not use locals_not_used or deprecated_function_calls# because the compiler will error out by default in those# cases with Erlang.mk. Deprecated functions may make sense# in some cases but few libraries define them. We do not# use exports_not_used by default because it hinders more# than it helps library projects such as Cowboy. Finally,# undefined_functions provides little that undefined_function_calls# doesn't already provide, so it's not enabled by default.XREF_CHECKS ?= [undefined_function_calls]# Instead of predefined checks a query can be evaluated# using the Xref DSL. The $q variable is used in that case.# The scope is a list of keywords that correspond to# application directories, being essentially an easy way# to configure which applications to analyze. With:## - app: .# - apps: $(ALL_APPS_DIRS)# - deps: $(ALL_DEPS_DIRS)# - otp: Built-in Erlang/OTP applications.## The default is conservative (app) and will not be# appropriate for all types of queries (for example# application_call requires adding all applications# that might be called or they will not be found).XREF_SCOPE ?= app # apps deps otp# If the above is not enough, additional application# directories can be configured.XREF_EXTRA_APP_DIRS ?=# As well as additional non-application directories.XREF_EXTRA_DIRS ?=# Erlang.mk supports -ignore_xref([...]) with forms# {M, F, A} | {F, A} | M, the latter ignoring whole# modules. Ignores can also be provided project-wide.XREF_IGNORE ?= []# All callbacks may be ignored. Erlang.mk will ignore# them automatically for exports_not_used (unless it# is explicitly disabled by the user).XREF_IGNORE_CALLBACKS ?=# Core targets.help::$(verbose) printf '%s\n' '' \'Xref targets:' \' xref Analyze the project using Xref' \' xref q=QUERY Evaluate an Xref query'# Plugin-specific targets.define xref.erl{ok, Xref} = xref:start([]),Scope = [$(call comma_list,$(XREF_SCOPE))],AppDirs0 = [$(call comma_list,$(foreach d,$(XREF_EXTRA_APP_DIRS),"$d"))],AppDirs1 = case lists:member(otp, Scope) offalse -> AppDirs0;true ->RootDir = code:root_dir(),AppDirs0 ++ [filename:dirname(P) || P <- code:get_path(), lists:prefix(RootDir, P)]end,AppDirs2 = case lists:member(deps, Scope) offalse -> AppDirs1;true -> [$(call comma_list,$(foreach d,$(ALL_DEPS_DIRS),"$d"))] ++ AppDirs1end,AppDirs3 = case lists:member(apps, Scope) offalse -> AppDirs2;true -> [$(call comma_list,$(foreach d,$(ALL_APPS_DIRS),"$d"))] ++ AppDirs2end,AppDirs = case lists:member(app, Scope) offalse -> AppDirs3;true -> ["../$(notdir $(CURDIR))"|AppDirs3]end,[{ok, _} = xref:add_application(Xref, AppDir, [{builtins, true}]) || AppDir <- AppDirs],ExtraDirs = [$(call comma_list,$(foreach d,$(XREF_EXTRA_DIRS),"$d"))],[{ok, _} = xref:add_directory(Xref, ExtraDir, [{builtins, true}]) || ExtraDir <- ExtraDirs],ok = xref:set_library_path(Xref, code:get_path() -- (["ebin", "."] ++ AppDirs ++ ExtraDirs)),Checks = case {$1, is_list($2)} of{check, true} -> $2;{check, false} -> [$2];{query, _} -> [$2]end,FinalRes = [beginIsInformational = case $1 ofquery -> true;check ->is_tuple(Check) andalsolists:member(element(1, Check),[call, use, module_call, module_use, application_call, application_use])end,{ok, Res0} = case $1 ofcheck -> xref:analyze(Xref, Check);query -> xref:q(Xref, Check)end,Res = case IsInformational oftrue -> Res0;false ->lists:filter(fun(R) ->{Mod, InMFA, MFA} = case R of{InMFA0 = {M, _, _}, MFA0} -> {M, InMFA0, MFA0};{M, _, _} -> {M, R, R}end,Attrs = tryMod:module_info(attributes)catch error:undef ->[]end,InlineIgnores = lists:flatten([[case V ofM when is_atom(M) -> {M, '_', '_'};{F, A} -> {Mod, F, A};_ -> Vend || V <- Values]|| {ignore_xref, Values} <- Attrs]),BuiltinIgnores = [{eunit_test, wrapper_test_exported_, 0}],DoCallbackIgnores = case {Check, "$(strip $(XREF_IGNORE_CALLBACKS))"} of{exports_not_used, ""} -> true;{_, "0"} -> false;_ -> trueend,CallbackIgnores = case DoCallbackIgnores offalse -> [];true ->Behaviors = lists:flatten([[BL || {behavior, BL} <- Attrs],[BL || {behaviour, BL} <- Attrs]]),[{Mod, CF, CA} || B <- Behaviors, {CF, CA} <- B:behaviour_info(callbacks)]end,WideIgnores = ifis_list($(XREF_IGNORE)) ->[if is_atom(I) -> {I, '_', '_'}; true -> I end|| I <- $(XREF_IGNORE)];true -> [$(XREF_IGNORE)]end,Ignores = InlineIgnores ++ BuiltinIgnores ++ CallbackIgnores ++ WideIgnores,not (lists:member(InMFA, Ignores)orelse lists:member(MFA, Ignores)orelse lists:member({Mod, '_', '_'}, Ignores))end, Res0)end,case Res of[] -> ok;_ when IsInformational ->case Check of{call, {CM, CF, CA}} ->io:format("Functions that ~s:~s/~b calls:~n", [CM, CF, CA]);{use, {CM, CF, CA}} ->io:format("Function ~s:~s/~b is called by:~n", [CM, CF, CA]);{module_call, CMod} ->io:format("Modules that ~s calls:~n", [CMod]);{module_use, CMod} ->io:format("Module ~s is used by:~n", [CMod]);{application_call, CApp} ->io:format("Applications that ~s calls:~n", [CApp]);{application_use, CApp} ->io:format("Application ~s is used by:~n", [CApp]);_ when $1 =:= query ->io:format("Query ~s returned:~n", [Check])end,[case R of{{InM, InF, InA}, {M, F, A}} ->io:format("- ~s:~s/~b called by ~s:~s/~b~n",[M, F, A, InM, InF, InA]);{M, F, A} ->io:format("- ~s:~s/~b~n", [M, F, A]);ModOrApp ->io:format("- ~s~n", [ModOrApp])end || R <- Res],ok;_ ->[case {Check, R} of{undefined_function_calls, {{InM, InF, InA}, {M, F, A}}} ->io:format("Undefined function ~s:~s/~b called by ~s:~s/~b~n",[M, F, A, InM, InF, InA]);{undefined_functions, {M, F, A}} ->io:format("Undefined function ~s:~s/~b~n", [M, F, A]);{locals_not_used, {M, F, A}} ->io:format("Unused local function ~s:~s/~b~n", [M, F, A]);{exports_not_used, {M, F, A}} ->io:format("Unused exported function ~s:~s/~b~n", [M, F, A]);{deprecated_function_calls, {{InM, InF, InA}, {M, F, A}}} ->io:format("Deprecated function ~s:~s/~b called by ~s:~s/~b~n",[M, F, A, InM, InF, InA]);{deprecated_functions, {M, F, A}} ->io:format("Deprecated function ~s:~s/~b~n", [M, F, A]);_ ->io:format("~p: ~p~n", [Check, R])end || R <- Res],errorendend || Check <- Checks],stopped = xref:stop(Xref),case lists:usort(FinalRes) of[ok] -> halt(0);_ -> halt(1)endendefxref: deps appifdef q$(verbose) $(call erlang,$(call xref.erl,query,"$q"),-pa ebin/)else$(verbose) $(call erlang,$(call xref.erl,check,$(XREF_CHECKS)),-pa ebin/)endif# Copyright (c) 2016, Loïc Hoguin <essen@ninenines.eu># Copyright (c) 2015, Viktor Söderqvist <viktor@zuiderkwast.se># This file is part of erlang.mk and subject to the terms of the ISC License.COVER_REPORT_DIR ?= coverCOVER_DATA_DIR ?= $(COVER_REPORT_DIR)ifdef COVERCOVER_APPS ?= $(notdir $(ALL_APPS_DIRS))COVER_DEPS ?=COVER_EXCLUDE_MODS ?=endif# Code coverage for Common Test.ifdef COVERifdef CT_RUNifneq ($(wildcard $(TEST_DIR)),)test-build:: $(TEST_DIR)/ct.cover.spec$(TEST_DIR)/ct.cover.spec: cover-data-dir$(gen_verbose) printf "%s\n" \"{incl_app, '$(PROJECT)', details}." \"{incl_dirs, '$(PROJECT)', [\"$(call core_native_path,$(CURDIR)/ebin)\" \$(foreach a,$(COVER_APPS),$(comma) \"$(call core_native_path,$(APPS_DIR)/$a/ebin)\") \$(foreach d,$(COVER_DEPS),$(comma) \"$(call core_native_path,$(DEPS_DIR)/$d/ebin)\")]}." \'{export,"$(call core_native_path,$(abspath $(COVER_DATA_DIR))/ct.coverdata)"}.' \"{excl_mods, '$(PROJECT)', [$(call comma_list,$(COVER_EXCLUDE_MODS))]}." > $@CT_RUN += -cover $(TEST_DIR)/ct.cover.specendifendifendif# Code coverage for other tools.ifdef COVERdefine cover.erlCoverSetup = fun() ->Dirs = ["$(call core_native_path,$(CURDIR)/ebin)"$(foreach a,$(COVER_APPS),$(comma) "$(call core_native_path,$(APPS_DIR)/$a/ebin)")$(foreach d,$(COVER_DEPS),$(comma) "$(call core_native_path,$(DEPS_DIR)/$d/ebin)")],Excludes = [$(call comma_list,$(foreach e,$(COVER_EXCLUDE_MODS),"$e"))],[case file:list_dir(Dir) of{error, enotdir} -> false;{error, _} -> halt(2);{ok, Files} ->BeamFiles = [filename:join(Dir, File) ||File <- Files,not lists:member(filename:basename(File, ".beam"), Excludes),filename:extension(File) =:= ".beam"],case cover:compile_beam(BeamFiles) of{error, _} -> halt(1);_ -> trueendend || Dir <- Dirs]end,CoverExport = fun(Filename) -> cover:export(Filename) end,endefelsedefine cover.erlCoverSetup = fun() -> ok end,CoverExport = fun(_) -> ok end,endefendif# Core targetsifdef COVERifneq ($(COVER_REPORT_DIR),)tests::$(verbose) $(MAKE) --no-print-directory cover-reportendifcover-data-dir: | $(COVER_DATA_DIR)$(COVER_DATA_DIR):$(verbose) mkdir -p $(COVER_DATA_DIR)elsecover-data-dir:endifclean:: coverdata-cleanifneq ($(COVER_REPORT_DIR),)distclean:: cover-report-cleanendifhelp::$(verbose) printf "%s\n" "" \"Cover targets:" \" cover-report Generate a HTML coverage report from previously collected" \" cover data." \" all.coverdata Merge all coverdata files into all.coverdata." \"" \"If COVER=1 is set, coverage data is generated by the targets eunit and ct. The" \"target tests additionally generates a HTML coverage report from the combined" \"coverdata files from each of these testing tools. HTML reports can be disabled" \"by setting COVER_REPORT_DIR to empty."# Plugin specific targetsCOVERDATA = $(filter-out $(COVER_DATA_DIR)/all.coverdata,$(wildcard $(COVER_DATA_DIR)/*.coverdata)).PHONY: coverdata-cleancoverdata-clean:$(gen_verbose) rm -f $(COVER_DATA_DIR)/*.coverdata $(TEST_DIR)/ct.cover.spec# Merge all coverdata files into one.define cover_export.erl$(foreach f,$(COVERDATA),cover:import("$(f)") == ok orelse halt(1),)cover:export("$(COVER_DATA_DIR)/$@"), halt(0).endefall.coverdata: $(COVERDATA) cover-data-dir$(gen_verbose) $(call erlang,$(cover_export.erl))# These are only defined if COVER_REPORT_DIR is non-empty. Set COVER_REPORT_DIR to# empty if you want the coverdata files but not the HTML report.ifneq ($(COVER_REPORT_DIR),).PHONY: cover-report-clean cover-reportcover-report-clean:$(gen_verbose) rm -rf $(COVER_REPORT_DIR)ifneq ($(COVER_REPORT_DIR),$(COVER_DATA_DIR))$(if $(shell ls -A $(COVER_DATA_DIR)/),,$(verbose) rmdir $(COVER_DATA_DIR))endififeq ($(COVERDATA),)cover-report:else# Modules which include eunit.hrl always contain one line without coverage# because eunit defines test/0 which is never called. We compensate for this.EUNIT_HRL_MODS = $(subst $(space),$(comma),$(shell \grep -H -e '^\s*-include.*include/eunit\.hrl"' src/*.erl \| sed "s/^src\/\(.*\)\.erl:.*/'\1'/" | uniq))define cover_report.erl$(foreach f,$(COVERDATA),cover:import("$(f)") == ok orelse halt(1),)Ms = cover:imported_modules(),[cover:analyse_to_file(M, "$(COVER_REPORT_DIR)/" ++ atom_to_list(M)++ ".COVER.html", [html]) || M <- Ms],Report = [begin {ok, R} = cover:analyse(M, module), R end || M <- Ms],EunitHrlMods = [$(EUNIT_HRL_MODS)],Report1 = [{M, {Y, case lists:member(M, EunitHrlMods) oftrue -> N - 1; false -> N end}} || {M, {Y, N}} <- Report],TotalY = lists:sum([Y || {_, {Y, _}} <- Report1]),TotalN = lists:sum([N || {_, {_, N}} <- Report1]),Perc = fun(Y, N) -> case Y + N of 0 -> 100; S -> round(100 * Y / S) end end,TotalPerc = Perc(TotalY, TotalN),{ok, F} = file:open("$(COVER_REPORT_DIR)/index.html", [write]),io:format(F, "<!DOCTYPE html><html>~n""<head><meta charset=\"UTF-8\">~n""<title>Coverage report</title></head>~n""<body>~n", []),io:format(F, "<h1>Coverage</h1>~n<p>Total: ~p%</p>~n", [TotalPerc]),io:format(F, "<table><tr><th>Module</th><th>Coverage</th></tr>~n", []),[io:format(F, "<tr><td><a href=\"~p.COVER.html\">~p</a></td>""<td>~p%</td></tr>~n",[M, M, Perc(Y, N)]) || {M, {Y, N}} <- Report1],How = "$(subst $(space),$(comma)$(space),$(basename $(COVERDATA)))",Date = "$(shell date -u "+%Y-%m-%dT%H:%M:%SZ")",io:format(F, "</table>~n""<p>Generated using ~s and erlang.mk on ~s.</p>~n""</body></html>", [How, Date]),halt().endefcover-report:$(verbose) mkdir -p $(COVER_REPORT_DIR)$(gen_verbose) $(call erlang,$(cover_report.erl))endifendif # ifneq ($(COVER_REPORT_DIR),)# Copyright (c) 2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: sfxifdef RELX_RELifdef SFX# Configuration.SFX_ARCHIVE ?= $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/$(RELX_REL_NAME)-$(RELX_REL_VSN).tar.gzSFX_OUTPUT_FILE ?= $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME).run# Core targets.rel:: sfx# Plugin-specific targets.define sfx_stub#!/bin/shTMPDIR=`mktemp -d`ARCHIVE=`awk '/^__ARCHIVE_BELOW__$$/ {print NR + 1; exit 0;}' $$0`FILENAME=$$(basename $$0)REL=$${FILENAME%.*}tail -n+$$ARCHIVE $$0 | tar -xzf - -C $$TMPDIR$$TMPDIR/bin/$$REL consoleRET=$$?rm -rf $$TMPDIRexit $$RET__ARCHIVE_BELOW__endefsfx:$(verbose) $(call core_render,sfx_stub,$(SFX_OUTPUT_FILE))$(gen_verbose) cat $(SFX_ARCHIVE) >> $(SFX_OUTPUT_FILE)$(verbose) chmod +x $(SFX_OUTPUT_FILE)endifendif# Copyright (c) 2013-2017, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.# External plugins.DEP_PLUGINS ?=$(foreach p,$(DEP_PLUGINS),\$(eval $(if $(findstring /,$p),\$(call core_dep_plugin,$p,$(firstword $(subst /, ,$p))),\$(call core_dep_plugin,$p/plugins.mk,$p))))help:: help-pluginshelp-plugins::$(verbose) :# Copyright (c) 2013-2015, Loïc Hoguin <essen@ninenines.eu># Copyright (c) 2015-2016, Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com># This file is part of erlang.mk and subject to the terms of the ISC License.# Fetch dependencies recursively (without building them)..PHONY: fetch-deps fetch-doc-deps fetch-rel-deps fetch-test-deps \fetch-shell-deps.PHONY: $(ERLANG_MK_RECURSIVE_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_REL_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST)fetch-deps: $(ERLANG_MK_RECURSIVE_DEPS_LIST)fetch-doc-deps: $(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST)fetch-rel-deps: $(ERLANG_MK_RECURSIVE_REL_DEPS_LIST)fetch-test-deps: $(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST)fetch-shell-deps: $(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST)ifneq ($(SKIP_DEPS),)$(ERLANG_MK_RECURSIVE_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_REL_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST):$(verbose) :> $@else# By default, we fetch "normal" dependencies. They are also included no# matter the type of requested dependencies.## $(ALL_DEPS_DIRS) includes $(BUILD_DEPS).$(ERLANG_MK_RECURSIVE_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS)$(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS) $(ALL_DOC_DEPS_DIRS)$(ERLANG_MK_RECURSIVE_REL_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS) $(ALL_REL_DEPS_DIRS)$(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS) $(ALL_TEST_DEPS_DIRS)$(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS) $(ALL_SHELL_DEPS_DIRS)# Allow to use fetch-deps and $(DEP_TYPES) to fetch multiple types of# dependencies with a single target.ifneq ($(filter doc,$(DEP_TYPES)),)$(ERLANG_MK_RECURSIVE_DEPS_LIST): $(ALL_DOC_DEPS_DIRS)endififneq ($(filter rel,$(DEP_TYPES)),)$(ERLANG_MK_RECURSIVE_DEPS_LIST): $(ALL_REL_DEPS_DIRS)endififneq ($(filter test,$(DEP_TYPES)),)$(ERLANG_MK_RECURSIVE_DEPS_LIST): $(ALL_TEST_DEPS_DIRS)endififneq ($(filter shell,$(DEP_TYPES)),)$(ERLANG_MK_RECURSIVE_DEPS_LIST): $(ALL_SHELL_DEPS_DIRS)endifERLANG_MK_RECURSIVE_TMP_LIST := $(abspath $(ERLANG_MK_TMP)/recursive-tmp-deps-$(shell echo $$PPID).log)$(ERLANG_MK_RECURSIVE_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_REL_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST): | $(ERLANG_MK_TMP)ifeq ($(IS_APP)$(IS_DEP),)$(verbose) rm -f $(ERLANG_MK_RECURSIVE_TMP_LIST)endif$(verbose) touch $(ERLANG_MK_RECURSIVE_TMP_LIST)$(verbose) set -e; for dep in $^ ; do \if ! grep -qs ^$$dep$$ $(ERLANG_MK_RECURSIVE_TMP_LIST); then \echo $$dep >> $(ERLANG_MK_RECURSIVE_TMP_LIST); \if grep -qs -E "^[[:blank:]]*include[[:blank:]]+(erlang\.mk|.*/erlang\.mk|.*ERLANG_MK_FILENAME.*)$$" \$$dep/GNUmakefile $$dep/makefile $$dep/Makefile; then \$(MAKE) -C $$dep fetch-deps \IS_DEP=1 \ERLANG_MK_RECURSIVE_TMP_LIST=$(ERLANG_MK_RECURSIVE_TMP_LIST); \fi \fi \doneifeq ($(IS_APP)$(IS_DEP),)$(verbose) sort < $(ERLANG_MK_RECURSIVE_TMP_LIST) | \uniq > $(ERLANG_MK_RECURSIVE_TMP_LIST).sorted$(verbose) cmp -s $(ERLANG_MK_RECURSIVE_TMP_LIST).sorted $@ \|| mv $(ERLANG_MK_RECURSIVE_TMP_LIST).sorted $@$(verbose) rm -f $(ERLANG_MK_RECURSIVE_TMP_LIST).sorted$(verbose) rm $(ERLANG_MK_RECURSIVE_TMP_LIST)endifendif # ifneq ($(SKIP_DEPS),)# List dependencies recursively..PHONY: list-deps list-doc-deps list-rel-deps list-test-deps \list-shell-depslist-deps: $(ERLANG_MK_RECURSIVE_DEPS_LIST)list-doc-deps: $(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST)list-rel-deps: $(ERLANG_MK_RECURSIVE_REL_DEPS_LIST)list-test-deps: $(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST)list-shell-deps: $(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST)list-deps list-doc-deps list-rel-deps list-test-deps list-shell-deps:$(verbose) cat $^# Query dependencies recursively..PHONY: query-deps query-doc-deps query-rel-deps query-test-deps \query-shell-depsQUERY ?= name fetch_method repo versiondefine query_target$(1): $(2) clean-tmp-query.logifeq ($(IS_APP)$(IS_DEP),)$(verbose) rm -f $(4)endif$(verbose) $(foreach dep,$(3),\echo $(PROJECT): $(foreach q,$(QUERY),$(call query_$(q),$(dep))) >> $(4) ;)$(if $(filter-out query-deps,$(1)),,\$(verbose) set -e; for dep in $(3) ; do \if grep -qs ^$$$$dep$$$$ $(ERLANG_MK_TMP)/query.log; then \:; \else \echo $$$$dep >> $(ERLANG_MK_TMP)/query.log; \$(MAKE) -C $(DEPS_DIR)/$$$$dep $$@ QUERY="$(QUERY)" IS_DEP=1 || true; \fi \done)ifeq ($(IS_APP)$(IS_DEP),)$(verbose) touch $(4)$(verbose) cat $(4)endifendefclean-tmp-query.log:ifeq ($(IS_DEP),)$(verbose) rm -f $(ERLANG_MK_TMP)/query.logendif$(eval $(call query_target,query-deps,$(ERLANG_MK_RECURSIVE_DEPS_LIST),$(BUILD_DEPS) $(DEPS),$(ERLANG_MK_QUERY_DEPS_FILE)))$(eval $(call query_target,query-doc-deps,$(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST),$(DOC_DEPS),$(ERLANG_MK_QUERY_DOC_DEPS_FILE)))$(eval $(call query_target,query-rel-deps,$(ERLANG_MK_RECURSIVE_REL_DEPS_LIST),$(REL_DEPS),$(ERLANG_MK_QUERY_REL_DEPS_FILE)))$(eval $(call query_target,query-test-deps,$(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST),$(TEST_DEPS),$(ERLANG_MK_QUERY_TEST_DEPS_FILE)))$(eval $(call query_target,query-shell-deps,$(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST),$(SHELL_DEPS),$(ERLANG_MK_QUERY_SHELL_DEPS_FILE)))
{application, 'survival', [{description, "New project"},{vsn, "0.1.0"},{registered, [survival_sup]},{optional_applications, []},{mod, {survival_app, []}},{env, []}]}.{applications, [kernel,stdlib,inets,cowboy,bcrypt,thoas,sync]},{modules, ['fanout_handler','hash_handler','survival_app','survival_sup']},
PROJECT = survivalPROJECT_DESCRIPTION = New projectPROJECT_VERSION = 0.1.0# Whitespace to be used when creating files from templates.SP = 2dep_cowboy_commit = 2.10.0dep_bcrypt_commit = 1.2.1DEP_PLUGINS = cowboyERLANG_OTP = OTP-26.0.2BUILD_DEPS += relxinclude erlang.mkLOCAL_DEPS = inetsdep_thoas = git https://github.com/lpil/thoas v1.0.0DEPS = cowboy bcrypt thoas sync
# Copyright (c) 2013-2016, 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# copyright notice and this permission notice appear in all copies.## THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE..PHONY: all app apps deps search rel relup docs install-docs check tests clean distclean help erlang-mkERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))export ERLANG_MK_FILENAMEERLANG_MK_VERSION = 04c473aERLANG_MK_WITHOUT =# Make 3.81 and 3.82 are deprecated.ifeq ($(MAKELEVEL)$(MAKE_VERSION),03.81)$(warning Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html)endififeq ($(MAKELEVEL)$(MAKE_VERSION),03.82)$(warning Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html)endif# Core configuration.PROJECT ?= $(notdir $(CURDIR))PROJECT := $(strip $(PROJECT))PROJECT_VERSION ?= rollingPROJECT_MOD ?= $(PROJECT)_appPROJECT_ENV ?= []# Verbosity.V ?= 0verbose_0 = @verbose_2 = set -x;verbose = $(verbose_$(V))ifeq ($(V),3)SHELL := $(SHELL) -xendifgen_verbose_0 = @echo " GEN " $@;gen_verbose_2 = set -x;gen_verbose = $(gen_verbose_$(V))gen_verbose_esc_0 = @echo " GEN " $$@;gen_verbose_esc_2 = set -x;gen_verbose_esc = $(gen_verbose_esc_$(V))# Temporary files directory.ERLANG_MK_TMP ?= $(CURDIR)/.erlang.mkexport ERLANG_MK_TMP# "erl" command.ERL = erl +A1 -noinput -boot no_dot_erlang# Platform detection.ifeq ($(PLATFORM),)UNAME_S := $(shell uname -s)ifeq ($(UNAME_S),Linux)PLATFORM = linuxelse ifeq ($(UNAME_S),Darwin)PLATFORM = darwinelse ifeq ($(UNAME_S),SunOS)PLATFORM = solariselse ifeq ($(UNAME_S),GNU)PLATFORM = gnuelse ifeq ($(UNAME_S),FreeBSD)PLATFORM = freebsdelse ifeq ($(UNAME_S),NetBSD)PLATFORM = netbsdelse ifeq ($(UNAME_S),OpenBSD)PLATFORM = openbsdelse ifeq ($(UNAME_S),DragonFly)PLATFORM = dragonflyelse ifeq ($(shell uname -o),Msys)PLATFORM = msys2else$(error Unable to detect platform. Please open a ticket with the output of uname -a.)endifexport PLATFORMendif# Core targets.all:: deps app rel# Noop to avoid a Make warning when there's nothing to do.rel::$(verbose) :relup:: deps appcheck:: testsclean:: clean-crashdumpclean-crashdump:ifneq ($(wildcard erl_crash.dump),)$(gen_verbose) rm -f erl_crash.dumpendifdistclean:: clean distclean-tmp$(ERLANG_MK_TMP):$(verbose) mkdir -p $(ERLANG_MK_TMP)distclean-tmp:$(gen_verbose) rm -rf $(ERLANG_MK_TMP)help::$(verbose) printf "%s\n" \"erlang.mk (version $(ERLANG_MK_VERSION)) is distributed under the terms of the ISC License." \"Copyright (c) 2013-2016 Loïc Hoguin <essen@ninenines.eu>" \"" \"Usage: [V=1] $(MAKE) [target]..." \"" \"Core targets:" \" all Run deps, app and rel targets in that order" \" app Compile the project" \" deps Fetch dependencies (if needed) and compile them" \" fetch-deps Fetch dependencies recursively (if needed) without compiling them" \" list-deps List dependencies recursively on stdout" \" search q=... Search for a package in the built-in index" \" rel Build a release for this project, if applicable" \" docs Build the documentation for this project" \" install-docs Install the man pages for this project" \" check Compile and run all tests and analysis for this project" \" tests Run the tests for this project" \" clean Delete temporary and output files from most targets" \" distclean Delete all temporary and output files" \" help Display this help and exit" \" erlang-mk Update erlang.mk to the latest version"# Core functions.empty :=space := $(empty) $(empty)tab := $(empty) $(empty)comma := ,define newlineendefdefine comma_list$(subst $(space),$(comma),$(strip $(1)))endefdefine escape_dquotes$(subst ",\",$1)endef# Adding erlang.mk to make Erlang scripts who call init:get_plain_arguments() happy.define erlang$(ERL) $2 -pz $(ERLANG_MK_TMP)/rebar3/_build/prod/lib/*/ebin/ -eval "$(subst $(newline),,$(call escape_dquotes,$1))" -- erlang.mkendefifeq ($(PLATFORM),msys2)core_native_path = $(shell cygpath -m $1)elsecore_native_path = $1endifcore_http_get = curl -Lf$(if $(filter-out 0,$(V)),,s)o $(call core_native_path,$1) $2core_eq = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))# We skip files that contain spaces or '#' because they end up causing issues.core_find = $(if $(wildcard $1),$(shell find $(1:%/=%) \( -type l -o -type f \) -name $(subst *,\*,$2) -not -name "*[ \#]*"))core_lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$(1)))))))))))))))))))))))))))core_ls = $(filter-out $(1),$(shell echo $(1)))# @todo Use a solution that does not require using perl.core_relpath = $(shell perl -e 'use File::Spec; print File::Spec->abs2rel(@ARGV) . "\n"' $1 $2)define core_renderprintf -- '$(subst $(newline),\n,$(subst %,%%,$(subst ','\'',$(subst $(tab),$(WS),$(call $(1))))))\n' > $(2)endef# Automated update.ERLANG_MK_REPO ?= https://github.com/ninenines/erlang.mkERLANG_MK_COMMIT ?=ERLANG_MK_BUILD_CONFIG ?= build.configERLANG_MK_BUILD_DIR ?= .erlang.mk.builderlang-mk: WITHOUT ?= $(ERLANG_MK_WITHOUT)erlang-mk:ifdef ERLANG_MK_COMMIT$(verbose) git clone $(ERLANG_MK_REPO) $(ERLANG_MK_BUILD_DIR)$(verbose) cd $(ERLANG_MK_BUILD_DIR) && git checkout $(ERLANG_MK_COMMIT)else$(verbose) git clone --depth 1 $(ERLANG_MK_REPO) $(ERLANG_MK_BUILD_DIR)endif$(verbose) if [ -f $(ERLANG_MK_BUILD_CONFIG) ]; then cp $(ERLANG_MK_BUILD_CONFIG) $(ERLANG_MK_BUILD_DIR)/build.config; fi$(gen_verbose) $(MAKE) --no-print-directory -C $(ERLANG_MK_BUILD_DIR) WITHOUT='$(strip $(WITHOUT))' UPGRADE=1$(verbose) cp $(ERLANG_MK_BUILD_DIR)/erlang.mk ./erlang.mk$(verbose) rm -rf $(ERLANG_MK_BUILD_DIR)$(verbose) rm -rf $(ERLANG_MK_TMP)# The erlang.mk package index is bundled in the default erlang.mk build.# Search for the string "copyright" to skip to the rest of the code.# Copyright (c) 2015-2017, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: distclean-kerlKERL_INSTALL_DIR ?= $(HOME)/erlangifeq ($(strip $(KERL)),)KERL := $(ERLANG_MK_TMP)/kerl/kerlendifKERL_DIR = $(ERLANG_MK_TMP)/kerlexport KERLKERL_GIT ?= https://github.com/kerl/kerlKERL_COMMIT ?= masterKERL_MAKEFLAGS ?=OTP_GIT ?= https://github.com/erlang/otpdefine kerl_otp_target$(KERL_INSTALL_DIR)/$(1): $(KERL)$(verbose) if [ ! -d $$@ ]; then \MAKEFLAGS="$(KERL_MAKEFLAGS)" $(KERL) build git $(OTP_GIT) $(1) $(1); \$(KERL) install $(1) $(KERL_INSTALL_DIR)/$(1); \fiendef$(KERL): $(KERL_DIR)$(KERL_DIR): | $(ERLANG_MK_TMP)$(gen_verbose) git clone --depth 1 $(KERL_GIT) $(ERLANG_MK_TMP)/kerl$(verbose) cd $(ERLANG_MK_TMP)/kerl && git checkout $(KERL_COMMIT)$(verbose) chmod +x $(KERL)distclean:: distclean-kerldistclean-kerl:$(gen_verbose) rm -rf $(KERL_DIR)# Allow users to select which version of Erlang/OTP to use for a project.ifneq ($(strip $(LATEST_ERLANG_OTP)),)# In some environments it is necessary to filter out master.ERLANG_OTP := $(notdir $(lastword $(sort\$(filter-out $(KERL_INSTALL_DIR)/master $(KERL_INSTALL_DIR)/OTP_R%,\$(filter-out %-rc1 %-rc2 %-rc3,$(wildcard $(KERL_INSTALL_DIR)/*[^-native]))))))endifERLANG_OTP ?=# Use kerl to enforce a specific Erlang/OTP version for a project.ifneq ($(strip $(ERLANG_OTP)),)export PATH := $(KERL_INSTALL_DIR)/$(ERLANG_OTP)/bin:$(PATH)SHELL := env PATH=$(PATH) $(SHELL)$(eval $(call kerl_otp_target,$(ERLANG_OTP)))# Build Erlang/OTP only if it doesn't already exist.ifeq ($(wildcard $(KERL_INSTALL_DIR)/$(ERLANG_OTP))$(BUILD_ERLANG_OTP),)$(info Building Erlang/OTP $(ERLANG_OTP)... Please wait...)$(shell $(MAKE) $(KERL_INSTALL_DIR)/$(ERLANG_OTP) ERLANG_OTP=$(ERLANG_OTP) BUILD_ERLANG_OTP=1 >&2)endifendifPACKAGES += aberthpkg_aberth_name = aberthpkg_aberth_description = Generic BERT-RPC server in Erlangpkg_aberth_homepage = https://github.com/a13x/aberthpkg_aberth_fetch = gitpkg_aberth_repo = https://github.com/a13x/aberthpkg_aberth_commit = masterPACKAGES += activepkg_active_name = activepkg_active_description = Active development for Erlang: rebuild and reload source/binary files while the VM is runningpkg_active_homepage = https://github.com/proger/activepkg_active_fetch = gitpkg_active_repo = https://github.com/proger/activepkg_active_commit = masterPACKAGES += aleppopkg_aleppo_name = aleppopkg_aleppo_description = Alternative Erlang Pre-Processorpkg_aleppo_homepage = https://github.com/ErlyORM/aleppopkg_aleppo_fetch = gitpkg_aleppo_repo = https://github.com/ErlyORM/aleppopkg_aleppo_commit = masterPACKAGES += alogpkg_alog_name = alogpkg_alog_description = Simply the best logging framework for Erlangpkg_alog_homepage = https://github.com/siberian-fast-food/aloggerpkg_alog_fetch = gitpkg_alog_repo = https://github.com/siberian-fast-food/aloggerpkg_alog_commit = masterPACKAGES += annotationspkg_annotations_name = annotationspkg_annotations_description = Simple code instrumentation utilitiespkg_annotations_homepage = https://github.com/hyperthunk/annotationspkg_annotations_fetch = gitpkg_annotations_repo = https://github.com/hyperthunk/annotationspkg_annotations_commit = masterPACKAGES += apnspkg_apns_name = apnspkg_apns_description = Apple Push Notification Server for Erlangpkg_apns_homepage = http://inaka.github.com/apns4erlpkg_apns_fetch = gitpkg_apns_repo = https://github.com/inaka/apns4erlpkg_apns_commit = masterPACKAGES += asciideckpkg_asciideck_name = asciideckpkg_asciideck_description = Asciidoc for Erlang.pkg_asciideck_homepage = https://ninenines.eupkg_asciideck_fetch = gitpkg_asciideck_repo = https://github.com/ninenines/asciideckpkg_asciideck_commit = masterPACKAGES += backoffpkg_backoff_name = backoffpkg_backoff_description = Simple exponential backoffs in Erlangpkg_backoff_homepage = https://github.com/ferd/backoffpkg_backoff_fetch = gitpkg_backoff_repo = https://github.com/ferd/backoffpkg_backoff_commit = masterPACKAGES += barrel_tcppkg_barrel_tcp_name = barrel_tcppkg_barrel_tcp_description = barrel is a generic TCP acceptor pool with low latency in Erlang.pkg_barrel_tcp_homepage = https://github.com/benoitc-attic/barrel_tcppkg_barrel_tcp_fetch = gitpkg_barrel_tcp_repo = https://github.com/benoitc-attic/barrel_tcppkg_barrel_tcp_commit = masterPACKAGES += basho_benchpkg_basho_bench_name = basho_benchpkg_basho_bench_description = A load-generation and testing tool for basically whatever you can write a returning Erlang function for.pkg_basho_bench_homepage = https://github.com/basho/basho_benchpkg_basho_bench_fetch = gitpkg_basho_bench_repo = https://github.com/basho/basho_benchpkg_basho_bench_commit = masterPACKAGES += bcryptpkg_bcrypt_name = bcryptpkg_bcrypt_description = Bcrypt Erlang / C librarypkg_bcrypt_homepage = https://github.com/erlangpack/bcryptpkg_bcrypt_fetch = gitpkg_bcrypt_repo = https://github.com/erlangpack/bcrypt.gitpkg_bcrypt_commit = masterPACKAGES += beampkg_beam_name = beampkg_beam_description = BEAM emulator written in Erlangpkg_beam_homepage = https://github.com/tonyrog/beampkg_beam_fetch = gitpkg_beam_repo = https://github.com/tonyrog/beampkg_beam_commit = masterPACKAGES += bearpkg_bear_name = bearpkg_bear_description = a set of statistics functions for erlangpkg_bear_homepage = https://github.com/boundary/bearpkg_bear_fetch = gitpkg_bear_repo = https://github.com/boundary/bearpkg_bear_commit = masterPACKAGES += bertconfpkg_bertconf_name = bertconfpkg_bertconf_description = Make ETS tables out of statc BERT files that are auto-reloadedpkg_bertconf_homepage = https://github.com/ferd/bertconfpkg_bertconf_fetch = gitpkg_bertconf_repo = https://github.com/ferd/bertconfpkg_bertconf_commit = masterPACKAGES += bifrostpkg_bifrost_name = bifrostpkg_bifrost_description = Erlang FTP Server Frameworkpkg_bifrost_homepage = https://github.com/thorstadt/bifrostpkg_bifrost_fetch = gitpkg_bifrost_repo = https://github.com/thorstadt/bifrostpkg_bifrost_commit = masterPACKAGES += binpppkg_binpp_name = binpppkg_binpp_description = Erlang Binary Pretty Printerpkg_binpp_homepage = https://github.com/jtendo/binpppkg_binpp_fetch = gitpkg_binpp_repo = https://github.com/jtendo/binpppkg_binpp_commit = masterPACKAGES += bisectpkg_bisect_name = bisectpkg_bisect_description = Ordered fixed-size binary dictionary in Erlangpkg_bisect_homepage = https://github.com/knutin/bisectpkg_bisect_fetch = gitpkg_bisect_repo = https://github.com/knutin/bisectpkg_bisect_commit = masterPACKAGES += bitcaskpkg_bitcask_name = bitcaskpkg_bitcask_description = because you need another a key/value storage enginepkg_bitcask_homepage = https://github.com/basho/bitcaskpkg_bitcask_fetch = gitpkg_bitcask_repo = https://github.com/basho/bitcaskpkg_bitcask_commit = developPACKAGES += bootstrappkg_bootstrap_name = bootstrappkg_bootstrap_description = A simple, yet powerful Erlang cluster bootstrapping application.pkg_bootstrap_homepage = https://github.com/schlagert/bootstrappkg_bootstrap_fetch = gitpkg_bootstrap_repo = https://github.com/schlagert/bootstrappkg_bootstrap_commit = masterPACKAGES += bosspkg_boss_name = bosspkg_boss_description = Erlang web MVC, now featuring Cometpkg_boss_homepage = https://github.com/ChicagoBoss/ChicagoBosspkg_boss_fetch = gitpkg_boss_repo = https://github.com/ChicagoBoss/ChicagoBosspkg_boss_commit = masterPACKAGES += boss_dbpkg_boss_db_name = boss_dbpkg_boss_db_description = BossDB: a sharded, caching, pooling, evented ORM for Erlangpkg_boss_db_homepage = https://github.com/ErlyORM/boss_dbpkg_boss_db_fetch = gitpkg_boss_db_repo = https://github.com/ErlyORM/boss_dbpkg_boss_db_commit = masterPACKAGES += brodpkg_brod_name = brodpkg_brod_description = Kafka client in Erlangpkg_brod_homepage = https://github.com/klarna/brodpkg_brod_fetch = gitpkg_brod_repo = https://github.com/klarna/brod.gitpkg_brod_commit = masterPACKAGES += bsonpkg_bson_name = bsonpkg_bson_description = BSON documents in Erlang, see bsonspec.orgpkg_bson_homepage = https://github.com/comtihon/bson-erlangpkg_bson_fetch = gitpkg_bson_repo = https://github.com/comtihon/bson-erlangpkg_bson_commit = masterPACKAGES += bulletpkg_bullet_name = bulletpkg_bullet_description = Simple, reliable, efficient streaming for Cowboy.pkg_bullet_homepage = http://ninenines.eupkg_bullet_fetch = gitpkg_bullet_repo = https://github.com/ninenines/bulletpkg_bullet_commit = masterPACKAGES += cachepkg_cache_name = cachepkg_cache_description = Erlang in-memory cachepkg_cache_homepage = https://github.com/fogfish/cachepkg_cache_fetch = gitpkg_cache_repo = https://github.com/fogfish/cachepkg_cache_commit = masterPACKAGES += cakepkg_cake_name = cakepkg_cake_description = Really simple terminal colorizationpkg_cake_homepage = https://github.com/darach/cake-erlpkg_cake_fetch = gitpkg_cake_repo = https://github.com/darach/cake-erlpkg_cake_commit = masterPACKAGES += cberlpkg_cberl_name = cberlpkg_cberl_description = NIF based Erlang bindings for Couchbasepkg_cberl_homepage = https://github.com/chitika/cberlpkg_cberl_fetch = gitpkg_cberl_repo = https://github.com/chitika/cberlpkg_cberl_commit = masterPACKAGES += cechopkg_cecho_name = cechopkg_cecho_description = An ncurses library for Erlangpkg_cecho_homepage = https://github.com/mazenharake/cechopkg_cecho_fetch = gitpkg_cecho_repo = https://github.com/mazenharake/cechopkg_cecho_commit = masterPACKAGES += cferlpkg_cferl_name = cferlpkg_cferl_description = Rackspace / Open Stack Cloud Files Erlang Clientpkg_cferl_homepage = https://github.com/ddossot/cferlpkg_cferl_fetch = gitpkg_cferl_repo = https://github.com/ddossot/cferlpkg_cferl_commit = masterPACKAGES += chaos_monkeypkg_chaos_monkey_name = chaos_monkeypkg_chaos_monkey_description = This is The CHAOS MONKEY. It will kill your processes.pkg_chaos_monkey_homepage = https://github.com/dLuna/chaos_monkeypkg_chaos_monkey_fetch = gitpkg_chaos_monkey_repo = https://github.com/dLuna/chaos_monkeypkg_chaos_monkey_commit = masterPACKAGES += check_nodepkg_check_node_name = check_nodepkg_check_node_description = Nagios Scripts for monitoring Riakpkg_check_node_homepage = https://github.com/basho-labs/riak_nagiospkg_check_node_fetch = gitpkg_check_node_repo = https://github.com/basho-labs/riak_nagiospkg_check_node_commit = masterPACKAGES += chronospkg_chronos_name = chronospkg_chronos_description = Timer module for Erlang that makes it easy to abstract time out of the tests.pkg_chronos_homepage = https://github.com/lehoff/chronospkg_chronos_fetch = gitpkg_chronos_repo = https://github.com/lehoff/chronospkg_chronos_commit = masterPACKAGES += chumakpkg_chumak_name = chumakpkg_chumak_description = Pure Erlang implementation of ZeroMQ Message Transport Protocol.pkg_chumak_homepage = http://choven.capkg_chumak_fetch = gitpkg_chumak_repo = https://github.com/chovencorp/chumakpkg_chumak_commit = masterPACKAGES += clpkg_cl_name = clpkg_cl_description = OpenCL binding for Erlangpkg_cl_homepage = https://github.com/tonyrog/clpkg_cl_fetch = gitpkg_cl_repo = https://github.com/tonyrog/clpkg_cl_commit = masterPACKAGES += cliquepkg_clique_name = cliquepkg_clique_description = CLI Framework for Erlangpkg_clique_homepage = https://github.com/basho/cliquepkg_clique_fetch = gitpkg_clique_repo = https://github.com/basho/cliquepkg_clique_commit = developPACKAGES += cloudi_corepkg_cloudi_core_name = cloudi_corepkg_cloudi_core_description = CloudI internal service runtimepkg_cloudi_core_homepage = http://cloudi.org/pkg_cloudi_core_fetch = gitpkg_cloudi_core_repo = https://github.com/CloudI/cloudi_corepkg_cloudi_core_commit = masterPACKAGES += cloudi_service_api_requestspkg_cloudi_service_api_requests_name = cloudi_service_api_requestspkg_cloudi_service_api_requests_description = CloudI Service API requests (JSON-RPC/Erlang-term support)pkg_cloudi_service_api_requests_homepage = http://cloudi.org/pkg_cloudi_service_api_requests_fetch = gitpkg_cloudi_service_api_requests_repo = https://github.com/CloudI/cloudi_service_api_requestspkg_cloudi_service_api_requests_commit = masterPACKAGES += cloudi_service_db_mysqlpkg_cloudi_service_db_mysql_name = cloudi_service_db_mysqlpkg_cloudi_service_db_mysql_description = MySQL CloudI Servicepkg_cloudi_service_db_mysql_homepage = http://cloudi.org/pkg_cloudi_service_db_mysql_fetch = gitpkg_cloudi_service_db_mysql_repo = https://github.com/CloudI/cloudi_service_db_mysqlpkg_cloudi_service_db_mysql_commit = masterPACKAGES += cloudi_service_db_pgsqlpkg_cloudi_service_db_pgsql_name = cloudi_service_db_pgsqlpkg_cloudi_service_db_pgsql_description = PostgreSQL CloudI Servicepkg_cloudi_service_db_pgsql_homepage = http://cloudi.org/pkg_cloudi_service_db_pgsql_fetch = gitpkg_cloudi_service_db_pgsql_repo = https://github.com/CloudI/cloudi_service_db_pgsqlpkg_cloudi_service_db_pgsql_commit = masterPACKAGES += cloudi_service_filesystempkg_cloudi_service_filesystem_name = cloudi_service_filesystempkg_cloudi_service_filesystem_description = Filesystem CloudI Servicepkg_cloudi_service_filesystem_homepage = http://cloudi.org/pkg_cloudi_service_filesystem_fetch = gitpkg_cloudi_service_filesystem_repo = https://github.com/CloudI/cloudi_service_filesystempkg_cloudi_service_filesystem_commit = masterPACKAGES += cloudi_service_http_clientpkg_cloudi_service_http_client_name = cloudi_service_http_clientpkg_cloudi_service_http_client_description = HTTP client CloudI Servicepkg_cloudi_service_http_client_homepage = http://cloudi.org/pkg_cloudi_service_http_client_fetch = gitpkg_cloudi_service_http_client_repo = https://github.com/CloudI/cloudi_service_http_clientpkg_cloudi_service_http_client_commit = masterPACKAGES += cloudi_service_http_cowboypkg_cloudi_service_http_cowboy_name = cloudi_service_http_cowboypkg_cloudi_service_http_cowboy_description = cowboy HTTP/HTTPS CloudI Servicepkg_cloudi_service_http_cowboy_homepage = http://cloudi.org/pkg_cloudi_service_http_cowboy_fetch = gitpkg_cloudi_service_http_cowboy_repo = https://github.com/CloudI/cloudi_service_http_cowboypkg_cloudi_service_http_cowboy_commit = masterPACKAGES += cloudi_service_http_ellipkg_cloudi_service_http_elli_name = cloudi_service_http_ellipkg_cloudi_service_http_elli_description = elli HTTP CloudI Servicepkg_cloudi_service_http_elli_homepage = http://cloudi.org/pkg_cloudi_service_http_elli_fetch = gitpkg_cloudi_service_http_elli_repo = https://github.com/CloudI/cloudi_service_http_ellipkg_cloudi_service_http_elli_commit = masterPACKAGES += cloudi_service_map_reducepkg_cloudi_service_map_reduce_name = cloudi_service_map_reducepkg_cloudi_service_map_reduce_description = Map/Reduce CloudI Servicepkg_cloudi_service_map_reduce_homepage = http://cloudi.org/pkg_cloudi_service_map_reduce_fetch = gitpkg_cloudi_service_map_reduce_repo = https://github.com/CloudI/cloudi_service_map_reducepkg_cloudi_service_map_reduce_commit = masterPACKAGES += cloudi_service_oauth1pkg_cloudi_service_oauth1_name = cloudi_service_oauth1pkg_cloudi_service_oauth1_description = OAuth v1.0 CloudI Servicepkg_cloudi_service_oauth1_homepage = http://cloudi.org/pkg_cloudi_service_oauth1_fetch = gitpkg_cloudi_service_oauth1_repo = https://github.com/CloudI/cloudi_service_oauth1pkg_cloudi_service_oauth1_commit = masterPACKAGES += cloudi_service_queuepkg_cloudi_service_queue_name = cloudi_service_queuepkg_cloudi_service_queue_description = Persistent Queue Servicepkg_cloudi_service_queue_homepage = http://cloudi.org/pkg_cloudi_service_queue_fetch = gitpkg_cloudi_service_queue_repo = https://github.com/CloudI/cloudi_service_queuepkg_cloudi_service_queue_commit = masterPACKAGES += cloudi_service_quorumpkg_cloudi_service_quorum_name = cloudi_service_quorumpkg_cloudi_service_quorum_description = CloudI Quorum Servicepkg_cloudi_service_quorum_homepage = http://cloudi.org/pkg_cloudi_service_quorum_fetch = gitpkg_cloudi_service_quorum_repo = https://github.com/CloudI/cloudi_service_quorumpkg_cloudi_service_quorum_commit = masterPACKAGES += cloudi_service_routerpkg_cloudi_service_router_name = cloudi_service_routerpkg_cloudi_service_router_description = CloudI Router Servicepkg_cloudi_service_router_homepage = http://cloudi.org/pkg_cloudi_service_router_fetch = gitpkg_cloudi_service_router_repo = https://github.com/CloudI/cloudi_service_routerpkg_cloudi_service_router_commit = masterPACKAGES += cloudi_service_tcppkg_cloudi_service_tcp_name = cloudi_service_tcppkg_cloudi_service_tcp_description = TCP CloudI Servicepkg_cloudi_service_tcp_homepage = http://cloudi.org/pkg_cloudi_service_tcp_fetch = gitpkg_cloudi_service_tcp_repo = https://github.com/CloudI/cloudi_service_tcppkg_cloudi_service_tcp_commit = masterPACKAGES += cloudi_service_udppkg_cloudi_service_udp_name = cloudi_service_udppkg_cloudi_service_udp_description = UDP CloudI Servicepkg_cloudi_service_udp_homepage = http://cloudi.org/pkg_cloudi_service_udp_fetch = gitpkg_cloudi_service_udp_repo = https://github.com/CloudI/cloudi_service_udppkg_cloudi_service_udp_commit = masterPACKAGES += cloudi_service_validatepkg_cloudi_service_validate_name = cloudi_service_validatepkg_cloudi_service_validate_description = CloudI Validate Servicepkg_cloudi_service_validate_homepage = http://cloudi.org/pkg_cloudi_service_validate_fetch = gitpkg_cloudi_service_validate_repo = https://github.com/CloudI/cloudi_service_validatepkg_cloudi_service_validate_commit = masterPACKAGES += cloudi_service_zeromqpkg_cloudi_service_zeromq_name = cloudi_service_zeromqpkg_cloudi_service_zeromq_description = ZeroMQ CloudI Servicepkg_cloudi_service_zeromq_homepage = http://cloudi.org/pkg_cloudi_service_zeromq_fetch = gitpkg_cloudi_service_zeromq_repo = https://github.com/CloudI/cloudi_service_zeromqpkg_cloudi_service_zeromq_commit = masterPACKAGES += cluster_infopkg_cluster_info_name = cluster_infopkg_cluster_info_description = Fork of Hibari's nifty cluster_info OTP apppkg_cluster_info_homepage = https://github.com/basho/cluster_infopkg_cluster_info_fetch = gitpkg_cluster_info_repo = https://github.com/basho/cluster_infopkg_cluster_info_commit = masterPACKAGES += colorpkg_color_name = colorpkg_color_description = ANSI colors for your Erlangpkg_color_homepage = https://github.com/julianduque/erlang-colorpkg_color_fetch = gitpkg_color_repo = https://github.com/julianduque/erlang-colorpkg_color_commit = masterPACKAGES += confettipkg_confetti_name = confettipkg_confetti_description = Erlang configuration provider / application:get_env/2 on steroidspkg_confetti_homepage = https://github.com/jtendo/confettipkg_confetti_fetch = gitpkg_confetti_repo = https://github.com/jtendo/confettipkg_confetti_commit = masterPACKAGES += couchbeampkg_couchbeam_name = couchbeampkg_couchbeam_description = Apache CouchDB client in Erlangpkg_couchbeam_homepage = https://github.com/benoitc/couchbeampkg_couchbeam_fetch = gitpkg_couchbeam_repo = https://github.com/benoitc/couchbeampkg_couchbeam_commit = masterPACKAGES += covertoolpkg_covertool_name = covertoolpkg_covertool_description = Tool to convert Erlang cover data files into Cobertura XML reportspkg_covertool_homepage = https://github.com/idubrov/covertoolpkg_covertool_fetch = gitpkg_covertool_repo = https://github.com/idubrov/covertoolpkg_covertool_commit = masterPACKAGES += cowboypkg_cowboy_name = cowboypkg_cowboy_description = Small, fast and modular HTTP server.pkg_cowboy_homepage = http://ninenines.eupkg_cowboy_fetch = gitpkg_cowboy_repo = https://github.com/ninenines/cowboypkg_cowboy_commit = 1.0.4PACKAGES += cowdbpkg_cowdb_name = cowdbpkg_cowdb_description = Pure Key/Value database library for Erlang Applicationspkg_cowdb_homepage = https://github.com/refuge/cowdbpkg_cowdb_fetch = gitpkg_cowdb_repo = https://github.com/refuge/cowdbpkg_cowdb_commit = masterPACKAGES += cowlibpkg_cowlib_name = cowlibpkg_cowlib_description = Support library for manipulating Web protocols.pkg_cowlib_homepage = http://ninenines.eupkg_cowlib_fetch = gitpkg_cowlib_repo = https://github.com/ninenines/cowlibpkg_cowlib_commit = 1.0.2PACKAGES += cpgpkg_cpg_name = cpgpkg_cpg_description = CloudI Process Groupspkg_cpg_homepage = https://github.com/okeuday/cpgpkg_cpg_fetch = gitpkg_cpg_repo = https://github.com/okeuday/cpgpkg_cpg_commit = masterPACKAGES += cqerlpkg_cqerl_name = cqerlpkg_cqerl_description = Native Erlang CQL client for Cassandrapkg_cqerl_homepage = https://matehat.github.io/cqerl/pkg_cqerl_fetch = gitpkg_cqerl_repo = https://github.com/matehat/cqerlpkg_cqerl_commit = masterPACKAGES += crpkg_cr_name = crpkg_cr_description = Chain Replicationpkg_cr_homepage = https://synrc.com/apps/cr/doc/cr.htmpkg_cr_fetch = gitpkg_cr_repo = https://github.com/spawnproc/crpkg_cr_commit = masterPACKAGES += cuttlefishpkg_cuttlefish_name = cuttlefishpkg_cuttlefish_description = cuttlefish configuration abstractionpkg_cuttlefish_homepage = https://github.com/Kyorai/cuttlefishpkg_cuttlefish_fetch = gitpkg_cuttlefish_repo = https://github.com/Kyorai/cuttlefishpkg_cuttlefish_commit = masterPACKAGES += damoclespkg_damocles_name = damoclespkg_damocles_description = Erlang library for generating adversarial network conditions for QAing distributed applications/systems on a single Linux box.pkg_damocles_homepage = https://github.com/lostcolony/damoclespkg_damocles_fetch = gitpkg_damocles_repo = https://github.com/lostcolony/damoclespkg_damocles_commit = masterPACKAGES += debbiepkg_debbie_name = debbiepkg_debbie_description = .DEB Built In Erlangpkg_debbie_homepage = https://github.com/crownedgrouse/debbiepkg_debbie_fetch = gitpkg_debbie_repo = https://github.com/crownedgrouse/debbiepkg_debbie_commit = masterPACKAGES += decimalpkg_decimal_name = decimalpkg_decimal_description = An Erlang decimal arithmetic librarypkg_decimal_homepage = https://github.com/egobrain/decimalpkg_decimal_fetch = gitpkg_decimal_repo = https://github.com/egobrain/decimalpkg_decimal_commit = masterPACKAGES += detergentpkg_detergent_name = detergentpkg_detergent_description = An emulsifying Erlang SOAP librarypkg_detergent_homepage = https://github.com/devinus/detergentpkg_detergent_fetch = gitpkg_detergent_repo = https://github.com/devinus/detergentpkg_detergent_commit = masterPACKAGES += dh_datepkg_dh_date_name = dh_datepkg_dh_date_description = Date formatting / parsing library for erlangpkg_dh_date_homepage = https://github.com/daleharvey/dh_datepkg_dh_date_fetch = gitpkg_dh_date_repo = https://github.com/daleharvey/dh_datepkg_dh_date_commit = masterPACKAGES += dirbusterlpkg_dirbusterl_name = dirbusterlpkg_dirbusterl_description = DirBuster successor in Erlangpkg_dirbusterl_homepage = https://github.com/silentsignal/DirBustErlpkg_dirbusterl_fetch = gitpkg_dirbusterl_repo = https://github.com/silentsignal/DirBustErlpkg_dirbusterl_commit = masterPACKAGES += dispcountpkg_dispcount_name = dispcountpkg_dispcount_description = Erlang task dispatcher based on ETS counters.pkg_dispcount_homepage = https://github.com/ferd/dispcountpkg_dispcount_fetch = gitpkg_dispcount_repo = https://github.com/ferd/dispcountpkg_dispcount_commit = masterPACKAGES += dlhttpcpkg_dlhttpc_name = dlhttpcpkg_dlhttpc_description = dispcount-based lhttpc fork for massive amounts of requests to limited endpointspkg_dlhttpc_homepage = https://github.com/ferd/dlhttpcpkg_dlhttpc_fetch = gitpkg_dlhttpc_repo = https://github.com/ferd/dlhttpcpkg_dlhttpc_commit = masterPACKAGES += dnspkg_dns_name = dnspkg_dns_description = Erlang DNS librarypkg_dns_homepage = https://github.com/aetrion/dns_erlangpkg_dns_fetch = gitpkg_dns_repo = https://github.com/aetrion/dns_erlangpkg_dns_commit = mainPACKAGES += dynamic_compilepkg_dynamic_compile_name = dynamic_compilepkg_dynamic_compile_description = compile and load erlang modules from string inputpkg_dynamic_compile_homepage = https://github.com/jkvor/dynamic_compilepkg_dynamic_compile_fetch = gitpkg_dynamic_compile_repo = https://github.com/jkvor/dynamic_compilepkg_dynamic_compile_commit = masterPACKAGES += e2pkg_e2_name = e2pkg_e2_description = Library to simply writing correct OTP applications.pkg_e2_homepage = http://e2project.orgpkg_e2_fetch = gitpkg_e2_repo = https://github.com/gar1t/e2pkg_e2_commit = masterPACKAGES += eamfpkg_eamf_name = eamfpkg_eamf_description = eAMF provides Action Message Format (AMF) support for Erlangpkg_eamf_homepage = https://github.com/mrinalwadhwa/eamfpkg_eamf_fetch = gitpkg_eamf_repo = https://github.com/mrinalwadhwa/eamfpkg_eamf_commit = masterPACKAGES += eavropkg_eavro_name = eavropkg_eavro_description = Apache Avro encoder/decoderpkg_eavro_homepage = https://github.com/SIfoxDevTeam/eavropkg_eavro_fetch = gitpkg_eavro_repo = https://github.com/SIfoxDevTeam/eavropkg_eavro_commit = masterPACKAGES += ecapnppkg_ecapnp_name = ecapnppkg_ecapnp_description = Cap'n Proto library for Erlangpkg_ecapnp_homepage = https://github.com/kaos/ecapnppkg_ecapnp_fetch = gitpkg_ecapnp_repo = https://github.com/kaos/ecapnppkg_ecapnp_commit = masterPACKAGES += econfigpkg_econfig_name = econfigpkg_econfig_description = simple Erlang config handler using INI filespkg_econfig_homepage = https://github.com/benoitc/econfigpkg_econfig_fetch = gitpkg_econfig_repo = https://github.com/benoitc/econfigpkg_econfig_commit = masterPACKAGES += edatepkg_edate_name = edatepkg_edate_description = date manipulation library for erlangpkg_edate_homepage = https://github.com/dweldon/edatepkg_edate_fetch = gitpkg_edate_repo = https://github.com/dweldon/edatepkg_edate_commit = masterPACKAGES += edgarpkg_edgar_name = edgarpkg_edgar_description = Erlang Does GNU ARpkg_edgar_homepage = https://github.com/crownedgrouse/edgarpkg_edgar_fetch = gitpkg_edgar_repo = https://github.com/crownedgrouse/edgarpkg_edgar_commit = masterPACKAGES += ednspkg_edns_name = ednspkg_edns_description = Erlang/OTP DNS serverpkg_edns_homepage = https://github.com/hcvst/erlang-dnspkg_edns_fetch = gitpkg_edns_repo = https://github.com/hcvst/erlang-dnspkg_edns_commit = masterPACKAGES += edownpkg_edown_name = edownpkg_edown_description = EDoc extension for generating Github-flavored Markdownpkg_edown_homepage = https://github.com/uwiger/edownpkg_edown_fetch = gitpkg_edown_repo = https://github.com/uwiger/edownpkg_edown_commit = masterPACKAGES += eeppkg_eep_name = eeppkg_eep_description = Erlang Easy Profiling (eep) application provides a way to analyze application performance and call hierarchypkg_eep_homepage = https://github.com/virtan/eeppkg_eep_fetch = gitpkg_eep_repo = https://github.com/virtan/eeppkg_eep_commit = masterPACKAGES += eep_apppkg_eep_app_name = eep_apppkg_eep_app_description = Embedded Event Processingpkg_eep_app_homepage = https://github.com/darach/eep-erlpkg_eep_app_fetch = gitpkg_eep_app_repo = https://github.com/darach/eep-erlpkg_eep_app_commit = masterPACKAGES += efenepkg_efene_name = efenepkg_efene_description = Alternative syntax for the Erlang Programming Language focusing on simplicity, ease of use and programmer UXpkg_efene_homepage = https://github.com/efene/efenepkg_efene_fetch = gitpkg_efene_repo = https://github.com/efene/efenepkg_efene_commit = masterPACKAGES += egeoippkg_egeoip_name = egeoippkg_egeoip_description = Erlang IP Geolocation module, currently supporting the MaxMind GeoLite City Database.pkg_egeoip_homepage = https://github.com/mochi/egeoippkg_egeoip_fetch = gitpkg_egeoip_repo = https://github.com/mochi/egeoippkg_egeoip_commit = masterPACKAGES += ehsapkg_ehsa_name = ehsapkg_ehsa_description = Erlang HTTP server basic and digest authentication modulespkg_ehsa_homepage = https://github.com/a12n/ehsapkg_ehsa_fetch = gitpkg_ehsa_repo = https://github.com/a12n/ehsapkg_ehsa_commit = masterPACKAGES += ejpkg_ej_name = ejpkg_ej_description = Helper module for working with Erlang terms representing JSONpkg_ej_homepage = https://github.com/seth/ejpkg_ej_fetch = gitpkg_ej_repo = https://github.com/seth/ejpkg_ej_commit = masterPACKAGES += ejabberdpkg_ejabberd_name = ejabberdpkg_ejabberd_description = Robust, ubiquitous and massively scalable Jabber / XMPP Instant Messaging platformpkg_ejabberd_homepage = https://github.com/processone/ejabberdpkg_ejabberd_fetch = gitpkg_ejabberd_repo = https://github.com/processone/ejabberdpkg_ejabberd_commit = masterPACKAGES += ejwtpkg_ejwt_name = ejwtpkg_ejwt_description = erlang library for JSON Web Tokenpkg_ejwt_homepage = https://github.com/artefactop/ejwtpkg_ejwt_fetch = gitpkg_ejwt_repo = https://github.com/artefactop/ejwtpkg_ejwt_commit = masterPACKAGES += ekafpkg_ekaf_name = ekafpkg_ekaf_description = A minimal, high-performance Kafka client in Erlang.pkg_ekaf_homepage = https://github.com/helpshift/ekafpkg_ekaf_fetch = gitpkg_ekaf_repo = https://github.com/helpshift/ekafpkg_ekaf_commit = masterPACKAGES += elarmpkg_elarm_name = elarmpkg_elarm_description = Alarm Manager for Erlang.pkg_elarm_homepage = https://github.com/esl/elarmpkg_elarm_fetch = gitpkg_elarm_repo = https://github.com/esl/elarmpkg_elarm_commit = masterPACKAGES += eleveldbpkg_eleveldb_name = eleveldbpkg_eleveldb_description = Erlang LevelDB APIpkg_eleveldb_homepage = https://github.com/basho/eleveldbpkg_eleveldb_fetch = gitpkg_eleveldb_repo = https://github.com/basho/eleveldbpkg_eleveldb_commit = developPACKAGES += elixirpkg_elixir_name = elixirpkg_elixir_description = Elixir is a dynamic, functional language designed for building scalable and maintainable applicationspkg_elixir_homepage = https://elixir-lang.org/pkg_elixir_fetch = gitpkg_elixir_repo = https://github.com/elixir-lang/elixirpkg_elixir_commit = mainPACKAGES += ellipkg_elli_name = ellipkg_elli_description = Simple, robust and performant Erlang web serverpkg_elli_homepage = https://github.com/elli-lib/ellipkg_elli_fetch = gitpkg_elli_repo = https://github.com/elli-lib/ellipkg_elli_commit = mainPACKAGES += elvispkg_elvis_name = elvispkg_elvis_description = Erlang Style Reviewerpkg_elvis_homepage = https://github.com/inaka/elvispkg_elvis_fetch = gitpkg_elvis_repo = https://github.com/inaka/elvispkg_elvis_commit = masterPACKAGES += emagickpkg_emagick_name = emagickpkg_emagick_description = Wrapper for Graphics/ImageMagick command line tool.pkg_emagick_homepage = https://github.com/kivra/emagickpkg_emagick_fetch = gitpkg_emagick_repo = https://github.com/kivra/emagickpkg_emagick_commit = masterPACKAGES += enmpkg_enm_name = enmpkg_enm_description = Erlang driver for nanomsgpkg_enm_homepage = https://github.com/basho/enmpkg_enm_fetch = gitpkg_enm_repo = https://github.com/basho/enmpkg_enm_commit = masterPACKAGES += entoppkg_entop_name = entoppkg_entop_description = A top-like tool for monitoring an Erlang nodepkg_entop_homepage = https://github.com/mazenharake/entoppkg_entop_fetch = gitpkg_entop_repo = https://github.com/mazenharake/entoppkg_entop_commit = masterPACKAGES += epcappkg_epcap_name = epcappkg_epcap_description = Erlang packet capture interface using pcappkg_epcap_homepage = https://github.com/msantos/epcappkg_epcap_fetch = gitpkg_epcap_repo = https://github.com/msantos/epcappkg_epcap_commit = masterPACKAGES += eperpkg_eper_name = eperpkg_eper_description = Erlang performance and debugging tools.pkg_eper_homepage = https://github.com/massemanet/eperpkg_eper_fetch = gitpkg_eper_repo = https://github.com/massemanet/eperpkg_eper_commit = masterPACKAGES += epgsqlpkg_epgsql_name = epgsqlpkg_epgsql_description = Erlang PostgreSQL client library.pkg_epgsql_homepage = https://github.com/epgsql/epgsqlpkg_epgsql_fetch = gitpkg_epgsql_repo = https://github.com/epgsql/epgsqlpkg_epgsql_commit = masterPACKAGES += episcinapkg_episcina_name = episcinapkg_episcina_description = A simple non intrusive resource pool for connectionspkg_episcina_homepage = https://github.com/erlware/episcinapkg_episcina_fetch = gitpkg_episcina_repo = https://github.com/erlware/episcinapkg_episcina_commit = masterPACKAGES += eplotpkg_eplot_name = eplotpkg_eplot_description = A plot engine written in erlang.pkg_eplot_homepage = https://github.com/psyeugenic/eplotpkg_eplot_fetch = gitpkg_eplot_repo = https://github.com/psyeugenic/eplotpkg_eplot_commit = masterPACKAGES += epocxypkg_epocxy_name = epocxypkg_epocxy_description = Erlang Patterns of Concurrencypkg_epocxy_homepage = https://github.com/duomark/epocxypkg_epocxy_fetch = gitpkg_epocxy_repo = https://github.com/duomark/epocxypkg_epocxy_commit = masterPACKAGES += epubnubpkg_epubnub_name = epubnubpkg_epubnub_description = Erlang PubNub APIpkg_epubnub_homepage = https://github.com/tsloughter/epubnubpkg_epubnub_fetch = gitpkg_epubnub_repo = https://github.com/tsloughter/epubnubpkg_epubnub_commit = masterPACKAGES += eqmpkg_eqm_name = eqmpkg_eqm_description = Erlang pub sub with supply-demand channelspkg_eqm_homepage = https://github.com/loucash/eqmpkg_eqm_fetch = gitpkg_eqm_repo = https://github.com/loucash/eqmpkg_eqm_commit = masterPACKAGES += eredispkg_eredis_name = eredispkg_eredis_description = Erlang Redis clientpkg_eredis_homepage = https://github.com/wooga/eredispkg_eredis_fetch = gitpkg_eredis_repo = https://github.com/wooga/eredispkg_eredis_commit = masterPACKAGES += erl_streamspkg_erl_streams_name = erl_streamspkg_erl_streams_description = Streams in Erlangpkg_erl_streams_homepage = https://github.com/epappas/erl_streamspkg_erl_streams_fetch = gitpkg_erl_streams_repo = https://github.com/epappas/erl_streamspkg_erl_streams_commit = masterPACKAGES += erlang_localtimepkg_erlang_localtime_name = erlang_localtimepkg_erlang_localtime_description = Erlang library for conversion from one local time to anotherpkg_erlang_localtime_homepage = https://github.com/dmitryme/erlang_localtimepkg_erlang_localtime_fetch = gitpkg_erlang_localtime_repo = https://github.com/dmitryme/erlang_localtimepkg_erlang_localtime_commit = masterPACKAGES += erlang_smtppkg_erlang_smtp_name = erlang_smtppkg_erlang_smtp_description = Erlang SMTP and POP3 server code.pkg_erlang_smtp_homepage = https://github.com/tonyg/erlang-smtppkg_erlang_smtp_fetch = gitpkg_erlang_smtp_repo = https://github.com/tonyg/erlang-smtppkg_erlang_smtp_commit = masterPACKAGES += erlang_termpkg_erlang_term_name = erlang_termpkg_erlang_term_description = Erlang Term Infopkg_erlang_term_homepage = https://github.com/okeuday/erlang_termpkg_erlang_term_fetch = gitpkg_erlang_term_repo = https://github.com/okeuday/erlang_termpkg_erlang_term_commit = masterPACKAGES += erlastic_searchpkg_erlastic_search_name = erlastic_searchpkg_erlastic_search_description = An Erlang app for communicating with Elastic Search's rest interface.pkg_erlastic_search_homepage = https://github.com/tsloughter/erlastic_searchpkg_erlastic_search_fetch = gitpkg_erlastic_search_repo = https://github.com/tsloughter/erlastic_searchpkg_erlastic_search_commit = masterPACKAGES += erlbrakepkg_erlbrake_name = erlbrakepkg_erlbrake_description = Erlang Airbrake notification clientpkg_erlbrake_homepage = https://github.com/kenpratt/erlbrakepkg_erlbrake_fetch = gitpkg_erlbrake_repo = https://github.com/kenpratt/erlbrakepkg_erlbrake_commit = masterPACKAGES += erlcloudpkg_erlcloud_name = erlcloudpkg_erlcloud_description = Cloud Computing library for erlang (Amazon EC2, S3, SQS, SimpleDB, Mechanical Turk, ELB)pkg_erlcloud_homepage = https://github.com/gleber/erlcloudpkg_erlcloud_fetch = gitpkg_erlcloud_repo = https://github.com/gleber/erlcloudpkg_erlcloud_commit = masterPACKAGES += erlcronpkg_erlcron_name = erlcronpkg_erlcron_description = Erlang cronish systempkg_erlcron_homepage = https://github.com/erlware/erlcronpkg_erlcron_fetch = gitpkg_erlcron_repo = https://github.com/erlware/erlcronpkg_erlcron_commit = masterPACKAGES += erldbpkg_erldb_name = erldbpkg_erldb_description = ORM (Object-relational mapping) application implemented in Erlangpkg_erldb_homepage = http://erldb.orgpkg_erldb_fetch = gitpkg_erldb_repo = https://github.com/erldb/erldbpkg_erldb_commit = masterPACKAGES += erldispkg_erldis_name = erldispkg_erldis_description = redis erlang client librarypkg_erldis_homepage = https://github.com/cstar/erldispkg_erldis_fetch = gitpkg_erldis_repo = https://github.com/cstar/erldispkg_erldis_commit = masterPACKAGES += erldnspkg_erldns_name = erldnspkg_erldns_description = DNS server, in erlang.pkg_erldns_homepage = https://github.com/aetrion/erl-dnspkg_erldns_fetch = gitpkg_erldns_repo = https://github.com/aetrion/erl-dnspkg_erldns_commit = mainPACKAGES += erldockerpkg_erldocker_name = erldockerpkg_erldocker_description = Docker Remote API client for Erlangpkg_erldocker_homepage = https://github.com/proger/erldockerpkg_erldocker_fetch = gitpkg_erldocker_repo = https://github.com/proger/erldockerpkg_erldocker_commit = masterPACKAGES += erlfsmonpkg_erlfsmon_name = erlfsmonpkg_erlfsmon_description = Erlang filesystem event watcher for Linux and OSXpkg_erlfsmon_homepage = https://github.com/proger/erlfsmonpkg_erlfsmon_fetch = gitpkg_erlfsmon_repo = https://github.com/proger/erlfsmonpkg_erlfsmon_commit = masterPACKAGES += erlgitpkg_erlgit_name = erlgitpkg_erlgit_description = Erlang convenience wrapper around git executablepkg_erlgit_homepage = https://github.com/gleber/erlgitpkg_erlgit_fetch = gitpkg_erlgit_repo = https://github.com/gleber/erlgitpkg_erlgit_commit = masterPACKAGES += erlgutenpkg_erlguten_name = erlgutenpkg_erlguten_description = ErlGuten is a system for high-quality typesetting, written purely in Erlang.pkg_erlguten_homepage = https://github.com/richcarl/erlgutenpkg_erlguten_fetch = gitpkg_erlguten_repo = https://github.com/richcarl/erlgutenpkg_erlguten_commit = masterPACKAGES += erlmcpkg_erlmc_name = erlmcpkg_erlmc_description = Erlang memcached binary protocol clientpkg_erlmc_homepage = https://github.com/jkvor/erlmcpkg_erlmc_fetch = gitpkg_erlmc_repo = https://github.com/jkvor/erlmcpkg_erlmc_commit = masterPACKAGES += erlmongopkg_erlmongo_name = erlmongopkg_erlmongo_description = Record based Erlang driver for MongoDB with gridfs supportpkg_erlmongo_homepage = https://github.com/SergejJurecko/erlmongopkg_erlmongo_fetch = gitpkg_erlmongo_repo = https://github.com/SergejJurecko/erlmongopkg_erlmongo_commit = masterPACKAGES += erlogpkg_erlog_name = erlogpkg_erlog_description = Prolog interpreter in and for Erlangpkg_erlog_homepage = https://github.com/rvirding/erlogpkg_erlog_fetch = gitpkg_erlog_repo = https://github.com/rvirding/erlogpkg_erlog_commit = masterPACKAGES += erlpasspkg_erlpass_name = erlpasspkg_erlpass_description = A library to handle password hashing and changing in a safe manner, independent from any kind of storage whatsoever.pkg_erlpass_homepage = https://github.com/ferd/erlpasspkg_erlpass_fetch = gitpkg_erlpass_repo = https://github.com/ferd/erlpasspkg_erlpass_commit = masterPACKAGES += erlshpkg_erlsh_name = erlshpkg_erlsh_description = Erlang shell toolspkg_erlsh_homepage = https://github.com/proger/erlshpkg_erlsh_fetch = gitpkg_erlsh_repo = https://github.com/proger/erlshpkg_erlsh_commit = masterPACKAGES += erlsha2pkg_erlsha2_name = erlsha2pkg_erlsha2_description = SHA-224, SHA-256, SHA-384, SHA-512 implemented in Erlang NIFs.pkg_erlsha2_homepage = https://github.com/vinoski/erlsha2pkg_erlsha2_fetch = gitpkg_erlsha2_repo = https://github.com/vinoski/erlsha2pkg_erlsha2_commit = masterPACKAGES += erlsompkg_erlsom_name = erlsompkg_erlsom_description = XML parser for Erlangpkg_erlsom_homepage = https://github.com/willemdj/erlsompkg_erlsom_fetch = gitpkg_erlsom_repo = https://github.com/willemdj/erlsompkg_erlsom_commit = masterPACKAGES += erlubipkg_erlubi_name = erlubipkg_erlubi_description = Ubigraph Erlang Client (and Process Visualizer)pkg_erlubi_homepage = https://github.com/krestenkrab/erlubipkg_erlubi_fetch = gitpkg_erlubi_repo = https://github.com/krestenkrab/erlubipkg_erlubi_commit = masterPACKAGES += erlvoltpkg_erlvolt_name = erlvoltpkg_erlvolt_description = VoltDB Erlang Client Driverpkg_erlvolt_homepage = https://github.com/VoltDB/voltdb-client-erlangpkg_erlvolt_fetch = gitpkg_erlvolt_repo = https://github.com/VoltDB/voltdb-client-erlangpkg_erlvolt_commit = masterPACKAGES += erlware_commonspkg_erlware_commons_name = erlware_commonspkg_erlware_commons_description = Erlware Commons is an Erlware project focused on all aspects of reusable Erlang components.pkg_erlware_commons_homepage = https://github.com/erlware/erlware_commonspkg_erlware_commons_fetch = gitpkg_erlware_commons_repo = https://github.com/erlware/erlware_commonspkg_erlware_commons_commit = masterPACKAGES += erlydtlpkg_erlydtl_name = erlydtlpkg_erlydtl_description = Django Template Language for Erlang.pkg_erlydtl_homepage = https://github.com/erlydtl/erlydtlpkg_erlydtl_fetch = gitpkg_erlydtl_repo = https://github.com/erlydtl/erlydtlpkg_erlydtl_commit = masterPACKAGES += errdpkg_errd_name = errdpkg_errd_description = Erlang RRDTool librarypkg_errd_homepage = https://github.com/archaelus/errdpkg_errd_fetch = gitpkg_errd_repo = https://github.com/archaelus/errdpkg_errd_commit = masterPACKAGES += erservepkg_erserve_name = erservepkg_erserve_description = Erlang/Rserve communication interfacepkg_erserve_homepage = https://github.com/del/erservepkg_erserve_fetch = gitpkg_erserve_repo = https://github.com/del/erservepkg_erserve_commit = masterPACKAGES += escaluspkg_escalus_name = escaluspkg_escalus_description = An XMPP client library in Erlang for conveniently testing XMPP serverspkg_escalus_homepage = https://github.com/esl/escaluspkg_escalus_fetch = gitpkg_escalus_repo = https://github.com/esl/escaluspkg_escalus_commit = masterPACKAGES += esh_mkpkg_esh_mk_name = esh_mkpkg_esh_mk_description = esh template engine plugin for erlang.mkpkg_esh_mk_homepage = https://github.com/crownedgrouse/esh.mkpkg_esh_mk_fetch = gitpkg_esh_mk_repo = https://github.com/crownedgrouse/esh.mk.gitpkg_esh_mk_commit = masterPACKAGES += especpkg_espec_name = especpkg_espec_description = ESpec: Behaviour driven development framework for Erlangpkg_espec_homepage = https://github.com/lucaspiller/especpkg_espec_fetch = gitpkg_espec_repo = https://github.com/lucaspiller/especpkg_espec_commit = masterPACKAGES += estatsdpkg_estatsd_name = estatsdpkg_estatsd_description = Erlang stats aggregation app that periodically flushes data to graphitepkg_estatsd_homepage = https://github.com/RJ/estatsdpkg_estatsd_fetch = gitpkg_estatsd_repo = https://github.com/RJ/estatsdpkg_estatsd_commit = masterPACKAGES += etappkg_etap_name = etappkg_etap_description = etap is a simple erlang testing library that provides TAP compliant output.pkg_etap_homepage = https://github.com/ngerakines/etappkg_etap_fetch = gitpkg_etap_repo = https://github.com/ngerakines/etappkg_etap_commit = masterPACKAGES += etestpkg_etest_name = etestpkg_etest_description = A lightweight, convention over configuration test framework for Erlangpkg_etest_homepage = https://github.com/wooga/etestpkg_etest_fetch = gitpkg_etest_repo = https://github.com/wooga/etestpkg_etest_commit = masterPACKAGES += etest_httppkg_etest_http_name = etest_httppkg_etest_http_description = etest Assertions around HTTP (client-side)pkg_etest_http_homepage = https://github.com/wooga/etest_httppkg_etest_http_fetch = gitpkg_etest_http_repo = https://github.com/wooga/etest_httppkg_etest_http_commit = masterPACKAGES += etomlpkg_etoml_name = etomlpkg_etoml_description = TOML language erlang parserpkg_etoml_homepage = https://github.com/kalta/etomlpkg_etoml_fetch = gitpkg_etoml_repo = https://github.com/kalta/etomlpkg_etoml_commit = masterPACKAGES += eunitpkg_eunit_name = eunitpkg_eunit_description = The EUnit lightweight unit testing framework for Erlang - this is the canonical development repository.pkg_eunit_homepage = https://github.com/richcarl/eunitpkg_eunit_fetch = gitpkg_eunit_repo = https://github.com/richcarl/eunitpkg_eunit_commit = masterPACKAGES += eunit_formatterspkg_eunit_formatters_name = eunit_formatterspkg_eunit_formatters_description = Because eunit's output sucks. Let's make it better.pkg_eunit_formatters_homepage = https://github.com/seancribbs/eunit_formatterspkg_eunit_formatters_fetch = gitpkg_eunit_formatters_repo = https://github.com/seancribbs/eunit_formatterspkg_eunit_formatters_commit = masterPACKAGES += euthanasiapkg_euthanasia_name = euthanasiapkg_euthanasia_description = Merciful killer for your Erlang processespkg_euthanasia_homepage = https://github.com/doubleyou/euthanasiapkg_euthanasia_fetch = gitpkg_euthanasia_repo = https://github.com/doubleyou/euthanasiapkg_euthanasia_commit = masterPACKAGES += evumpkg_evum_name = evumpkg_evum_description = Spawn Linux VMs as Erlang processes in the Erlang VMpkg_evum_homepage = https://github.com/msantos/evumpkg_evum_fetch = gitpkg_evum_repo = https://github.com/msantos/evumpkg_evum_commit = masterPACKAGES += execpkg_exec_name = erlexecpkg_exec_description = Execute and control OS processes from Erlang/OTP.pkg_exec_homepage = http://saleyn.github.com/erlexecpkg_exec_fetch = gitpkg_exec_repo = https://github.com/saleyn/erlexecpkg_exec_commit = masterPACKAGES += exmlpkg_exml_name = exmlpkg_exml_description = XML parsing library in Erlangpkg_exml_homepage = https://github.com/paulgray/exmlpkg_exml_fetch = gitpkg_exml_repo = https://github.com/paulgray/exmlpkg_exml_commit = masterPACKAGES += exometerpkg_exometer_name = exometerpkg_exometer_description = Basic measurement objects and probe behaviorpkg_exometer_homepage = https://github.com/Feuerlabs/exometerpkg_exometer_fetch = gitpkg_exometer_repo = https://github.com/Feuerlabs/exometerpkg_exometer_commit = masterPACKAGES += exs1024pkg_exs1024_name = exs1024pkg_exs1024_description = Xorshift1024star pseudo random number generator for Erlang.pkg_exs1024_homepage = https://github.com/jj1bdx/exs1024pkg_exs1024_fetch = gitpkg_exs1024_repo = https://github.com/jj1bdx/exs1024pkg_exs1024_commit = masterPACKAGES += exsplus116pkg_exsplus116_name = exsplus116pkg_exsplus116_description = Xorshift116plus for Erlangpkg_exsplus116_homepage = https://github.com/jj1bdx/exsplus116pkg_exsplus116_fetch = gitpkg_exsplus116_repo = https://github.com/jj1bdx/exsplus116pkg_exsplus116_commit = masterPACKAGES += ezmtppkg_ezmtp_name = ezmtppkg_ezmtp_description = ZMTP protocol in pure Erlang.pkg_ezmtp_homepage = https://github.com/a13x/ezmtppkg_ezmtp_fetch = gitpkg_ezmtp_repo = https://github.com/a13x/ezmtppkg_ezmtp_commit = masterPACKAGES += fast_disk_logpkg_fast_disk_log_name = fast_disk_logpkg_fast_disk_log_description = Pool-based asynchronous Erlang disk loggerpkg_fast_disk_log_homepage = https://github.com/lpgauth/fast_disk_logpkg_fast_disk_log_fetch = gitpkg_fast_disk_log_repo = https://github.com/lpgauth/fast_disk_logpkg_fast_disk_log_commit = masterPACKAGES += feederpkg_feeder_name = feederpkg_feeder_description = Stream parse RSS and Atom formatted XML feeds.pkg_feeder_homepage = https://github.com/michaelnisi/feederpkg_feeder_fetch = gitpkg_feeder_repo = https://github.com/michaelnisi/feederpkg_feeder_commit = masterPACKAGES += find_cratepkg_find_crate_name = find_cratepkg_find_crate_description = Find Rust libs and exes in Erlang application priv directorypkg_find_crate_homepage = https://github.com/goertzenator/find_cratepkg_find_crate_fetch = gitpkg_find_crate_repo = https://github.com/goertzenator/find_cratepkg_find_crate_commit = masterPACKAGES += fixpkg_fix_name = fixpkg_fix_description = http://fixprotocol.org/ implementation.pkg_fix_homepage = https://github.com/maxlapshin/fixpkg_fix_fetch = gitpkg_fix_repo = https://github.com/maxlapshin/fixpkg_fix_commit = masterPACKAGES += flowerpkg_flower_name = flowerpkg_flower_description = FlowER - a Erlang OpenFlow development platformpkg_flower_homepage = https://github.com/travelping/flowerpkg_flower_fetch = gitpkg_flower_repo = https://github.com/travelping/flowerpkg_flower_commit = masterPACKAGES += fnpkg_fn_name = fnpkg_fn_description = Function utilities for Erlangpkg_fn_homepage = https://github.com/reiddraper/fnpkg_fn_fetch = gitpkg_fn_repo = https://github.com/reiddraper/fnpkg_fn_commit = masterPACKAGES += folsompkg_folsom_name = folsompkg_folsom_description = Expose Erlang Events and Metricspkg_folsom_homepage = https://github.com/boundary/folsompkg_folsom_fetch = gitpkg_folsom_repo = https://github.com/boundary/folsompkg_folsom_commit = masterPACKAGES += folsom_cowboypkg_folsom_cowboy_name = folsom_cowboypkg_folsom_cowboy_description = A Cowboy based Folsom HTTP Wrapper.pkg_folsom_cowboy_homepage = https://github.com/boundary/folsom_cowboypkg_folsom_cowboy_fetch = gitpkg_folsom_cowboy_repo = https://github.com/boundary/folsom_cowboypkg_folsom_cowboy_commit = masterPACKAGES += fspkg_fs_name = fspkg_fs_description = Erlang FileSystem Listenerpkg_fs_homepage = https://github.com/synrc/fspkg_fs_fetch = gitpkg_fs_repo = https://github.com/synrc/fspkg_fs_commit = masterPACKAGES += fusepkg_fuse_name = fusepkg_fuse_description = A Circuit Breaker for Erlangpkg_fuse_homepage = https://github.com/jlouis/fusepkg_fuse_fetch = gitpkg_fuse_repo = https://github.com/jlouis/fusepkg_fuse_commit = masterPACKAGES += gcmpkg_gcm_name = gcmpkg_gcm_description = An Erlang application for Google Cloud Messagingpkg_gcm_homepage = https://github.com/pdincau/gcm-erlangpkg_gcm_fetch = gitpkg_gcm_repo = https://github.com/pdincau/gcm-erlangpkg_gcm_commit = masterPACKAGES += gcprofpkg_gcprof_name = gcprofpkg_gcprof_description = Garbage Collection profiler for Erlangpkg_gcprof_homepage = https://github.com/knutin/gcprofpkg_gcprof_fetch = gitpkg_gcprof_repo = https://github.com/knutin/gcprofpkg_gcprof_commit = masterPACKAGES += geaspkg_geas_name = geaspkg_geas_description = Guess Erlang Application Scatteringpkg_geas_homepage = https://github.com/crownedgrouse/geaspkg_geas_fetch = gitpkg_geas_repo = https://github.com/crownedgrouse/geaspkg_geas_commit = masterPACKAGES += geefpkg_geef_name = geefpkg_geef_description = Git NEEEEF (Erlang NIF)pkg_geef_homepage = https://github.com/carlosmn/geefpkg_geef_fetch = gitpkg_geef_repo = https://github.com/carlosmn/geefpkg_geef_commit = masterPACKAGES += gen_coappkg_gen_coap_name = gen_coappkg_gen_coap_description = Generic Erlang CoAP Client/Serverpkg_gen_coap_homepage = https://github.com/gotthardp/gen_coappkg_gen_coap_fetch = gitpkg_gen_coap_repo = https://github.com/gotthardp/gen_coappkg_gen_coap_commit = masterPACKAGES += gen_cyclepkg_gen_cycle_name = gen_cyclepkg_gen_cycle_description = Simple, generic OTP behaviour for recurring taskspkg_gen_cycle_homepage = https://github.com/aerosol/gen_cyclepkg_gen_cycle_fetch = gitpkg_gen_cycle_repo = https://github.com/aerosol/gen_cyclepkg_gen_cycle_commit = developPACKAGES += gen_icmppkg_gen_icmp_name = gen_icmppkg_gen_icmp_description = Erlang interface to ICMP socketspkg_gen_icmp_homepage = https://github.com/msantos/gen_icmppkg_gen_icmp_fetch = gitpkg_gen_icmp_repo = https://github.com/msantos/gen_icmppkg_gen_icmp_commit = masterPACKAGES += gen_leaderpkg_gen_leader_name = gen_leaderpkg_gen_leader_description = leader election behaviorpkg_gen_leader_homepage = https://github.com/garret-smith/gen_leader_revivalpkg_gen_leader_fetch = gitpkg_gen_leader_repo = https://github.com/garret-smith/gen_leader_revivalpkg_gen_leader_commit = masterPACKAGES += gen_nb_serverpkg_gen_nb_server_name = gen_nb_serverpkg_gen_nb_server_description = OTP behavior for writing non-blocking serverspkg_gen_nb_server_homepage = https://github.com/kevsmith/gen_nb_serverpkg_gen_nb_server_fetch = gitpkg_gen_nb_server_repo = https://github.com/kevsmith/gen_nb_serverpkg_gen_nb_server_commit = masterPACKAGES += gen_paxospkg_gen_paxos_name = gen_paxospkg_gen_paxos_description = An Erlang/OTP-style implementation of the PAXOS distributed consensus protocolpkg_gen_paxos_homepage = https://github.com/gburd/gen_paxospkg_gen_paxos_fetch = gitpkg_gen_paxos_repo = https://github.com/gburd/gen_paxospkg_gen_paxos_commit = masterPACKAGES += gen_rpcpkg_gen_rpc_name = gen_rpcpkg_gen_rpc_description = A scalable RPC library for Erlang-VM based languagespkg_gen_rpc_homepage = https://github.com/priestjim/gen_rpc.gitpkg_gen_rpc_fetch = gitpkg_gen_rpc_repo = https://github.com/priestjim/gen_rpc.gitpkg_gen_rpc_commit = masterPACKAGES += gen_smtppkg_gen_smtp_name = gen_smtppkg_gen_smtp_description = A generic Erlang SMTP server and client that can be extended via callback modulespkg_gen_smtp_homepage = https://github.com/Vagabond/gen_smtppkg_gen_smtp_fetch = gitpkg_gen_smtp_repo = https://github.com/Vagabond/gen_smtppkg_gen_smtp_commit = masterPACKAGES += gen_trackerpkg_gen_tracker_name = gen_trackerpkg_gen_tracker_description = supervisor with ets handling of children and their metadatapkg_gen_tracker_homepage = https://github.com/erlyvideo/gen_trackerpkg_gen_tracker_fetch = gitpkg_gen_tracker_repo = https://github.com/erlyvideo/gen_trackerpkg_gen_tracker_commit = masterPACKAGES += gen_unixpkg_gen_unix_name = gen_unixpkg_gen_unix_description = Erlang Unix socket interfacepkg_gen_unix_homepage = https://github.com/msantos/gen_unixpkg_gen_unix_fetch = gitpkg_gen_unix_repo = https://github.com/msantos/gen_unixpkg_gen_unix_commit = masterPACKAGES += geodepkg_geode_name = geodepkg_geode_description = geohash/proximity lookup in pure, uncut erlang.pkg_geode_homepage = https://github.com/bradfordw/geodepkg_geode_fetch = gitpkg_geode_repo = https://github.com/bradfordw/geodepkg_geode_commit = masterPACKAGES += getoptpkg_getopt_name = getoptpkg_getopt_description = Module to parse command line arguments using the GNU getopt syntaxpkg_getopt_homepage = https://github.com/jcomellas/getoptpkg_getopt_fetch = gitpkg_getopt_repo = https://github.com/jcomellas/getoptpkg_getopt_commit = masterPACKAGES += gettextpkg_gettext_name = gettextpkg_gettext_description = Erlang internationalization library.pkg_gettext_homepage = https://github.com/etnt/gettextpkg_gettext_fetch = gitpkg_gettext_repo = https://github.com/etnt/gettextpkg_gettext_commit = masterPACKAGES += giallopkg_giallo_name = giallopkg_giallo_description = Small and flexible web framework on top of Cowboypkg_giallo_homepage = https://github.com/kivra/giallopkg_giallo_fetch = gitpkg_giallo_repo = https://github.com/kivra/giallopkg_giallo_commit = masterPACKAGES += ginpkg_gin_name = ginpkg_gin_description = The guards and for Erlang parse_transformpkg_gin_homepage = https://github.com/mad-cocktail/ginpkg_gin_fetch = gitpkg_gin_repo = https://github.com/mad-cocktail/ginpkg_gin_commit = masterPACKAGES += gittypkg_gitty_name = gittypkg_gitty_description = Git access in erlangpkg_gitty_homepage = https://github.com/maxlapshin/gittypkg_gitty_fetch = gitpkg_gitty_repo = https://github.com/maxlapshin/gittypkg_gitty_commit = masterPACKAGES += gpbpkg_gpb_name = gpbpkg_gpb_description = A Google Protobuf implementation for Erlangpkg_gpb_homepage = https://github.com/tomas-abrahamsson/gpbpkg_gpb_fetch = gitpkg_gpb_repo = https://github.com/tomas-abrahamsson/gpbpkg_gpb_commit = masterPACKAGES += gprocpkg_gproc_name = gprocpkg_gproc_description = Extended process registry for Erlangpkg_gproc_homepage = https://github.com/uwiger/gprocpkg_gproc_fetch = gitpkg_gproc_repo = https://github.com/uwiger/gprocpkg_gproc_commit = masterPACKAGES += grapherlpkg_grapherl_name = grapherlpkg_grapherl_description = Create graphs of Erlang systems and programspkg_grapherl_homepage = https://github.com/eproxus/grapherlpkg_grapherl_fetch = gitpkg_grapherl_repo = https://github.com/eproxus/grapherlpkg_grapherl_commit = masterPACKAGES += grpcpkg_grpc_name = grpcpkg_grpc_description = gRPC server in Erlangpkg_grpc_homepage = https://github.com/Bluehouse-Technology/grpcpkg_grpc_fetch = gitpkg_grpc_repo = https://github.com/Bluehouse-Technology/grpcpkg_grpc_commit = masterPACKAGES += grpc_clientpkg_grpc_client_name = grpc_clientpkg_grpc_client_description = gRPC client in Erlangpkg_grpc_client_homepage = https://github.com/Bluehouse-Technology/grpc_clientpkg_grpc_client_fetch = gitpkg_grpc_client_repo = https://github.com/Bluehouse-Technology/grpc_clientpkg_grpc_client_commit = masterPACKAGES += gunpkg_gun_name = gunpkg_gun_description = Asynchronous SPDY, HTTP and Websocket client written in Erlang.pkg_gun_homepage = http//ninenines.eupkg_gun_fetch = gitpkg_gun_repo = https://github.com/ninenines/gunpkg_gun_commit = masterPACKAGES += hackneypkg_hackney_name = hackneypkg_hackney_description = simple HTTP client in Erlangpkg_hackney_homepage = https://github.com/benoitc/hackneypkg_hackney_fetch = gitpkg_hackney_repo = https://github.com/benoitc/hackneypkg_hackney_commit = masterPACKAGES += hamcrestpkg_hamcrest_name = hamcrestpkg_hamcrest_description = Erlang port of Hamcrestpkg_hamcrest_homepage = https://github.com/hyperthunk/hamcrest-erlangpkg_hamcrest_fetch = gitpkg_hamcrest_repo = https://github.com/hyperthunk/hamcrest-erlangpkg_hamcrest_commit = masterPACKAGES += hottubpkg_hottub_name = hottubpkg_hottub_description = Permanent Erlang Worker Poolpkg_hottub_homepage = https://github.com/bfrog/hottubpkg_hottub_fetch = gitpkg_hottub_repo = https://github.com/bfrog/hottubpkg_hottub_commit = masterPACKAGES += hpackpkg_hpack_name = hpackpkg_hpack_description = HPACK Implementation for Erlangpkg_hpack_homepage = https://github.com/joedevivo/hpackpkg_hpack_fetch = gitpkg_hpack_repo = https://github.com/joedevivo/hpackpkg_hpack_commit = masterPACKAGES += hyperpkg_hyper_name = hyperpkg_hyper_description = Erlang implementation of HyperLogLogpkg_hyper_homepage = https://github.com/GameAnalytics/hyperpkg_hyper_fetch = gitpkg_hyper_repo = https://github.com/GameAnalytics/hyperpkg_hyper_commit = masterPACKAGES += i18npkg_i18n_name = i18npkg_i18n_description = International components for unicode from Erlang (unicode, date, string, number, format, locale, localization, transliteration, icu4e)pkg_i18n_homepage = https://github.com/erlang-unicode/i18npkg_i18n_fetch = gitpkg_i18n_repo = https://github.com/erlang-unicode/i18npkg_i18n_commit = masterPACKAGES += ibrowsepkg_ibrowse_name = ibrowsepkg_ibrowse_description = Erlang HTTP clientpkg_ibrowse_homepage = https://github.com/cmullaparthi/ibrowsepkg_ibrowse_fetch = gitpkg_ibrowse_repo = https://github.com/cmullaparthi/ibrowsepkg_ibrowse_commit = masterPACKAGES += idnapkg_idna_name = idnapkg_idna_description = Erlang IDNA libpkg_idna_homepage = https://github.com/benoitc/erlang-idnapkg_idna_fetch = gitpkg_idna_repo = https://github.com/benoitc/erlang-idnapkg_idna_commit = masterPACKAGES += irc_libpkg_irc_lib_name = irc_libpkg_irc_lib_description = Erlang irc client librarypkg_irc_lib_homepage = https://github.com/OtpChatBot/irc_libpkg_irc_lib_fetch = gitpkg_irc_lib_repo = https://github.com/OtpChatBot/irc_libpkg_irc_lib_commit = masterPACKAGES += ircdpkg_ircd_name = ircdpkg_ircd_description = A pluggable IRC daemon application/library for Erlang.pkg_ircd_homepage = https://github.com/tonyg/erlang-ircdpkg_ircd_fetch = gitpkg_ircd_repo = https://github.com/tonyg/erlang-ircdpkg_ircd_commit = masterPACKAGES += irispkg_iris_name = irispkg_iris_description = Iris Erlang bindingpkg_iris_homepage = https://github.com/project-iris/iris-erlpkg_iris_fetch = gitpkg_iris_repo = https://github.com/project-iris/iris-erlpkg_iris_commit = masterPACKAGES += iso8601pkg_iso8601_name = iso8601pkg_iso8601_description = Erlang ISO 8601 date formatter/parserpkg_iso8601_homepage = https://github.com/seansawyer/erlang_iso8601pkg_iso8601_fetch = gitpkg_iso8601_repo = https://github.com/seansawyer/erlang_iso8601pkg_iso8601_commit = masterPACKAGES += jamdb_sybasepkg_jamdb_sybase_name = jamdb_sybasepkg_jamdb_sybase_description = Erlang driver for SAP Sybase ASEpkg_jamdb_sybase_homepage = https://github.com/erlangbureau/jamdb_sybasepkg_jamdb_sybase_fetch = gitpkg_jamdb_sybase_repo = https://github.com/erlangbureau/jamdb_sybasepkg_jamdb_sybase_commit = masterPACKAGES += jessepkg_jesse_name = jessepkg_jesse_description = jesse (JSon Schema Erlang) is an implementation of a json schema validator for Erlang.pkg_jesse_homepage = https://github.com/for-GET/jessepkg_jesse_fetch = gitpkg_jesse_repo = https://github.com/for-GET/jessepkg_jesse_commit = masterPACKAGES += jiffypkg_jiffy_name = jiffypkg_jiffy_description = JSON NIFs for Erlang.pkg_jiffy_homepage = https://github.com/davisp/jiffypkg_jiffy_fetch = gitpkg_jiffy_repo = https://github.com/davisp/jiffypkg_jiffy_commit = masterPACKAGES += jiffy_vpkg_jiffy_v_name = jiffy_vpkg_jiffy_v_description = JSON validation utilitypkg_jiffy_v_homepage = https://github.com/shizzard/jiffy-vpkg_jiffy_v_fetch = gitpkg_jiffy_v_repo = https://github.com/shizzard/jiffy-vpkg_jiffy_v_commit = masterPACKAGES += jobspkg_jobs_name = jobspkg_jobs_description = Job scheduler for load regulationpkg_jobs_homepage = https://github.com/uwiger/jobspkg_jobs_fetch = gitpkg_jobs_repo = https://github.com/uwiger/jobspkg_jobs_commit = masterPACKAGES += joxapkg_joxa_name = joxapkg_joxa_description = A Modern Lisp for the Erlang VMpkg_joxa_homepage = https://github.com/joxa/joxapkg_joxa_fetch = gitpkg_joxa_repo = https://github.com/joxa/joxapkg_joxa_commit = masterPACKAGES += json_recpkg_json_rec_name = json_recpkg_json_rec_description = JSON to erlang recordpkg_json_rec_homepage = https://github.com/justinkirby/json_recpkg_json_rec_fetch = gitpkg_json_rec_repo = https://github.com/justinkirby/json_recpkg_json_rec_commit = masterPACKAGES += jsonepkg_jsone_name = jsonepkg_jsone_description = An Erlang library for encoding, decoding JSON data.pkg_jsone_homepage = https://github.com/sile/jsone.gitpkg_jsone_fetch = gitpkg_jsone_repo = https://github.com/sile/jsone.gitpkg_jsone_commit = masterPACKAGES += jsonpathpkg_jsonpath_name = jsonpathpkg_jsonpath_description = Fast Erlang JSON data retrieval and updates via javascript-like notationpkg_jsonpath_homepage = https://github.com/GeneStevens/jsonpathpkg_jsonpath_fetch = gitpkg_jsonpath_repo = https://github.com/GeneStevens/jsonpathpkg_jsonpath_commit = masterPACKAGES += jsonxpkg_jsonx_name = jsonxpkg_jsonx_description = JSONX is an Erlang library for efficient decode and encode JSON, written in C.pkg_jsonx_homepage = https://github.com/iskra/jsonxpkg_jsonx_fetch = gitpkg_jsonx_repo = https://github.com/iskra/jsonxpkg_jsonx_commit = masterPACKAGES += jsxpkg_jsx_name = jsxpkg_jsx_description = An Erlang application for consuming, producing and manipulating JSON.pkg_jsx_homepage = https://github.com/talentdeficit/jsxpkg_jsx_fetch = gitpkg_jsx_repo = https://github.com/talentdeficit/jsxpkg_jsx_commit = mainPACKAGES += kafka_protocolpkg_kafka_protocol_name = kafka_protocolpkg_kafka_protocol_description = Kafka protocol Erlang librarypkg_kafka_protocol_homepage = https://github.com/kafka4beam/kafka_protocolpkg_kafka_protocol_fetch = gitpkg_kafka_protocol_repo = https://github.com/kafka4beam/kafka_protocolpkg_kafka_protocol_commit = masterPACKAGES += kaipkg_kai_name = kaipkg_kai_description = DHT storage by Takeshi Inouepkg_kai_homepage = https://github.com/synrc/kaipkg_kai_fetch = gitpkg_kai_repo = https://github.com/synrc/kaipkg_kai_commit = masterPACKAGES += katjapkg_katja_name = katjapkg_katja_description = A simple Riemann client written in Erlang.pkg_katja_homepage = https://github.com/nifoc/katjapkg_katja_fetch = gitpkg_katja_repo = https://github.com/nifoc/katjapkg_katja_commit = masterPACKAGES += key2valuepkg_key2value_name = key2valuepkg_key2value_description = Erlang 2-way mappkg_key2value_homepage = https://github.com/okeuday/key2valuepkg_key2value_fetch = gitpkg_key2value_repo = https://github.com/okeuday/key2valuepkg_key2value_commit = masterPACKAGES += keys1valuepkg_keys1value_name = keys1valuepkg_keys1value_description = Erlang set associative map for key listspkg_keys1value_homepage = https://github.com/okeuday/keys1valuepkg_keys1value_fetch = gitpkg_keys1value_repo = https://github.com/okeuday/keys1valuepkg_keys1value_commit = masterPACKAGES += kineticpkg_kinetic_name = kineticpkg_kinetic_description = Erlang Kinesis Clientpkg_kinetic_homepage = https://github.com/AdRoll/kineticpkg_kinetic_fetch = gitpkg_kinetic_repo = https://github.com/AdRoll/kineticpkg_kinetic_commit = mainPACKAGES += kjellpkg_kjell_name = kjellpkg_kjell_description = Erlang Shellpkg_kjell_homepage = https://github.com/karlll/kjellpkg_kjell_fetch = gitpkg_kjell_repo = https://github.com/karlll/kjellpkg_kjell_commit = masterPACKAGES += krakenpkg_kraken_name = krakenpkg_kraken_description = Distributed Pubsub Server for Realtime Appspkg_kraken_homepage = https://github.com/Asana/krakenpkg_kraken_fetch = gitpkg_kraken_repo = https://github.com/Asana/krakenpkg_kraken_commit = masterPACKAGES += kucumberlpkg_kucumberl_name = kucumberlpkg_kucumberl_description = A pure-erlang, open-source, implementation of Cucumberpkg_kucumberl_homepage = https://github.com/openshine/kucumberlpkg_kucumberl_fetch = gitpkg_kucumberl_repo = https://github.com/openshine/kucumberlpkg_kucumberl_commit = masterPACKAGES += kvcpkg_kvc_name = kvcpkg_kvc_description = KVC - Key Value Coding for Erlang data structurespkg_kvc_homepage = https://github.com/etrepum/kvcpkg_kvc_fetch = gitpkg_kvc_repo = https://github.com/etrepum/kvcpkg_kvc_commit = masterPACKAGES += kvlistspkg_kvlists_name = kvlistspkg_kvlists_description = Lists of key-value pairs (decoded JSON) in Erlangpkg_kvlists_homepage = https://github.com/jcomellas/kvlistspkg_kvlists_fetch = gitpkg_kvlists_repo = https://github.com/jcomellas/kvlistspkg_kvlists_commit = masterPACKAGES += kvspkg_kvs_name = kvspkg_kvs_description = Container and Iteratorpkg_kvs_homepage = https://github.com/synrc/kvspkg_kvs_fetch = gitpkg_kvs_repo = https://github.com/synrc/kvspkg_kvs_commit = masterPACKAGES += lagerpkg_lager_name = lagerpkg_lager_description = A logging framework for Erlang/OTP.pkg_lager_homepage = https://github.com/erlang-lager/lagerpkg_lager_fetch = gitpkg_lager_repo = https://github.com/erlang-lager/lagerpkg_lager_commit = masterPACKAGES += lager_syslogpkg_lager_syslog_name = lager_syslogpkg_lager_syslog_description = Syslog backend for lagerpkg_lager_syslog_homepage = https://github.com/erlang-lager/lager_syslogpkg_lager_syslog_fetch = gitpkg_lager_syslog_repo = https://github.com/erlang-lager/lager_syslogpkg_lager_syslog_commit = masterPACKAGES += lassepkg_lasse_name = lassepkg_lasse_description = SSE handler for Cowboypkg_lasse_homepage = https://github.com/inaka/lassepkg_lasse_fetch = gitpkg_lasse_repo = https://github.com/inaka/lassepkg_lasse_commit = masterPACKAGES += ldappkg_ldap_name = ldappkg_ldap_description = LDAP server written in Erlangpkg_ldap_homepage = https://github.com/spawnproc/ldappkg_ldap_fetch = gitpkg_ldap_repo = https://github.com/spawnproc/ldappkg_ldap_commit = masterPACKAGES += lfepkg_lfe_name = lfepkg_lfe_description = Lisp Flavoured Erlang (LFE)pkg_lfe_homepage = https://github.com/rvirding/lfepkg_lfe_fetch = gitpkg_lfe_repo = https://github.com/rvirding/lfepkg_lfe_commit = masterPACKAGES += livepkg_live_name = livepkg_live_description = Automated module and configuration reloader.pkg_live_homepage = http://ninenines.eupkg_live_fetch = gitpkg_live_repo = https://github.com/ninenines/livepkg_live_commit = masterPACKAGES += lockerpkg_locker_name = lockerpkg_locker_description = Atomic distributed 'check and set' for short-lived keyspkg_locker_homepage = https://github.com/wooga/lockerpkg_locker_fetch = gitpkg_locker_repo = https://github.com/wooga/lockerpkg_locker_commit = masterPACKAGES += lockspkg_locks_name = lockspkg_locks_description = A scalable, deadlock-resolving resource lockerpkg_locks_homepage = https://github.com/uwiger/lockspkg_locks_fetch = gitpkg_locks_repo = https://github.com/uwiger/lockspkg_locks_commit = masterPACKAGES += log4erlpkg_log4erl_name = log4erlpkg_log4erl_description = A logger for erlang in the spirit of Log4J.pkg_log4erl_homepage = https://github.com/ahmednawras/log4erlpkg_log4erl_fetch = gitpkg_log4erl_repo = https://github.com/ahmednawras/log4erlpkg_log4erl_commit = masterPACKAGES += lolpkg_lol_name = lolpkg_lol_description = Lisp on erLang, and programming is fun againpkg_lol_homepage = https://github.com/b0oh/lolpkg_lol_fetch = gitpkg_lol_repo = https://github.com/b0oh/lolpkg_lol_commit = masterPACKAGES += lucidpkg_lucid_name = lucidpkg_lucid_description = HTTP/2 server written in Erlangpkg_lucid_homepage = https://github.com/tatsuhiro-t/lucidpkg_lucid_fetch = gitpkg_lucid_repo = https://github.com/tatsuhiro-t/lucidpkg_lucid_commit = masterPACKAGES += luerlpkg_luerl_name = luerlpkg_luerl_description = Lua in Erlangpkg_luerl_homepage = https://github.com/rvirding/luerlpkg_luerl_fetch = gitpkg_luerl_repo = https://github.com/rvirding/luerlpkg_luerl_commit = developPACKAGES += luxpkg_lux_name = luxpkg_lux_description = Lux (LUcid eXpect scripting) simplifies test automation and provides an Expect-style execution of commandspkg_lux_homepage = https://github.com/hawk/luxpkg_lux_fetch = gitpkg_lux_repo = https://github.com/hawk/luxpkg_lux_commit = masterPACKAGES += madpkg_mad_name = madpkg_mad_description = Small and Fast Rebar Replacementpkg_mad_homepage = https://github.com/synrc/madpkg_mad_fetch = gitpkg_mad_repo = https://github.com/synrc/madpkg_mad_commit = masterPACKAGES += marinapkg_marina_name = marinapkg_marina_description = Non-blocking Erlang Cassandra CQL3 clientpkg_marina_homepage = https://github.com/lpgauth/marinapkg_marina_fetch = gitpkg_marina_repo = https://github.com/lpgauth/marinapkg_marina_commit = masterPACKAGES += mavgpkg_mavg_name = mavgpkg_mavg_description = Erlang :: Exponential moving average librarypkg_mavg_homepage = https://github.com/EchoTeam/mavgpkg_mavg_fetch = gitpkg_mavg_repo = https://github.com/EchoTeam/mavgpkg_mavg_commit = masterPACKAGES += meckpkg_meck_name = meckpkg_meck_description = A mocking library for Erlangpkg_meck_homepage = https://github.com/eproxus/meckpkg_meck_fetch = gitpkg_meck_repo = https://github.com/eproxus/meckpkg_meck_commit = masterPACKAGES += mekaopkg_mekao_name = mekaopkg_mekao_description = SQL constructorpkg_mekao_homepage = https://github.com/ddosia/mekaopkg_mekao_fetch = gitpkg_mekao_repo = https://github.com/ddosia/mekaopkg_mekao_commit = masterPACKAGES += merlpkg_merl_name = merlpkg_merl_description = Metaprogramming in Erlangpkg_merl_homepage = https://github.com/richcarl/merlpkg_merl_fetch = gitpkg_merl_repo = https://github.com/richcarl/merlpkg_merl_commit = masterPACKAGES += mimerlpkg_mimerl_name = mimerlpkg_mimerl_description = library to handle mimetypespkg_mimerl_homepage = https://github.com/benoitc/mimerlpkg_mimerl_fetch = gitpkg_mimerl_repo = https://github.com/benoitc/mimerlpkg_mimerl_commit = masterPACKAGES += mimetypespkg_mimetypes_name = mimetypespkg_mimetypes_description = Erlang MIME types librarypkg_mimetypes_homepage = https://github.com/spawngrid/mimetypespkg_mimetypes_fetch = gitpkg_mimetypes_repo = https://github.com/spawngrid/mimetypespkg_mimetypes_commit = masterPACKAGES += mixerpkg_mixer_name = mixerpkg_mixer_description = Mix in functions from other modulespkg_mixer_homepage = https://github.com/chef/mixerpkg_mixer_fetch = gitpkg_mixer_repo = https://github.com/chef/mixerpkg_mixer_commit = mainPACKAGES += mochiwebpkg_mochiweb_name = mochiwebpkg_mochiweb_description = MochiWeb is an Erlang library for building lightweight HTTP servers.pkg_mochiweb_homepage = https://github.com/mochi/mochiwebpkg_mochiweb_fetch = gitpkg_mochiweb_repo = https://github.com/mochi/mochiwebpkg_mochiweb_commit = mainPACKAGES += mochiweb_xpathpkg_mochiweb_xpath_name = mochiweb_xpathpkg_mochiweb_xpath_description = XPath support for mochiweb's html parserpkg_mochiweb_xpath_homepage = https://github.com/retnuh/mochiweb_xpathpkg_mochiweb_xpath_fetch = gitpkg_mochiweb_xpath_repo = https://github.com/retnuh/mochiweb_xpathpkg_mochiweb_xpath_commit = masterPACKAGES += mockgyverpkg_mockgyver_name = mockgyverpkg_mockgyver_description = A mocking library for Erlangpkg_mockgyver_homepage = https://github.com/klajo/mockgyverpkg_mockgyver_fetch = gitpkg_mockgyver_repo = https://github.com/klajo/mockgyverpkg_mockgyver_commit = masterPACKAGES += modlibpkg_modlib_name = modlibpkg_modlib_description = Web framework based on Erlang's inets httpdpkg_modlib_homepage = https://github.com/gar1t/modlibpkg_modlib_fetch = gitpkg_modlib_repo = https://github.com/gar1t/modlibpkg_modlib_commit = masterPACKAGES += mongodbpkg_mongodb_name = mongodbpkg_mongodb_description = MongoDB driver for Erlangpkg_mongodb_homepage = https://github.com/comtihon/mongodb-erlangpkg_mongodb_fetch = gitpkg_mongodb_repo = https://github.com/comtihon/mongodb-erlangpkg_mongodb_commit = masterPACKAGES += mongooseimpkg_mongooseim_name = mongooseimpkg_mongooseim_description = Jabber / XMPP server with focus on performance and scalability, by Erlang Solutionspkg_mongooseim_homepage = https://www.erlang-solutions.com/products/mongooseim-massively-scalable-ejabberd-platformpkg_mongooseim_fetch = gitpkg_mongooseim_repo = https://github.com/esl/MongooseIMpkg_mongooseim_commit = masterPACKAGES += moyopkg_moyo_name = moyopkg_moyo_description = Erlang utility functions librarypkg_moyo_homepage = https://github.com/dwango/moyopkg_moyo_fetch = gitpkg_moyo_repo = https://github.com/dwango/moyopkg_moyo_commit = masterPACKAGES += msgpackpkg_msgpack_name = msgpackpkg_msgpack_description = MessagePack (de)serializer implementation for Erlangpkg_msgpack_homepage = https://github.com/msgpack/msgpack-erlangpkg_msgpack_fetch = gitpkg_msgpack_repo = https://github.com/msgpack/msgpack-erlangpkg_msgpack_commit = masterPACKAGES += mu2pkg_mu2_name = mu2pkg_mu2_description = Erlang mutation testing toolpkg_mu2_homepage = https://github.com/ramsay-t/mu2pkg_mu2_fetch = gitpkg_mu2_repo = https://github.com/ramsay-t/mu2pkg_mu2_commit = masterPACKAGES += mustachepkg_mustache_name = mustachepkg_mustache_description = Mustache template engine for Erlang.pkg_mustache_homepage = https://github.com/mojombo/mustache.erlpkg_mustache_fetch = gitpkg_mustache_repo = https://github.com/mojombo/mustache.erlpkg_mustache_commit = masterPACKAGES += myprotopkg_myproto_name = myprotopkg_myproto_description = MySQL Server Protocol in Erlangpkg_myproto_homepage = https://github.com/altenwald/myprotopkg_myproto_fetch = gitpkg_myproto_repo = https://github.com/altenwald/myprotopkg_myproto_commit = masterPACKAGES += mysqlpkg_mysql_name = mysqlpkg_mysql_description = MySQL client library for Erlang/OTPpkg_mysql_homepage = https://github.com/mysql-otp/mysql-otppkg_mysql_fetch = gitpkg_mysql_repo = https://github.com/mysql-otp/mysql-otppkg_mysql_commit = 1.7.0PACKAGES += n2opkg_n2o_name = n2opkg_n2o_description = WebSocket Application Serverpkg_n2o_homepage = https://github.com/5HT/n2opkg_n2o_fetch = gitpkg_n2o_repo = https://github.com/5HT/n2opkg_n2o_commit = masterPACKAGES += nat_upnppkg_nat_upnp_name = nat_upnppkg_nat_upnp_description = Erlang library to map your internal port to an external using UNP IGDpkg_nat_upnp_homepage = https://github.com/benoitc/nat_upnppkg_nat_upnp_fetch = gitpkg_nat_upnp_repo = https://github.com/benoitc/nat_upnppkg_nat_upnp_commit = masterPACKAGES += neo4jpkg_neo4j_name = neo4jpkg_neo4j_description = Erlang client library for Neo4J.pkg_neo4j_homepage = https://github.com/dmitriid/neo4j-erlangpkg_neo4j_fetch = gitpkg_neo4j_repo = https://github.com/dmitriid/neo4j-erlangpkg_neo4j_commit = masterPACKAGES += neotomapkg_neotoma_name = neotomapkg_neotoma_description = Erlang library and packrat parser-generator for parsing expression grammars.pkg_neotoma_homepage = https://github.com/seancribbs/neotomapkg_neotoma_fetch = gitpkg_neotoma_repo = https://github.com/seancribbs/neotomapkg_neotoma_commit = masterPACKAGES += niftypkg_nifty_name = niftypkg_nifty_description = Erlang NIF wrapper generatorpkg_nifty_homepage = https://github.com/parapluu/niftypkg_nifty_fetch = gitpkg_nifty_repo = https://github.com/parapluu/niftypkg_nifty_commit = masterPACKAGES += nitrogen_corepkg_nitrogen_core_name = nitrogen_corepkg_nitrogen_core_description = The core Nitrogen library.pkg_nitrogen_core_homepage = http://nitrogenproject.com/pkg_nitrogen_core_fetch = gitpkg_nitrogen_core_repo = https://github.com/nitrogen/nitrogen_corepkg_nitrogen_core_commit = masterPACKAGES += nkpacketpkg_nkpacket_name = nkpacketpkg_nkpacket_description = Generic Erlang transport layerpkg_nkpacket_homepage = https://github.com/Nekso/nkpacketpkg_nkpacket_fetch = gitpkg_nkpacket_repo = https://github.com/Nekso/nkpacketpkg_nkpacket_commit = masterPACKAGES += nksippkg_nksip_name = nksippkg_nksip_description = Erlang SIP application serverpkg_nksip_homepage = https://github.com/kalta/nksippkg_nksip_fetch = gitpkg_nksip_repo = https://github.com/kalta/nksippkg_nksip_commit = masterPACKAGES += nodefinderpkg_nodefinder_name = nodefinderpkg_nodefinder_description = automatic node discovery via UDP multicastpkg_nodefinder_homepage = https://github.com/erlanger/nodefinderpkg_nodefinder_fetch = gitpkg_nodefinder_repo = https://github.com/okeuday/nodefinderpkg_nodefinder_commit = masterPACKAGES += nprocregpkg_nprocreg_name = nprocregpkg_nprocreg_description = Minimal Distributed Erlang Process Registrypkg_nprocreg_homepage = http://nitrogenproject.com/pkg_nprocreg_fetch = gitpkg_nprocreg_repo = https://github.com/nitrogen/nprocregpkg_nprocreg_commit = masterPACKAGES += oauthpkg_oauth_name = oauthpkg_oauth_description = An Erlang OAuth 1.0 implementationpkg_oauth_homepage = https://github.com/tim/erlang-oauthpkg_oauth_fetch = gitpkg_oauth_repo = https://github.com/tim/erlang-oauthpkg_oauth_commit = mainPACKAGES += oauth2pkg_oauth2_name = oauth2pkg_oauth2_description = Erlang Oauth2 implementationpkg_oauth2_homepage = https://github.com/kivra/oauth2pkg_oauth2_fetch = gitpkg_oauth2_repo = https://github.com/kivra/oauth2pkg_oauth2_commit = masterPACKAGES += observer_clipkg_observer_cli_name = observer_clipkg_observer_cli_description = Visualize Erlang/Elixir Nodes On The Command Linepkg_observer_cli_homepage = http://zhongwencool.github.io/observer_clipkg_observer_cli_fetch = gitpkg_observer_cli_repo = https://github.com/zhongwencool/observer_clipkg_observer_cli_commit = masterPACKAGES += octopuspkg_octopus_name = octopuspkg_octopus_description = Small and flexible pool manager written in Erlangpkg_octopus_homepage = https://github.com/erlangbureau/octopuspkg_octopus_fetch = gitpkg_octopus_repo = https://github.com/erlangbureau/octopuspkg_octopus_commit = masterPACKAGES += openflowpkg_openflow_name = openflowpkg_openflow_description = An OpenFlow controller written in pure erlangpkg_openflow_homepage = https://github.com/renatoaguiar/erlang-openflowpkg_openflow_fetch = gitpkg_openflow_repo = https://github.com/renatoaguiar/erlang-openflowpkg_openflow_commit = masterPACKAGES += openidpkg_openid_name = openidpkg_openid_description = Erlang OpenIDpkg_openid_homepage = https://github.com/brendonh/erl_openidpkg_openid_fetch = gitpkg_openid_repo = https://github.com/brendonh/erl_openidpkg_openid_commit = masterPACKAGES += openpokerpkg_openpoker_name = openpokerpkg_openpoker_description = Genesis Texas hold'em Game Serverpkg_openpoker_homepage = https://github.com/hpyhacking/openpokerpkg_openpoker_fetch = gitpkg_openpoker_repo = https://github.com/hpyhacking/openpokerpkg_openpoker_commit = masterPACKAGES += otpbppkg_otpbp_name = otpbppkg_otpbp_description = Parse transformer for use new OTP functions in old Erlang/OTP releases (R15, R16, 17, 18, 19)pkg_otpbp_homepage = https://github.com/Ledest/otpbppkg_otpbp_fetch = gitpkg_otpbp_repo = https://github.com/Ledest/otpbppkg_otpbp_commit = masterPACKAGES += palpkg_pal_name = palpkg_pal_description = Pragmatic Authentication Librarypkg_pal_homepage = https://github.com/manifest/palpkg_pal_fetch = gitpkg_pal_repo = https://github.com/manifest/palpkg_pal_commit = masterPACKAGES += parse_transpkg_parse_trans_name = parse_transpkg_parse_trans_description = Parse transform utilities for Erlangpkg_parse_trans_homepage = https://github.com/uwiger/parse_transpkg_parse_trans_fetch = gitpkg_parse_trans_repo = https://github.com/uwiger/parse_transpkg_parse_trans_commit = masterPACKAGES += parsexmlpkg_parsexml_name = parsexmlpkg_parsexml_description = Simple DOM XML parser with convenient and very simple APIpkg_parsexml_homepage = https://github.com/maxlapshin/parsexmlpkg_parsexml_fetch = gitpkg_parsexml_repo = https://github.com/maxlapshin/parsexmlpkg_parsexml_commit = masterPACKAGES += partisanpkg_partisan_name = partisanpkg_partisan_description = High-performance, high-scalability distributed computing with Erlang and Elixir.pkg_partisan_homepage = http://partisan.cloudpkg_partisan_fetch = gitpkg_partisan_repo = https://github.com/lasp-lang/partisanpkg_partisan_commit = masterPACKAGES += pegjspkg_pegjs_name = pegjspkg_pegjs_description = An implementation of PEG.js grammar for Erlang.pkg_pegjs_homepage = https://github.com/dmitriid/pegjspkg_pegjs_fetch = gitpkg_pegjs_repo = https://github.com/dmitriid/pegjspkg_pegjs_commit = masterPACKAGES += percept2pkg_percept2_name = percept2pkg_percept2_description = Concurrent profiling tool for Erlangpkg_percept2_homepage = https://github.com/huiqing/percept2pkg_percept2_fetch = gitpkg_percept2_repo = https://github.com/huiqing/percept2pkg_percept2_commit = masterPACKAGES += pgopkg_pgo_name = pgopkg_pgo_description = Erlang Postgres client and connection poolpkg_pgo_homepage = https://github.com/erleans/pgo.gitpkg_pgo_fetch = gitpkg_pgo_repo = https://github.com/erleans/pgo.gitpkg_pgo_commit = mainPACKAGES += pgsqlpkg_pgsql_name = pgsqlpkg_pgsql_description = Erlang PostgreSQL driverpkg_pgsql_homepage = https://github.com/semiocast/pgsqlpkg_pgsql_fetch = gitpkg_pgsql_repo = https://github.com/semiocast/pgsqlpkg_pgsql_commit = masterPACKAGES += pkgxpkg_pkgx_name = pkgxpkg_pkgx_description = Build .deb packages from Erlang releasespkg_pkgx_homepage = https://github.com/arjan/pkgxpkg_pkgx_fetch = gitpkg_pkgx_repo = https://github.com/arjan/pkgxpkg_pkgx_commit = masterPACKAGES += pktpkg_pkt_name = pktpkg_pkt_description = Erlang network protocol librarypkg_pkt_homepage = https://github.com/msantos/pktpkg_pkt_fetch = gitpkg_pkt_repo = https://github.com/msantos/pktpkg_pkt_commit = masterPACKAGES += plain_fsmpkg_plain_fsm_name = plain_fsmpkg_plain_fsm_description = A behaviour/support library for writing plain Erlang FSMs.pkg_plain_fsm_homepage = https://github.com/uwiger/plain_fsmpkg_plain_fsm_fetch = gitpkg_plain_fsm_repo = https://github.com/uwiger/plain_fsmpkg_plain_fsm_commit = masterPACKAGES += pmod_transformpkg_pmod_transform_name = pmod_transformpkg_pmod_transform_description = Parse transform for parameterized modulespkg_pmod_transform_homepage = https://github.com/erlang/pmod_transformpkg_pmod_transform_fetch = gitpkg_pmod_transform_repo = https://github.com/erlang/pmod_transformpkg_pmod_transform_commit = masterPACKAGES += poboxpkg_pobox_name = poboxpkg_pobox_description = External buffer processes to protect against mailbox overflow in Erlangpkg_pobox_homepage = https://github.com/ferd/poboxpkg_pobox_fetch = gitpkg_pobox_repo = https://github.com/ferd/poboxpkg_pobox_commit = masterPACKAGES += ponospkg_ponos_name = ponospkg_ponos_description = ponos is a simple yet powerful load generator written in erlangpkg_ponos_homepage = https://github.com/klarna/ponospkg_ponos_fetch = gitpkg_ponos_repo = https://github.com/klarna/ponospkg_ponos_commit = masterPACKAGES += poolboypkg_poolboy_name = poolboypkg_poolboy_description = A hunky Erlang worker pool factorypkg_poolboy_homepage = https://github.com/devinus/poolboypkg_poolboy_fetch = gitpkg_poolboy_repo = https://github.com/devinus/poolboypkg_poolboy_commit = masterPACKAGES += poolerpkg_pooler_name = poolerpkg_pooler_description = An OTP Process Pool Applicationpkg_pooler_homepage = https://github.com/seth/poolerpkg_pooler_fetch = gitpkg_pooler_repo = https://github.com/seth/poolerpkg_pooler_commit = masterPACKAGES += pqueuepkg_pqueue_name = pqueuepkg_pqueue_description = Erlang Priority Queuespkg_pqueue_homepage = https://github.com/okeuday/pqueuepkg_pqueue_fetch = gitpkg_pqueue_repo = https://github.com/okeuday/pqueuepkg_pqueue_commit = masterPACKAGES += procketpkg_procket_name = procketpkg_procket_description = Erlang interface to low level socket operationspkg_procket_homepage = http://blog.listincomprehension.com/search/label/procketpkg_procket_fetch = gitpkg_procket_repo = https://github.com/msantos/procketpkg_procket_commit = masterPACKAGES += prometheuspkg_prometheus_name = prometheuspkg_prometheus_description = Prometheus.io client in Erlangpkg_prometheus_homepage = https://github.com/deadtrickster/prometheus.erlpkg_prometheus_fetch = gitpkg_prometheus_repo = https://github.com/deadtrickster/prometheus.erlpkg_prometheus_commit = masterPACKAGES += proppkg_prop_name = proppkg_prop_description = An Erlang code scaffolding and generator system.pkg_prop_homepage = https://github.com/nuex/proppkg_prop_fetch = gitpkg_prop_repo = https://github.com/nuex/proppkg_prop_commit = masterPACKAGES += properpkg_proper_name = properpkg_proper_description = PropEr: a QuickCheck-inspired property-based testing tool for Erlang.pkg_proper_homepage = http://proper.softlab.ntua.grpkg_proper_fetch = gitpkg_proper_repo = https://github.com/manopapad/properpkg_proper_commit = masterPACKAGES += propspkg_props_name = propspkg_props_description = Property structure librarypkg_props_homepage = https://github.com/greyarea/propspkg_props_fetch = gitpkg_props_repo = https://github.com/greyarea/propspkg_props_commit = masterPACKAGES += protobuffspkg_protobuffs_name = protobuffspkg_protobuffs_description = An implementation of Google's Protocol Buffers for Erlang, based on ngerakines/erlang_protobuffs.pkg_protobuffs_homepage = https://github.com/basho/erlang_protobuffspkg_protobuffs_fetch = gitpkg_protobuffs_repo = https://github.com/basho/erlang_protobuffspkg_protobuffs_commit = masterPACKAGES += psychopkg_psycho_name = psychopkg_psycho_description = HTTP server that provides a WSGI-like interface for applications and middleware.pkg_psycho_homepage = https://github.com/gar1t/psychopkg_psycho_fetch = gitpkg_psycho_repo = https://github.com/gar1t/psychopkg_psycho_commit = masterPACKAGES += puritypkg_purity_name = puritypkg_purity_description = A side-effect analyzer for Erlangpkg_purity_homepage = https://github.com/mpitid/puritypkg_purity_fetch = gitpkg_purity_repo = https://github.com/mpitid/puritypkg_purity_commit = masterPACKAGES += qdatepkg_qdate_name = qdatepkg_qdate_description = Date, time, and timezone parsing, formatting, and conversion for Erlang.pkg_qdate_homepage = https://github.com/choptastic/qdatepkg_qdate_fetch = gitpkg_qdate_repo = https://github.com/choptastic/qdatepkg_qdate_commit = masterPACKAGES += qrcodepkg_qrcode_name = qrcodepkg_qrcode_description = QR Code encoder in Erlangpkg_qrcode_homepage = https://github.com/komone/qrcodepkg_qrcode_fetch = gitpkg_qrcode_repo = https://github.com/komone/qrcodepkg_qrcode_commit = masterPACKAGES += questpkg_quest_name = questpkg_quest_description = Learn Erlang through this set of challenges. An interactive system for getting to know Erlang.pkg_quest_homepage = https://github.com/eriksoe/ErlangQuestpkg_quest_fetch = gitpkg_quest_repo = https://github.com/eriksoe/ErlangQuestpkg_quest_commit = masterPACKAGES += quickrandpkg_quickrand_name = quickrandpkg_quickrand_description = Quick Erlang Random Number Generationpkg_quickrand_homepage = https://github.com/okeuday/quickrandpkg_quickrand_fetch = gitpkg_quickrand_repo = https://github.com/okeuday/quickrandpkg_quickrand_commit = masterPACKAGES += rabbit_exchange_type_riakpkg_rabbit_exchange_type_riak_name = rabbit_exchange_type_riakpkg_rabbit_exchange_type_riak_description = Custom RabbitMQ exchange type for sticking messages in Riakpkg_rabbit_exchange_type_riak_homepage = https://github.com/jbrisbin/riak-exchangepkg_rabbit_exchange_type_riak_fetch = gitpkg_rabbit_exchange_type_riak_repo = https://github.com/jbrisbin/riak-exchangepkg_rabbit_exchange_type_riak_commit = masterPACKAGES += rackpkg_rack_name = rackpkg_rack_description = Rack handler for erlangpkg_rack_homepage = https://github.com/erlyvideo/rackpkg_rack_fetch = gitpkg_rack_repo = https://github.com/erlyvideo/rackpkg_rack_commit = masterPACKAGES += radierlpkg_radierl_name = radierlpkg_radierl_description = RADIUS protocol stack implemented in Erlang.pkg_radierl_homepage = https://github.com/vances/radierlpkg_radierl_fetch = gitpkg_radierl_repo = https://github.com/vances/radierlpkg_radierl_commit = masterPACKAGES += ranchpkg_ranch_name = ranchpkg_ranch_description = Socket acceptor pool for TCP protocols.pkg_ranch_homepage = http://ninenines.eupkg_ranch_fetch = gitpkg_ranch_repo = https://github.com/ninenines/ranchpkg_ranch_commit = 1.2.1PACKAGES += rbeaconpkg_rbeacon_name = rbeaconpkg_rbeacon_description = LAN discovery and presence in Erlang.pkg_rbeacon_homepage = https://github.com/refuge/rbeaconpkg_rbeacon_fetch = gitpkg_rbeacon_repo = https://github.com/refuge/rbeaconpkg_rbeacon_commit = masterPACKAGES += re2pkg_re2_name = re2pkg_re2_description = Erlang NIF bindings for RE2 regex librarypkg_re2_homepage = https://github.com/dukesoferl/re2pkg_re2_fetch = gitpkg_re2_repo = https://github.com/dukesoferl/re2pkg_re2_commit = masterPACKAGES += rebuspkg_rebus_name = rebuspkg_rebus_description = A stupid simple, internal, pub/sub event bus written in- and for Erlang.pkg_rebus_homepage = https://github.com/olle/rebuspkg_rebus_fetch = gitpkg_rebus_repo = https://github.com/olle/rebuspkg_rebus_commit = masterPACKAGES += rec2jsonpkg_rec2json_name = rec2jsonpkg_rec2json_description = Compile erlang record definitions into modules to convert them to/from json easily.pkg_rec2json_homepage = https://github.com/lordnull/rec2jsonpkg_rec2json_fetch = gitpkg_rec2json_repo = https://github.com/lordnull/rec2jsonpkg_rec2json_commit = masterPACKAGES += reconpkg_recon_name = reconpkg_recon_description = Collection of functions and scripts to debug Erlang in production.pkg_recon_homepage = https://github.com/ferd/reconpkg_recon_fetch = gitpkg_recon_repo = https://github.com/ferd/reconpkg_recon_commit = masterPACKAGES += record_infopkg_record_info_name = record_infopkg_record_info_description = Convert between record and proplistpkg_record_info_homepage = https://github.com/bipthelin/erlang-record_infopkg_record_info_fetch = gitpkg_record_info_repo = https://github.com/bipthelin/erlang-record_infopkg_record_info_commit = masterPACKAGES += redgridpkg_redgrid_name = redgridpkg_redgrid_description = automatic Erlang node discovery via redispkg_redgrid_homepage = https://github.com/jkvor/redgridpkg_redgrid_fetch = gitpkg_redgrid_repo = https://github.com/jkvor/redgridpkg_redgrid_commit = masterPACKAGES += redopkg_redo_name = redopkg_redo_description = pipelined erlang redis clientpkg_redo_homepage = https://github.com/jkvor/redopkg_redo_fetch = gitpkg_redo_repo = https://github.com/jkvor/redopkg_redo_commit = masterPACKAGES += reload_mkpkg_reload_mk_name = reload_mkpkg_reload_mk_description = Live reload plugin for erlang.mk.pkg_reload_mk_homepage = https://github.com/bullno1/reload.mkpkg_reload_mk_fetch = gitpkg_reload_mk_repo = https://github.com/bullno1/reload.mkpkg_reload_mk_commit = masterPACKAGES += reltool_utilpkg_reltool_util_name = reltool_utilpkg_reltool_util_description = Erlang reltool utility functionality applicationpkg_reltool_util_homepage = https://github.com/okeuday/reltool_utilpkg_reltool_util_fetch = gitpkg_reltool_util_repo = https://github.com/okeuday/reltool_utilpkg_reltool_util_commit = masterPACKAGES += relxpkg_relx_name = relxpkg_relx_description = Sane, simple release creation for Erlangpkg_relx_homepage = https://github.com/erlware/relxpkg_relx_fetch = gitpkg_relx_repo = https://github.com/erlware/relxpkg_relx_commit = mainPACKAGES += resource_discoverypkg_resource_discovery_name = resource_discoverypkg_resource_discovery_description = An application used to dynamically discover resources present in an Erlang node cluster.pkg_resource_discovery_homepage = http://erlware.org/pkg_resource_discovery_fetch = gitpkg_resource_discovery_repo = https://github.com/erlware/resource_discoverypkg_resource_discovery_commit = masterPACKAGES += restcpkg_restc_name = restcpkg_restc_description = Erlang Rest Clientpkg_restc_homepage = https://github.com/kivra/restclientpkg_restc_fetch = gitpkg_restc_repo = https://github.com/kivra/restclientpkg_restc_commit = masterPACKAGES += rfc4627_jsonrpcpkg_rfc4627_jsonrpc_name = rfc4627_jsonrpcpkg_rfc4627_jsonrpc_description = Erlang RFC4627 (JSON) codec and JSON-RPC server implementation.pkg_rfc4627_jsonrpc_homepage = https://github.com/tonyg/erlang-rfc4627pkg_rfc4627_jsonrpc_fetch = gitpkg_rfc4627_jsonrpc_repo = https://github.com/tonyg/erlang-rfc4627pkg_rfc4627_jsonrpc_commit = masterPACKAGES += riak_corepkg_riak_core_name = riak_corepkg_riak_core_description = Distributed systems infrastructure used by Riak.pkg_riak_core_homepage = https://github.com/basho/riak_corepkg_riak_core_fetch = gitpkg_riak_core_repo = https://github.com/basho/riak_corepkg_riak_core_commit = developPACKAGES += riak_dtpkg_riak_dt_name = riak_dtpkg_riak_dt_description = Convergent replicated datatypes in Erlangpkg_riak_dt_homepage = https://github.com/basho/riak_dtpkg_riak_dt_fetch = gitpkg_riak_dt_repo = https://github.com/basho/riak_dtpkg_riak_dt_commit = masterPACKAGES += riak_ensemblepkg_riak_ensemble_name = riak_ensemblepkg_riak_ensemble_description = Multi-Paxos framework in Erlangpkg_riak_ensemble_homepage = https://github.com/basho/riak_ensemblepkg_riak_ensemble_fetch = gitpkg_riak_ensemble_repo = https://github.com/basho/riak_ensemblepkg_riak_ensemble_commit = developPACKAGES += riak_kvpkg_riak_kv_name = riak_kvpkg_riak_kv_description = Riak Key/Value Storepkg_riak_kv_homepage = https://github.com/basho/riak_kvpkg_riak_kv_fetch = gitpkg_riak_kv_repo = https://github.com/basho/riak_kvpkg_riak_kv_commit = developPACKAGES += riak_pipepkg_riak_pipe_name = riak_pipepkg_riak_pipe_description = Riak Pipelinespkg_riak_pipe_homepage = https://github.com/basho/riak_pipepkg_riak_pipe_fetch = gitpkg_riak_pipe_repo = https://github.com/basho/riak_pipepkg_riak_pipe_commit = developPACKAGES += riak_sysmonpkg_riak_sysmon_name = riak_sysmonpkg_riak_sysmon_description = Simple OTP app for managing Erlang VM system_monitor event messagespkg_riak_sysmon_homepage = https://github.com/basho/riak_sysmonpkg_riak_sysmon_fetch = gitpkg_riak_sysmon_repo = https://github.com/basho/riak_sysmonpkg_riak_sysmon_commit = masterPACKAGES += riakcpkg_riakc_name = riakcpkg_riakc_description = Erlang clients for Riak.pkg_riakc_homepage = https://github.com/basho/riak-erlang-clientpkg_riakc_fetch = gitpkg_riakc_repo = https://github.com/basho/riak-erlang-clientpkg_riakc_commit = masterPACKAGES += rlimitpkg_rlimit_name = rlimitpkg_rlimit_description = Magnus Klaar's rate limiter code from etorrentpkg_rlimit_homepage = https://github.com/jlouis/rlimitpkg_rlimit_fetch = gitpkg_rlimit_repo = https://github.com/jlouis/rlimitpkg_rlimit_commit = masterPACKAGES += rust_mkpkg_rust_mk_name = rust_mkpkg_rust_mk_description = Build Rust crates in an Erlang applicationpkg_rust_mk_homepage = https://github.com/goertzenator/rust.mkpkg_rust_mk_fetch = gitpkg_rust_mk_repo = https://github.com/goertzenator/rust.mkpkg_rust_mk_commit = masterPACKAGES += safetyvalvepkg_safetyvalve_name = safetyvalvepkg_safetyvalve_description = A safety valve for your erlang nodepkg_safetyvalve_homepage = https://github.com/jlouis/safetyvalvepkg_safetyvalve_fetch = gitpkg_safetyvalve_repo = https://github.com/jlouis/safetyvalvepkg_safetyvalve_commit = masterPACKAGES += seestarpkg_seestar_name = seestarpkg_seestar_description = The Erlang client for Cassandra 1.2+ binary protocolpkg_seestar_homepage = https://github.com/iamaleksey/seestarpkg_seestar_fetch = gitpkg_seestar_repo = https://github.com/iamaleksey/seestarpkg_seestar_commit = masterPACKAGES += setuppkg_setup_name = setuppkg_setup_description = Generic setup utility for Erlang-based systemspkg_setup_homepage = https://github.com/uwiger/setuppkg_setup_fetch = gitpkg_setup_repo = https://github.com/uwiger/setuppkg_setup_commit = masterPACKAGES += sextpkg_sext_name = sextpkg_sext_description = Sortable Erlang Term Serializationpkg_sext_homepage = https://github.com/uwiger/sextpkg_sext_fetch = gitpkg_sext_repo = https://github.com/uwiger/sextpkg_sext_commit = masterPACKAGES += sfmtpkg_sfmt_name = sfmtpkg_sfmt_description = SFMT pseudo random number generator for Erlang.pkg_sfmt_homepage = https://github.com/jj1bdx/sfmt-erlangpkg_sfmt_fetch = gitpkg_sfmt_repo = https://github.com/jj1bdx/sfmt-erlangpkg_sfmt_commit = masterPACKAGES += sgtepkg_sgte_name = sgtepkg_sgte_description = A simple Erlang Template Enginepkg_sgte_homepage = https://github.com/filippo/sgtepkg_sgte_fetch = gitpkg_sgte_repo = https://github.com/filippo/sgtepkg_sgte_commit = masterPACKAGES += sheriffpkg_sheriff_name = sheriffpkg_sheriff_description = Parse transform for type based validation.pkg_sheriff_homepage = http://ninenines.eupkg_sheriff_fetch = gitpkg_sheriff_repo = https://github.com/extend/sheriffpkg_sheriff_commit = masterPACKAGES += shotgunpkg_shotgun_name = shotgunpkg_shotgun_description = better than just a gunpkg_shotgun_homepage = https://github.com/inaka/shotgunpkg_shotgun_fetch = gitpkg_shotgun_repo = https://github.com/inaka/shotgunpkg_shotgun_commit = masterPACKAGES += sidejobpkg_sidejob_name = sidejobpkg_sidejob_description = Parallel worker and capacity limiting library for Erlangpkg_sidejob_homepage = https://github.com/basho/sidejobpkg_sidejob_fetch = gitpkg_sidejob_repo = https://github.com/basho/sidejobpkg_sidejob_commit = developPACKAGES += sievepkg_sieve_name = sievepkg_sieve_description = sieve is a simple TCP routing proxy (layer 7) in erlangpkg_sieve_homepage = https://github.com/benoitc/sievepkg_sieve_fetch = gitpkg_sieve_repo = https://github.com/benoitc/sievepkg_sieve_commit = masterPACKAGES += simhashpkg_simhash_name = simhashpkg_simhash_description = Simhashing for Erlang -- hashing algorithm to find near-duplicates in binary data.pkg_simhash_homepage = https://github.com/ferd/simhashpkg_simhash_fetch = gitpkg_simhash_repo = https://github.com/ferd/simhashpkg_simhash_commit = masterPACKAGES += simple_bridgepkg_simple_bridge_name = simple_bridgepkg_simple_bridge_description = A simple, standardized interface library to Erlang HTTP Servers.pkg_simple_bridge_homepage = https://github.com/nitrogen/simple_bridgepkg_simple_bridge_fetch = gitpkg_simple_bridge_repo = https://github.com/nitrogen/simple_bridgepkg_simple_bridge_commit = masterPACKAGES += simple_oauth2pkg_simple_oauth2_name = simple_oauth2pkg_simple_oauth2_description = Simple erlang OAuth2 client module for any http server framework (Google, Facebook, Yandex, Vkontakte are preconfigured)pkg_simple_oauth2_homepage = https://github.com/virtan/simple_oauth2pkg_simple_oauth2_fetch = gitpkg_simple_oauth2_repo = https://github.com/virtan/simple_oauth2pkg_simple_oauth2_commit = masterPACKAGES += skelpkg_skel_name = skelpkg_skel_description = A Streaming Process-based Skeleton Library for Erlangpkg_skel_homepage = https://github.com/ParaPhrase/skelpkg_skel_fetch = gitpkg_skel_repo = https://github.com/ParaPhrase/skelpkg_skel_commit = masterPACKAGES += slackpkg_slack_name = slackpkg_slack_description = Minimal slack notification OTP library.pkg_slack_homepage = https://github.com/DonBranson/slackpkg_slack_fetch = gitpkg_slack_repo = https://github.com/DonBranson/slack.gitpkg_slack_commit = masterPACKAGES += snappyerpkg_snappyer_name = snappyerpkg_snappyer_description = Snappy as nif for Erlangpkg_snappyer_homepage = https://github.com/zmstone/snappyerpkg_snappyer_fetch = gitpkg_snappyer_repo = https://github.com/zmstone/snappyer.gitpkg_snappyer_commit = masterPACKAGES += socialpkg_social_name = socialpkg_social_description = Cowboy handler for social login via OAuth2 providerspkg_social_homepage = https://github.com/dvv/socialpkg_social_fetch = gitpkg_social_repo = https://github.com/dvv/socialpkg_social_commit = masterPACKAGES += sqerlpkg_sqerl_name = sqerlpkg_sqerl_description = An Erlang-flavoured SQL DSLpkg_sqerl_homepage = https://github.com/hairyhum/sqerlpkg_sqerl_fetch = gitpkg_sqerl_repo = https://github.com/hairyhum/sqerlpkg_sqerl_commit = masterPACKAGES += srlypkg_srly_name = srlypkg_srly_description = Native Erlang Unix serial interfacepkg_srly_homepage = https://github.com/msantos/srlypkg_srly_fetch = gitpkg_srly_repo = https://github.com/msantos/srlypkg_srly_commit = masterPACKAGES += sshrpcpkg_sshrpc_name = sshrpcpkg_sshrpc_description = Erlang SSH RPC module (experimental)pkg_sshrpc_homepage = https://github.com/jj1bdx/sshrpcpkg_sshrpc_fetch = gitpkg_sshrpc_repo = https://github.com/jj1bdx/sshrpcpkg_sshrpc_commit = masterPACKAGES += stablepkg_stable_name = stablepkg_stable_description = Library of assorted helpers for Cowboy web server.pkg_stable_homepage = https://github.com/dvv/stablepkg_stable_fetch = gitpkg_stable_repo = https://github.com/dvv/stablepkg_stable_commit = masterPACKAGES += stateboxpkg_statebox_name = stateboxpkg_statebox_description = Erlang state monad with merge/conflict-resolution capabilities. Useful for Riak.pkg_statebox_homepage = https://github.com/mochi/stateboxpkg_statebox_fetch = gitpkg_statebox_repo = https://github.com/mochi/stateboxpkg_statebox_commit = masterPACKAGES += statmanpkg_statman_name = statmanpkg_statman_description = Efficiently collect massive volumes of metrics inside the Erlang VMpkg_statman_homepage = https://github.com/knutin/statmanpkg_statman_fetch = gitpkg_statman_repo = https://github.com/knutin/statmanpkg_statman_commit = masterPACKAGES += statsderlpkg_statsderl_name = statsderlpkg_statsderl_description = StatsD client (erlang)pkg_statsderl_homepage = https://github.com/lpgauth/statsderlpkg_statsderl_fetch = gitpkg_statsderl_repo = https://github.com/lpgauth/statsderlpkg_statsderl_commit = masterPACKAGES += stdinout_poolpkg_stdinout_pool_name = stdinout_poolpkg_stdinout_pool_description = stdinout_pool : stuff goes in, stuff goes out. there's never any miscommunication.pkg_stdinout_pool_homepage = https://github.com/mattsta/erlang-stdinout-poolpkg_stdinout_pool_fetch = gitpkg_stdinout_pool_repo = https://github.com/mattsta/erlang-stdinout-poolpkg_stdinout_pool_commit = masterPACKAGES += stockdbpkg_stockdb_name = stockdbpkg_stockdb_description = Database for storing Stock Exchange quotes in erlangpkg_stockdb_homepage = https://github.com/maxlapshin/stockdbpkg_stockdb_fetch = gitpkg_stockdb_repo = https://github.com/maxlapshin/stockdbpkg_stockdb_commit = masterPACKAGES += subprocpkg_subproc_name = subprocpkg_subproc_description = unix subprocess manager with {active,once|false} modespkg_subproc_homepage = http://dozzie.jarowit.net/trac/wiki/subprocpkg_subproc_fetch = gitpkg_subproc_repo = https://github.com/dozzie/subprocpkg_subproc_commit = v0.1.0PACKAGES += supervisor3pkg_supervisor3_name = supervisor3pkg_supervisor3_description = OTP supervisor with additional strategiespkg_supervisor3_homepage = https://github.com/klarna/supervisor3pkg_supervisor3_fetch = gitpkg_supervisor3_repo = https://github.com/klarna/supervisor3.gitpkg_supervisor3_commit = masterPACKAGES += swabpkg_swab_name = swabpkg_swab_description = General purpose buffer handling modulepkg_swab_homepage = https://github.com/crownedgrouse/swabpkg_swab_fetch = gitpkg_swab_repo = https://github.com/crownedgrouse/swabpkg_swab_commit = masterPACKAGES += swarmpkg_swarm_name = swarmpkg_swarm_description = Fast and simple acceptor pool for Erlangpkg_swarm_homepage = https://github.com/jeremey/swarmpkg_swarm_fetch = gitpkg_swarm_repo = https://github.com/jeremey/swarmpkg_swarm_commit = masterPACKAGES += switchboardpkg_switchboard_name = switchboardpkg_switchboard_description = A framework for processing email using worker plugins.pkg_switchboard_homepage = https://github.com/thusfresh/switchboardpkg_switchboard_fetch = gitpkg_switchboard_repo = https://github.com/thusfresh/switchboardpkg_switchboard_commit = masterPACKAGES += synpkg_syn_name = synpkg_syn_description = A global Process Registry and Process Group manager for Erlang.pkg_syn_homepage = https://github.com/ostinelli/synpkg_syn_fetch = gitpkg_syn_repo = https://github.com/ostinelli/synpkg_syn_commit = masterPACKAGES += syncpkg_sync_name = syncpkg_sync_description = On-the-fly recompiling and reloading in Erlang.pkg_sync_homepage = https://github.com/rustyio/syncpkg_sync_fetch = gitpkg_sync_repo = https://github.com/rustyio/syncpkg_sync_commit = masterPACKAGES += syntaxerlpkg_syntaxerl_name = syntaxerlpkg_syntaxerl_description = Syntax checker for Erlangpkg_syntaxerl_homepage = https://github.com/ten0s/syntaxerlpkg_syntaxerl_fetch = gitpkg_syntaxerl_repo = https://github.com/ten0s/syntaxerlpkg_syntaxerl_commit = masterPACKAGES += syslogpkg_syslog_name = syslogpkg_syslog_description = Erlang port driver for interacting with syslog via syslog(3)pkg_syslog_homepage = https://github.com/Vagabond/erlang-syslogpkg_syslog_fetch = gitpkg_syslog_repo = https://github.com/Vagabond/erlang-syslogpkg_syslog_commit = masterPACKAGES += taskforcepkg_taskforce_name = taskforcepkg_taskforce_description = Erlang worker pools for controlled parallelisation of arbitrary tasks.pkg_taskforce_homepage = https://github.com/g-andrade/taskforcepkg_taskforce_fetch = gitpkg_taskforce_repo = https://github.com/g-andrade/taskforcepkg_taskforce_commit = masterPACKAGES += tddreloaderpkg_tddreloader_name = tddreloaderpkg_tddreloader_description = Shell utility for recompiling, reloading, and testing code as it changespkg_tddreloader_homepage = https://github.com/version2beta/tddreloaderpkg_tddreloader_fetch = gitpkg_tddreloader_repo = https://github.com/version2beta/tddreloaderpkg_tddreloader_commit = masterPACKAGES += tempopkg_tempo_name = tempopkg_tempo_description = NIF-based date and time parsing and formatting for Erlang.pkg_tempo_homepage = https://github.com/selectel/tempopkg_tempo_fetch = gitpkg_tempo_repo = https://github.com/selectel/tempopkg_tempo_commit = masterPACKAGES += tinymqpkg_tinymq_name = tinymqpkg_tinymq_description = TinyMQ - a diminutive, in-memory message queuepkg_tinymq_homepage = https://github.com/ChicagoBoss/tinymqpkg_tinymq_fetch = gitpkg_tinymq_repo = https://github.com/ChicagoBoss/tinymqpkg_tinymq_commit = masterPACKAGES += tinymtpkg_tinymt_name = tinymtpkg_tinymt_description = TinyMT pseudo random number generator for Erlang.pkg_tinymt_homepage = https://github.com/jj1bdx/tinymt-erlangpkg_tinymt_fetch = gitpkg_tinymt_repo = https://github.com/jj1bdx/tinymt-erlangpkg_tinymt_commit = masterPACKAGES += tirerlpkg_tirerl_name = tirerlpkg_tirerl_description = Erlang interface to Elastic Searchpkg_tirerl_homepage = https://github.com/inaka/tirerlpkg_tirerl_fetch = gitpkg_tirerl_repo = https://github.com/inaka/tirerlpkg_tirerl_commit = masterPACKAGES += tomlpkg_toml_name = tomlpkg_toml_description = TOML (0.4.0) config parserpkg_toml_homepage = http://dozzie.jarowit.net/trac/wiki/TOMLpkg_toml_fetch = gitpkg_toml_repo = https://github.com/dozzie/tomlpkg_toml_commit = v0.2.0PACKAGES += traffic_toolspkg_traffic_tools_name = traffic_toolspkg_traffic_tools_description = Simple traffic limiting librarypkg_traffic_tools_homepage = https://github.com/systra/traffic_toolspkg_traffic_tools_fetch = gitpkg_traffic_tools_repo = https://github.com/systra/traffic_toolspkg_traffic_tools_commit = masterPACKAGES += trailspkg_trails_name = trailspkg_trails_description = A couple of improvements over Cowboy Routespkg_trails_homepage = http://inaka.github.io/cowboy-trails/pkg_trails_fetch = gitpkg_trails_repo = https://github.com/inaka/cowboy-trailspkg_trails_commit = masterPACKAGES += tranepkg_trane_name = tranepkg_trane_description = SAX style broken HTML parser in Erlangpkg_trane_homepage = https://github.com/massemanet/tranepkg_trane_fetch = gitpkg_trane_repo = https://github.com/massemanet/tranepkg_trane_commit = masterPACKAGES += triepkg_trie_name = triepkg_trie_description = Erlang Trie Implementationpkg_trie_homepage = https://github.com/okeuday/triepkg_trie_fetch = gitpkg_trie_repo = https://github.com/okeuday/triepkg_trie_commit = masterPACKAGES += triqpkg_triq_name = triqpkg_triq_description = Trifork QuickCheckpkg_triq_homepage = https://triq.gitlab.iopkg_triq_fetch = gitpkg_triq_repo = https://gitlab.com/triq/triq.gitpkg_triq_commit = masterPACKAGES += tunctlpkg_tunctl_name = tunctlpkg_tunctl_description = Erlang TUN/TAP interfacepkg_tunctl_homepage = https://github.com/msantos/tunctlpkg_tunctl_fetch = gitpkg_tunctl_repo = https://github.com/msantos/tunctlpkg_tunctl_commit = masterPACKAGES += unicornpkg_unicorn_name = unicornpkg_unicorn_description = Generic configuration serverpkg_unicorn_homepage = https://github.com/shizzard/unicornpkg_unicorn_fetch = gitpkg_unicorn_repo = https://github.com/shizzard/unicornpkg_unicorn_commit = masterPACKAGES += unsplitpkg_unsplit_name = unsplitpkg_unsplit_description = Resolves conflicts in Mnesia after network splitspkg_unsplit_homepage = https://github.com/uwiger/unsplitpkg_unsplit_fetch = gitpkg_unsplit_repo = https://github.com/uwiger/unsplitpkg_unsplit_commit = masterPACKAGES += uuidpkg_uuid_name = uuidpkg_uuid_description = Erlang UUID Implementationpkg_uuid_homepage = https://github.com/okeuday/uuidpkg_uuid_fetch = gitpkg_uuid_repo = https://github.com/okeuday/uuidpkg_uuid_commit = masterPACKAGES += uxpkg_ux_name = uxpkg_ux_description = Unicode eXtention for Erlang (Strings, Collation)pkg_ux_homepage = https://github.com/erlang-unicode/uxpkg_ux_fetch = gitpkg_ux_repo = https://github.com/erlang-unicode/uxpkg_ux_commit = masterPACKAGES += verxpkg_verx_name = verxpkg_verx_description = Erlang implementation of the libvirtd remote protocolpkg_verx_homepage = https://github.com/msantos/verxpkg_verx_fetch = gitpkg_verx_repo = https://github.com/msantos/verxpkg_verx_commit = masterPACKAGES += vmq_bridgepkg_vmq_bridge_name = vmq_bridgepkg_vmq_bridge_description = Component of VerneMQ: A distributed MQTT message brokerpkg_vmq_bridge_homepage = https://verne.mq/pkg_vmq_bridge_fetch = gitpkg_vmq_bridge_repo = https://github.com/erlio/vmq_bridgepkg_vmq_bridge_commit = masterPACKAGES += vmstatspkg_vmstats_name = vmstatspkg_vmstats_description = tiny Erlang app that works in conjunction with statsderl in order to generate information on the Erlang VM for graphite logs.pkg_vmstats_homepage = https://github.com/ferd/vmstatspkg_vmstats_fetch = gitpkg_vmstats_repo = https://github.com/ferd/vmstatspkg_vmstats_commit = masterPACKAGES += walruspkg_walrus_name = walruspkg_walrus_description = Walrus - Mustache-like Templatingpkg_walrus_homepage = https://github.com/devinus/walruspkg_walrus_fetch = gitpkg_walrus_repo = https://github.com/devinus/walruspkg_walrus_commit = masterPACKAGES += webmachinepkg_webmachine_name = webmachinepkg_webmachine_description = A REST-based system for building web applications.pkg_webmachine_homepage = https://github.com/basho/webmachinepkg_webmachine_fetch = gitpkg_webmachine_repo = https://github.com/basho/webmachinepkg_webmachine_commit = masterPACKAGES += websocket_clientpkg_websocket_client_name = websocket_clientpkg_websocket_client_description = Erlang websocket client (ws and wss supported)pkg_websocket_client_homepage = https://github.com/jeremyong/websocket_clientpkg_websocket_client_fetch = gitpkg_websocket_client_repo = https://github.com/jeremyong/websocket_clientpkg_websocket_client_commit = masterPACKAGES += worker_poolpkg_worker_pool_name = worker_poolpkg_worker_pool_description = a simple erlang worker poolpkg_worker_pool_homepage = https://github.com/inaka/worker_poolpkg_worker_pool_fetch = gitpkg_worker_pool_repo = https://github.com/inaka/worker_poolpkg_worker_pool_commit = mainPACKAGES += wranglerpkg_wrangler_name = wranglerpkg_wrangler_description = Import of the Wrangler svn repository.pkg_wrangler_homepage = http://www.cs.kent.ac.uk/projects/wrangler/Home.htmlpkg_wrangler_fetch = gitpkg_wrangler_repo = https://github.com/RefactoringTools/wranglerpkg_wrangler_commit = masterPACKAGES += wsockpkg_wsock_name = wsockpkg_wsock_description = Erlang library to build WebSocket clients and serverspkg_wsock_homepage = https://github.com/madtrick/wsockpkg_wsock_fetch = gitpkg_wsock_repo = https://github.com/madtrick/wsockpkg_wsock_commit = masterPACKAGES += xhttpcpkg_xhttpc_name = xhttpcpkg_xhttpc_description = Extensible HTTP Client for Erlangpkg_xhttpc_homepage = https://github.com/seriyps/xhttpcpkg_xhttpc_fetch = gitpkg_xhttpc_repo = https://github.com/seriyps/xhttpcpkg_xhttpc_commit = masterPACKAGES += xref_runnerpkg_xref_runner_name = xref_runnerpkg_xref_runner_description = Erlang Xref Runner (inspired in rebar xref)pkg_xref_runner_homepage = https://github.com/inaka/xref_runnerpkg_xref_runner_fetch = gitpkg_xref_runner_repo = https://github.com/inaka/xref_runnerpkg_xref_runner_commit = masterPACKAGES += yamerlpkg_yamerl_name = yamerlpkg_yamerl_description = YAML 1.2 parser in pure Erlangpkg_yamerl_homepage = https://github.com/yakaz/yamerlpkg_yamerl_fetch = gitpkg_yamerl_repo = https://github.com/yakaz/yamerlpkg_yamerl_commit = masterPACKAGES += yamlerpkg_yamler_name = yamlerpkg_yamler_description = libyaml-based yaml loader for Erlangpkg_yamler_homepage = https://github.com/goertzenator/yamlerpkg_yamler_fetch = gitpkg_yamler_repo = https://github.com/goertzenator/yamlerpkg_yamler_commit = masterPACKAGES += yawspkg_yaws_name = yawspkg_yaws_description = Yaws webserverpkg_yaws_homepage = http://yaws.hyber.orgpkg_yaws_fetch = gitpkg_yaws_repo = https://github.com/klacke/yawspkg_yaws_commit = masterPACKAGES += zipperspkg_zippers_name = zipperspkg_zippers_description = A library for functional zipper data structures in Erlang. Read more on zipperspkg_zippers_homepage = https://github.com/ferd/zipperspkg_zippers_fetch = gitpkg_zippers_repo = https://github.com/ferd/zipperspkg_zippers_commit = masterPACKAGES += zlistspkg_zlists_name = zlistspkg_zlists_description = Erlang lazy lists library.pkg_zlists_homepage = https://github.com/vjache/erlang-zlistspkg_zlists_fetch = gitpkg_zlists_repo = https://github.com/vjache/erlang-zlistspkg_zlists_commit = masterPACKAGES += zucchinipkg_zucchini_name = zucchinipkg_zucchini_description = An Erlang INI parserpkg_zucchini_homepage = https://github.com/devinus/zucchinipkg_zucchini_fetch = gitpkg_zucchini_repo = https://github.com/devinus/zucchinipkg_zucchini_commit = master# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: searchdefine pkg_print$(verbose) printf "%s\n" \$(if $(call core_eq,$(1),$(pkg_$(1)_name)),,"Pkg name: $(1)") \"App name: $(pkg_$(1)_name)" \"Description: $(pkg_$(1)_description)" \"Home page: $(pkg_$(1)_homepage)" \"Fetch with: $(pkg_$(1)_fetch)" \"Repository: $(pkg_$(1)_repo)" \"Commit: $(pkg_$(1)_commit)" \""endefsearch:ifdef q$(foreach p,$(PACKAGES), \$(if $(findstring $(call core_lc,$(q)),$(call core_lc,$(pkg_$(p)_name) $(pkg_$(p)_description))), \$(call pkg_print,$(p))))else$(foreach p,$(PACKAGES),$(call pkg_print,$(p)))endif# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: distclean-deps clean-tmp-deps.log# Configuration.ifdef OTP_DEPS$(warning The variable OTP_DEPS is deprecated in favor of LOCAL_DEPS.)endifIGNORE_DEPS ?=export IGNORE_DEPSAPPS_DIR ?= $(CURDIR)/appsexport APPS_DIRDEPS_DIR ?= $(CURDIR)/depsexport DEPS_DIRREBAR_DEPS_DIR = $(DEPS_DIR)export REBAR_DEPS_DIRREBAR3_GIT ?= https://github.com/erlang/rebar3REBAR3_COMMIT ?= 3f563feaf1091a1980241adefa83a32dd2eebf7c # 3.20.0CACHE_DEPS ?= 0CACHE_DIR ?= $(if $(XDG_CACHE_HOME),$(XDG_CACHE_HOME),$(HOME)/.cache)/erlang.mkexport CACHE_DIR# External "early" plugins (see core/plugins.mk for regular plugins).# They both use the core_dep_plugin macro.define core_dep_pluginifeq ($(2),$(PROJECT))-include $$(patsubst $(PROJECT)/%,%,$(1))else-include $(DEPS_DIR)/$(1)$(DEPS_DIR)/$(1): $(DEPS_DIR)/$(2) ;endifendefDEP_EARLY_PLUGINS ?=$(foreach p,$(DEP_EARLY_PLUGINS),\$(eval $(if $(findstring /,$p),\$(call core_dep_plugin,$p,$(firstword $(subst /, ,$p))),\$(call core_dep_plugin,$p/early-plugins.mk,$p))))# Query functions.query_fetch_method = $(if $(dep_$(1)),$(call _qfm_dep,$(word 1,$(dep_$(1)))),$(call _qfm_pkg,$(1)))_qfm_dep = $(if $(dep_fetch_$(1)),$(1),$(if $(IS_DEP),legacy,fail))_qfm_pkg = $(if $(pkg_$(1)_fetch),$(pkg_$(1)_fetch),fail)query_name = $(if $(dep_$(1)),$(1),$(if $(pkg_$(1)_name),$(pkg_$(1)_name),$(1)))query_repo = $(call _qr,$(1),$(call query_fetch_method,$(1)))_qr = $(if $(query_repo_$(2)),$(call query_repo_$(2),$(1)),$(call dep_repo,$(1)))query_repo_default = $(if $(dep_$(1)),$(word 2,$(dep_$(1))),$(pkg_$(1)_repo))query_repo_git = $(patsubst git://github.com/%,https://github.com/%,$(call query_repo_default,$(1)))query_repo_git-subfolder = $(call query_repo_git,$(1))query_repo_git-submodule = -query_repo_hg = $(call query_repo_default,$(1))query_repo_svn = $(call query_repo_default,$(1))query_repo_cp = $(call query_repo_default,$(1))query_repo_ln = $(call query_repo_default,$(1))query_repo_hex = https://hex.pm/packages/$(if $(word 3,$(dep_$(1))),$(word 3,$(dep_$(1))),$(1))query_repo_fail = -query_repo_legacy = -query_version = $(call _qv,$(1),$(call query_fetch_method,$(1)))_qv = $(if $(query_version_$(2)),$(call query_version_$(2),$(1)),$(call dep_commit,$(1)))query_version_default = $(if $(dep_$(1)_commit),$(dep_$(1)_commit),$(if $(dep_$(1)),$(word 3,$(dep_$(1))),$(pkg_$(1)_commit)))query_version_git = $(call query_version_default,$(1))query_version_git-subfolder = $(call query_version_git,$(1))query_version_git-submodule = -query_version_hg = $(call query_version_default,$(1))query_version_svn = -query_version_cp = -query_version_ln = -query_version_hex = $(if $(dep_$(1)_commit),$(dep_$(1)_commit),$(if $(dep_$(1)),$(word 2,$(dep_$(1))),$(pkg_$(1)_commit)))query_version_fail = -query_version_legacy = -query_extra = $(call _qe,$(1),$(call query_fetch_method,$(1)))_qe = $(if $(query_extra_$(2)),$(call query_extra_$(2),$(1)),-)query_extra_git = -query_extra_git-subfolder = $(if $(dep_$(1)),subfolder=$(word 4,$(dep_$(1))),-)query_extra_git-submodule = -query_extra_hg = -query_extra_svn = -query_extra_cp = -query_extra_ln = -query_extra_hex = $(if $(dep_$(1)),package-name=$(word 3,$(dep_$(1))),-)query_extra_fail = -query_extra_legacy = -query_absolute_path = $(addprefix $(DEPS_DIR)/,$(call query_name,$(1)))# Deprecated legacy query functions.dep_fetch = $(call query_fetch_method,$(1))dep_name = $(call query_name,$(1))dep_repo = $(call query_repo_git,$(1))dep_commit = $(if $(dep_$(1)_commit),$(dep_$(1)_commit),$(if $(dep_$(1)),$(if $(filter hex,$(word 1,$(dep_$(1)))),$(word 2,$(dep_$(1))),$(word 3,$(dep_$(1)))),$(pkg_$(1)_commit)))LOCAL_DEPS_DIRS = $(foreach a,$(LOCAL_DEPS),$(if $(wildcard $(APPS_DIR)/$(a)),$(APPS_DIR)/$(a)))ALL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(foreach dep,$(filter-out $(IGNORE_DEPS),$(BUILD_DEPS) $(DEPS)),$(call dep_name,$(dep))))# When we are calling an app directly we don't want to include it here# otherwise it'll be treated both as an apps and a top-level project.ALL_APPS_DIRS = $(if $(wildcard $(APPS_DIR)/),$(filter-out $(APPS_DIR),$(shell find $(APPS_DIR) -maxdepth 1 -type d)))ifdef ROOT_DIRifndef IS_APPALL_APPS_DIRS := $(filter-out $(APPS_DIR)/$(notdir $(CURDIR)),$(ALL_APPS_DIRS))endifendififeq ($(filter $(APPS_DIR) $(DEPS_DIR),$(subst :, ,$(ERL_LIBS))),)ifeq ($(ERL_LIBS),)ERL_LIBS = $(APPS_DIR):$(DEPS_DIR)elseERL_LIBS := $(ERL_LIBS):$(APPS_DIR):$(DEPS_DIR)endifendifexport ERL_LIBSexport NO_AUTOPATCH# Verbosity.dep_verbose_0 = @echo " DEP $1 ($(call dep_commit,$1))";dep_verbose_2 = set -x;dep_verbose = $(dep_verbose_$(V))# Optimization: don't recompile deps unless truly necessary.ifndef IS_DEPifneq ($(MAKELEVEL),0)$(shell rm -f ebin/dep_built)endifendif# Core targets.ALL_APPS_DIRS_TO_BUILD = $(if $(LOCAL_DEPS_DIRS)$(IS_APP),$(LOCAL_DEPS_DIRS),$(ALL_APPS_DIRS))apps:: $(ALL_APPS_DIRS) clean-tmp-deps.log | $(ERLANG_MK_TMP)# Create ebin directory for all apps to make sure Erlang recognizes them# as proper OTP applications when using -include_lib. This is a temporary# fix, a proper fix would be to compile apps/* in the right order.ifndef IS_APPifneq ($(ALL_APPS_DIRS),)$(verbose) set -e; for dep in $(ALL_APPS_DIRS) ; do \mkdir -p $$dep/ebin; \doneendifendif# At the toplevel: if LOCAL_DEPS is defined with at least one local app, only# compile that list of apps. Otherwise, compile everything.# Within an app: compile all LOCAL_DEPS that are (uncompiled) local apps.ifneq ($(ALL_APPS_DIRS_TO_BUILD),)$(verbose) set -e; for dep in $(ALL_APPS_DIRS_TO_BUILD); do \if grep -qs ^$$dep$$ $(ERLANG_MK_TMP)/apps.log; then \:; \else \echo $$dep >> $(ERLANG_MK_TMP)/apps.log; \$(MAKE) -C $$dep $(if $(IS_TEST),test-build-app) IS_APP=1; \fi \doneendifclean-tmp-deps.log:ifeq ($(IS_APP)$(IS_DEP),)$(verbose) rm -f $(ERLANG_MK_TMP)/apps.log $(ERLANG_MK_TMP)/deps.logendif# Erlang.mk does not rebuild dependencies after they were compiled# once. If a developer is working on the top-level project and some# dependencies at the same time, he may want to change this behavior.# There are two solutions:# 1. Set `FULL=1` so that all dependencies are visited and# recursively recompiled if necessary.# 2. Set `FORCE_REBUILD=` to the specific list of dependencies that# should be recompiled (instead of the whole set).FORCE_REBUILD ?=ifeq ($(origin FULL),undefined)ifneq ($(strip $(force_rebuild_dep)$(FORCE_REBUILD)),)define force_rebuild_depecho "$(FORCE_REBUILD)" | grep -qw "$$(basename "$1")"endefendifendififneq ($(SKIP_DEPS),)deps::elsedeps:: $(ALL_DEPS_DIRS) apps clean-tmp-deps.log | $(ERLANG_MK_TMP)ifneq ($(ALL_DEPS_DIRS),)$(verbose) set -e; for dep in $(ALL_DEPS_DIRS); do \if grep -qs ^$$dep$$ $(ERLANG_MK_TMP)/deps.log; then \:; \else \echo $$dep >> $(ERLANG_MK_TMP)/deps.log; \if [ -z "$(strip $(FULL))" ] $(if $(force_rebuild_dep),&& ! ($(call force_rebuild_dep,$$dep)),) && [ ! -L $$dep ] && [ -f $$dep/ebin/dep_built ]; then \:; \elif [ "$$dep" = "$(DEPS_DIR)/hut" -a "$(HUT_PATCH)" ]; then \$(MAKE) -C $$dep app IS_DEP=1; \if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \elif [ -f $$dep/GNUmakefile ] || [ -f $$dep/makefile ] || [ -f $$dep/Makefile ]; then \$(MAKE) -C $$dep IS_DEP=1; \if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \else \echo "Error: No Makefile to build dependency $$dep." >&2; \exit 2; \fi \fi \doneendifendif# Deps related targets.# @todo rename GNUmakefile and makefile into Makefile first, if they exist# While Makefile file could be GNUmakefile or makefile,# in practice only Makefile is needed so far.define dep_autopatchif [ -f $(DEPS_DIR)/$(1)/erlang.mk ]; then \rm -rf $(DEPS_DIR)/$1/ebin/; \$(call erlang,$(call dep_autopatch_appsrc.erl,$(1))); \$(call dep_autopatch_erlang_mk,$(1)); \elif [ -f $(DEPS_DIR)/$(1)/Makefile ]; then \if [ -f $(DEPS_DIR)/$1/rebar.lock ]; then \$(call dep_autopatch2,$1); \elif [ 0 != `grep -c "include ../\w*\.mk" $(DEPS_DIR)/$(1)/Makefile` ]; then \$(call dep_autopatch2,$(1)); \elif [ 0 != `grep -ci "^[^#].*rebar" $(DEPS_DIR)/$(1)/Makefile` ]; then \$(call dep_autopatch2,$(1)); \elif [ -n "`find $(DEPS_DIR)/$(1)/ -type f -name \*.mk -not -name erlang.mk -exec grep -i "^[^#].*rebar" '{}' \;`" ]; then \$(call dep_autopatch2,$(1)); \fi \else \if [ ! -d $(DEPS_DIR)/$(1)/src/ ]; then \$(call dep_autopatch_noop,$(1)); \else \$(call dep_autopatch2,$(1)); \fi \fiendefdefine dep_autopatch2! test -f $(DEPS_DIR)/$1/ebin/$1.app || \mv -n $(DEPS_DIR)/$1/ebin/$1.app $(DEPS_DIR)/$1/src/$1.app.src; \rm -f $(DEPS_DIR)/$1/ebin/$1.app; \if [ -f $(DEPS_DIR)/$1/src/$1.app.src.script ]; then \$(call erlang,$(call dep_autopatch_appsrc_script.erl,$(1))); \fi; \$(call erlang,$(call dep_autopatch_appsrc.erl,$(1))); \if [ -f $(DEPS_DIR)/$(1)/rebar -o -f $(DEPS_DIR)/$(1)/rebar.config -o -f $(DEPS_DIR)/$(1)/rebar.config.script -o -f $(DEPS_DIR)/$1/rebar.lock ]; then \$(call dep_autopatch_fetch_rebar); \$(call dep_autopatch_rebar,$(1)); \else \$(call dep_autopatch_gen,$(1)); \fiendefdefine dep_autopatch_noopprintf "noop:\n" > $(DEPS_DIR)/$(1)/Makefileendef# Replace "include erlang.mk" with a line that will load the parent Erlang.mk# if given. Do it for all 3 possible Makefile file names.ifeq ($(NO_AUTOPATCH_ERLANG_MK),)define dep_autopatch_erlang_mkfor f in Makefile makefile GNUmakefile; do \if [ -f $(DEPS_DIR)/$1/$$f ]; then \sed -i.bak s/'include *erlang.mk'/'include $$(if $$(ERLANG_MK_FILENAME),$$(ERLANG_MK_FILENAME),erlang.mk)'/ $(DEPS_DIR)/$1/$$f; \fi \doneendefelsedefine dep_autopatch_erlang_mk:endefendifdefine dep_autopatch_genprintf "%s\n" \"ERLC_OPTS = +debug_info" \"include ../../erlang.mk" > $(DEPS_DIR)/$(1)/Makefileendef# We use flock/lockf when available to avoid concurrency issues.define dep_autopatch_fetch_rebarif command -v flock >/dev/null; then \flock $(ERLANG_MK_TMP)/rebar.lock sh -c "$(call dep_autopatch_fetch_rebar2)"; \elif command -v lockf >/dev/null; then \lockf $(ERLANG_MK_TMP)/rebar.lock sh -c "$(call dep_autopatch_fetch_rebar2)"; \else \$(call dep_autopatch_fetch_rebar2); \fiendefdefine dep_autopatch_fetch_rebar2if [ ! -d $(ERLANG_MK_TMP)/rebar3 ]; then \git clone -q -n -- $(REBAR3_GIT) $(ERLANG_MK_TMP)/rebar3; \cd $(ERLANG_MK_TMP)/rebar3; \git checkout -q $(REBAR3_COMMIT); \./bootstrap; \cd -; \fiendefdefine dep_autopatch_rebarif [ -f $(DEPS_DIR)/$(1)/Makefile ]; then \mv $(DEPS_DIR)/$(1)/Makefile $(DEPS_DIR)/$(1)/Makefile.orig.mk; \fi; \$(call erlang,$(call dep_autopatch_rebar.erl,$(1))); \rm -f $(DEPS_DIR)/$(1)/ebin/$(1).appendefdefine dep_autopatch_rebar.erlapplication:load(rebar),application:set_env(rebar, log_level, debug),{module, rebar3} = c:l(rebar3),Conf1 = case file:consult("$(call core_native_path,$(DEPS_DIR)/$1/rebar.config)") of{ok, Conf0} -> Conf0;_ -> []end,{Conf, OsEnv} = fun() ->case filelib:is_file("$(call core_native_path,$(DEPS_DIR)/$1/rebar.config.script)") offalse -> {Conf1, []};true ->Bindings0 = erl_eval:new_bindings(),Bindings1 = erl_eval:add_binding('CONFIG', Conf1, Bindings0),Bindings = erl_eval:add_binding('SCRIPT', "$(call core_native_path,$(DEPS_DIR)/$1/rebar.config.script)", Bindings1),Before = os:getenv(),{ok, Conf2} = file:script("$(call core_native_path,$(DEPS_DIR)/$1/rebar.config.script)", Bindings),{Conf2, lists:foldl(fun(E, Acc) -> lists:delete(E, Acc) end, os:getenv(), Before)}endend(),Write = fun (Text) ->file:write_file("$(call core_native_path,$(DEPS_DIR)/$1/Makefile)", Text, [append])end,Escape = fun (Text) ->re:replace(Text, "\\\\$$", "\$$$$", [global, {return, list}])end,Write("IGNORE_DEPS += edown eper eunit_formatters meck node_package ""rebar_lock_deps_plugin rebar_vsn_plugin reltool_util\n"),Write("C_SRC_DIR = /path/do/not/exist\n"),Write("C_SRC_TYPE = rebar\n"),Write("DRV_CFLAGS = -fPIC\nexport DRV_CFLAGS\n"),Write(["ERLANG_ARCH = ", rebar_utils:wordsize(), "\nexport ERLANG_ARCH\n"]),ToList = fun(V) when is_atom(V) -> atom_to_list(V);(V) when is_list(V) -> "'\\"" ++ V ++ "\\"'"end,fun() ->Write("ERLC_OPTS = +debug_info\n"),case lists:keyfind(erl_opts, 1, Conf) offalse -> ok;{_, ErlOpts} ->lists:foreach(fun({d, D}) ->Write("ERLC_OPTS += -D" ++ ToList(D) ++ "=1\n");({d, DKey, DVal}) ->Write("ERLC_OPTS += -D" ++ ToList(DKey) ++ "=" ++ ToList(DVal) ++ "\n");({i, I}) ->Write(["ERLC_OPTS += -I ", I, "\n"]);({platform_define, Regex, D}) ->case rebar_utils:is_arch(Regex) oftrue -> Write("ERLC_OPTS += -D" ++ ToList(D) ++ "=1\n");false -> okend;({parse_transform, PT}) ->Write("ERLC_OPTS += +'{parse_transform, " ++ ToList(PT) ++ "}'\n");(_) -> okend, ErlOpts)end,Write("\n")end(),GetHexVsn2 = fun(N, NP) ->case file:consult("$(call core_native_path,$(DEPS_DIR)/$1/rebar.lock)") of{ok, Lock} ->io:format("~p~n", [Lock]),LockPkgs = case lists:keyfind("1.2.0", 1, Lock) of{_, LP} ->LP;_ ->case lists:keyfind("1.1.0", 1, Lock) of{_, LP} ->LP;_ ->falseendend,ifis_list(LockPkgs) ->io:format("~p~n", [LockPkgs]),case lists:keyfind(atom_to_binary(N, latin1), 1, LockPkgs) of{_, {pkg, _, Vsn}, _} ->io:format("~p~n", [Vsn]),{N, {hex, NP, binary_to_list(Vsn)}};_ ->falseend;true ->falseend;_ ->falseendend,GetHexVsn3Common = fun(N, NP, S0) ->case GetHexVsn2(N, NP) offalse ->S2 = case S0 of" " ++ S1 -> S1;_ -> S0end,S = case length([ok || $$. <- S2]) of0 -> S2 ++ ".0.0";1 -> S2 ++ ".0";_ -> S2end,{N, {hex, NP, S}};NameSource ->NameSourceendend,GetHexVsn3 = fun(N, NP, "~>" ++ S0) ->GetHexVsn3Common(N, NP, S0);(N, NP, ">=" ++ S0) ->GetHexVsn3Common(N, NP, S0);(N, NP, S) -> {N, {hex, NP, S}}end,fun() ->File = case lists:keyfind(deps, 1, Conf) offalse -> [];{_, Deps} ->[begin case case Dep ofN when is_atom(N) -> GetHexVsn2(N, N);{N, S} when is_atom(N), is_list(S) -> GetHexVsn3(N, N, S);{N, {pkg, NP}} when is_atom(N) -> GetHexVsn2(N, NP);{N, S, {pkg, NP}} -> GetHexVsn3(N, NP, S);{N, S} when is_tuple(S) -> {N, S};{N, _, S} -> {N, S};{N, _, S, _} -> {N, S};_ -> falseend offalse -> ok;{Name, Source} ->{Method, Repo, Commit} = case Source of{hex, NPV, V} -> {hex, V, NPV};{git, R} -> {git, R, master};{M, R, {branch, C}} -> {M, R, C};{M, R, {ref, C}} -> {M, R, C};{M, R, {tag, C}} -> {M, R, C};{M, R, C} -> {M, R, C}end,Write(io_lib:format("DEPS += ~s\ndep_~s = ~s ~s ~s~n", [Name, Name, Method, Repo, Commit]))end end || Dep <- Deps]endend(),fun() ->case lists:keyfind(erl_first_files, 1, Conf) offalse -> ok;{_, Files0} ->Files = [beginhd(filelib:wildcard("$(call core_native_path,$(DEPS_DIR)/$1/src/**/" ++ filename:rootname(F) ++ ".*rl")))end || "src/" ++ F <- Files0],Names = [[" ", case lists:reverse(F) of"lre." ++ Elif -> lists:reverse(Elif);"lrx." ++ Elif -> lists:reverse(Elif);"lry." ++ Elif -> lists:reverse(Elif);Elif -> lists:reverse(Elif)end] || "$(call core_native_path,$(DEPS_DIR)/$1/src/)" ++ F <- Files],Write(io_lib:format("COMPILE_FIRST +=~s\n", [Names]))endend(),Write("\n\nrebar_dep: preprocess pre-deps deps pre-app app\n"),Write("\npreprocess::\n"),Write("\npre-deps::\n"),Write("\npre-app::\n"),PatchHook = fun(Cmd) ->Cmd2 = re:replace(Cmd, "^([g]?make)(.*)( -C.*)", "\\\\1\\\\3\\\\2", [{return, list}]),case Cmd2 of"make -C" ++ Cmd1 -> "$$\(MAKE) -C" ++ Escape(Cmd1);"gmake -C" ++ Cmd1 -> "$$\(MAKE) -C" ++ Escape(Cmd1);"make " ++ Cmd1 -> "$$\(MAKE) -f Makefile.orig.mk " ++ Escape(Cmd1);"gmake " ++ Cmd1 -> "$$\(MAKE) -f Makefile.orig.mk " ++ Escape(Cmd1);_ -> Escape(Cmd)endend,fun() ->case lists:keyfind(pre_hooks, 1, Conf) offalse -> ok;{_, Hooks} ->[case H of{'get-deps', Cmd} ->Write("\npre-deps::\n\t" ++ PatchHook(Cmd) ++ "\n");{compile, Cmd} ->Write("\npre-app::\n\tCC=$$\(CC) " ++ PatchHook(Cmd) ++ "\n");{{pc, compile}, Cmd} ->Write("\npre-app::\n\tCC=$$\(CC) " ++ PatchHook(Cmd) ++ "\n");{Regex, compile, Cmd} ->case rebar_utils:is_arch(Regex) oftrue -> Write("\npre-app::\n\tCC=$$\(CC) " ++ PatchHook(Cmd) ++ "\n");false -> okend;_ -> okend || H <- Hooks]endend(),ShellToMk = fun(V0) ->V1 = re:replace(V0, "[$$][(]", "$$\(shell ", [global]),V = re:replace(V1, "([$$])(?![(])(\\\\w*)", "\\\\1(\\\\2)", [global]),re:replace(V, "-Werror\\\\b", "", [{return, list}, global])end,PortSpecs = fun() ->case lists:keyfind(port_specs, 1, Conf) offalse ->case filelib:is_dir("$(call core_native_path,$(DEPS_DIR)/$1/c_src)") offalse -> [];true ->[{"priv/" ++ proplists:get_value(so_name, Conf, "$(1)_drv.so"),proplists:get_value(port_sources, Conf, ["c_src/*.c"]), []}]end;{_, Specs} ->lists:flatten([case S of{Output, Input} -> {ShellToMk(Output), Input, []};{Regex, Output, Input} ->case rebar_utils:is_arch(Regex) oftrue -> {ShellToMk(Output), Input, []};false -> []end;{Regex, Output, Input, [{env, Env}]} ->case rebar_utils:is_arch(Regex) oftrue -> {ShellToMk(Output), Input, Env};false -> []endend || S <- Specs])endend(),PortSpecWrite = fun (Text) ->file:write_file("$(call core_native_path,$(DEPS_DIR)/$1/c_src/Makefile.erlang.mk)", Text, [append])end,case PortSpecs of[] -> ok;_ ->Write("\npre-app::\n\t@$$\(MAKE) --no-print-directory -f c_src/Makefile.erlang.mk\n"),PortSpecWrite(io_lib:format("ERL_CFLAGS ?= -finline-functions -Wall -fPIC -I \\"~s/erts-~s/include\\" -I \\"~s\\"\n",[code:root_dir(), erlang:system_info(version), code:lib_dir(erl_interface, include)])),PortSpecWrite(io_lib:format("ERL_LDFLAGS ?= -L \\"~s\\" -lei\n",[code:lib_dir(erl_interface, lib)])),[PortSpecWrite(["\n", E, "\n"]) || E <- OsEnv],FilterEnv = fun(Env) ->lists:flatten([case E of{_, _} -> E;{Regex, K, V} ->case rebar_utils:is_arch(Regex) oftrue -> {K, V};false -> []endend || E <- Env])end,MergeEnv = fun(Env) ->lists:foldl(fun ({K, V}, Acc) ->case lists:keyfind(K, 1, Acc) offalse -> [{K, rebar_utils:expand_env_variable(V, K, "")}|Acc];{_, V0} -> [{K, rebar_utils:expand_env_variable(V, K, V0)}|Acc]endend, [], Env)end,PortEnv = case lists:keyfind(port_env, 1, Conf) offalse -> [];{_, PortEnv0} -> FilterEnv(PortEnv0)end,PortSpec = fun ({Output, Input0, Env}) ->filelib:ensure_dir("$(call core_native_path,$(DEPS_DIR)/$1/)" ++ Output),Input = [[" ", I] || I <- Input0],PortSpecWrite([[["\n", K, " = ", ShellToMk(V)] || {K, V} <- lists:reverse(MergeEnv(PortEnv))],case $(PLATFORM) ofdarwin -> "\n\nLDFLAGS += -flat_namespace -undefined suppress";_ -> ""end,"\n\nall:: ", Output, "\n\t@:\n\n","%.o: %.c\n\t$$\(CC) -c -o $$\@ $$\< $$\(CFLAGS) $$\(ERL_CFLAGS) $$\(DRV_CFLAGS) $$\(EXE_CFLAGS)\n\n","%.o: %.C\n\t$$\(CXX) -c -o $$\@ $$\< $$\(CXXFLAGS) $$\(ERL_CFLAGS) $$\(DRV_CFLAGS) $$\(EXE_CFLAGS)\n\n","%.o: %.cc\n\t$$\(CXX) -c -o $$\@ $$\< $$\(CXXFLAGS) $$\(ERL_CFLAGS) $$\(DRV_CFLAGS) $$\(EXE_CFLAGS)\n\n","%.o: %.cpp\n\t$$\(CXX) -c -o $$\@ $$\< $$\(CXXFLAGS) $$\(ERL_CFLAGS) $$\(DRV_CFLAGS) $$\(EXE_CFLAGS)\n\n",[[Output, ": ", K, " += ", ShellToMk(V), "\n"] || {K, V} <- lists:reverse(MergeEnv(FilterEnv(Env)))],Output, ": $$\(foreach ext,.c .C .cc .cpp,","$$\(patsubst %$$\(ext),%.o,$$\(filter %$$\(ext),$$\(wildcard", Input, "))))\n","\t$$\(CC) -o $$\@ $$\? $$\(LDFLAGS) $$\(ERL_LDFLAGS) $$\(DRV_LDFLAGS) $$\(LDLIBS) $$\(EXE_LDFLAGS)",case {filename:extension(Output), $(PLATFORM)} of{[], _} -> "\n";{".so", darwin} -> "-shared\n";{".dylib", darwin} -> "-shared\n";{_, darwin} -> "\n";_ -> " -shared\n"end])end,[PortSpec(S) || S <- PortSpecs]end,fun() ->case lists:keyfind(plugins, 1, Conf) offalse -> ok;{_, Plugins0} ->Plugins = [P || P <- Plugins0, is_tuple(P)],case lists:keyfind('lfe-compile', 1, Plugins) offalse -> ok;_ -> Write("\nBUILD_DEPS = lfe lfe.mk\ndep_lfe.mk = git https://github.com/ninenines/lfe.mk master\nDEP_PLUGINS = lfe.mk\n")endendend(),Write("\ninclude $$\(if $$\(ERLANG_MK_FILENAME),$$\(ERLANG_MK_FILENAME),erlang.mk)"),RunPlugin = fun(Plugin, Step) ->case erlang:function_exported(Plugin, Step, 2) offalse -> ok;true ->c:cd("$(call core_native_path,$(DEPS_DIR)/$1/)"),Ret = Plugin:Step({config, "", Conf, dict:new(), dict:new(), dict:new(),dict:store(base_dir, "", dict:new())}, undefined),io:format("rebar plugin ~p step ~p ret ~p~n", [Plugin, Step, Ret])endend,fun() ->case lists:keyfind(plugins, 1, Conf) offalse -> ok;{_, Plugins0} ->Plugins = [P || P <- Plugins0, is_atom(P)],[begincase lists:keyfind(deps, 1, Conf) offalse -> ok;{_, Deps} ->case lists:keyfind(P, 1, Deps) offalse -> ok;_ ->Path = "$(call core_native_path,$(DEPS_DIR)/)" ++ atom_to_list(P),io:format("~s", [os:cmd("$(MAKE) -C $(call core_native_path,$(DEPS_DIR)/$1) " ++ Path)]),io:format("~s", [os:cmd("$(MAKE) -C " ++ Path ++ " IS_DEP=1")]),code:add_patha(Path ++ "/ebin")endendend || P <- Plugins],[case code:load_file(P) of{module, P} -> ok;_ ->case lists:keyfind(plugin_dir, 1, Conf) offalse -> ok;{_, PluginsDir} ->ErlFile = "$(call core_native_path,$(DEPS_DIR)/$1/)" ++ PluginsDir ++ "/" ++ atom_to_list(P) ++ ".erl",{ok, P, Bin} = compile:file(ErlFile, [binary]),{module, P} = code:load_binary(P, ErlFile, Bin)endend || P <- Plugins],[RunPlugin(P, preprocess) || P <- Plugins],[RunPlugin(P, pre_compile) || P <- Plugins],[RunPlugin(P, compile) || P <- Plugins]endend(),halt()endefdefine dep_autopatch_appsrc_script.erlAppSrc = "$(call core_native_path,$(DEPS_DIR)/$1/src/$1.app.src)",AppSrcScript = AppSrc ++ ".script",Conf1 = case file:consult(AppSrc) of{ok, Conf0} -> Conf0;{error, enoent} -> []end,Bindings0 = erl_eval:new_bindings(),Bindings1 = erl_eval:add_binding('CONFIG', Conf1, Bindings0),Bindings = erl_eval:add_binding('SCRIPT', AppSrcScript, Bindings1),Conf = case file:script(AppSrcScript, Bindings) of{ok, [C]} -> C;{ok, C} -> Cend,ok = file:write_file(AppSrc, io_lib:format("~p.~n", [Conf])),halt()endefdefine dep_autopatch_appsrc.erlAppSrcOut = "$(call core_native_path,$(DEPS_DIR)/$1/src/$1.app.src)",AppSrcIn = case filelib:is_regular(AppSrcOut) of false -> "$(call core_native_path,$(DEPS_DIR)/$1/ebin/$1.app)"; true -> AppSrcOut end,case filelib:is_regular(AppSrcIn) offalse -> ok;true ->{ok, [{application, $(1), L0}]} = file:consult(AppSrcIn),L1 = lists:keystore(modules, 1, L0, {modules, []}),L2 = case lists:keyfind(vsn, 1, L1) of{_, git} -> lists:keyreplace(vsn, 1, L1, {vsn, lists:droplast(os:cmd("git -C $(DEPS_DIR)/$1 describe --dirty --tags --always"))});{_, {cmd, _}} -> lists:keyreplace(vsn, 1, L1, {vsn, "cmd"});_ -> L1end,L3 = case lists:keyfind(registered, 1, L2) of false -> [{registered, []}|L2]; _ -> L2 end,ok = file:write_file(AppSrcOut, io_lib:format("~p.~n", [{application, $(1), L3}])),case AppSrcOut of AppSrcIn -> ok; _ -> ok = file:delete(AppSrcIn) endend,halt()endefifeq ($(CACHE_DEPS),1)define dep_cache_fetch_gitmkdir -p $(CACHE_DIR)/git; \if test -d "$(join $(CACHE_DIR)/git/,$(call dep_name,$1))"; then \cd $(join $(CACHE_DIR)/git/,$(call dep_name,$1)); \if ! git checkout -q $(call dep_commit,$1); then \git remote set-url origin $(call dep_repo,$1) && \git pull --all && \git cat-file -e $(call dep_commit,$1) 2>/dev/null; \fi; \else \git clone -q -n -- $(call dep_repo,$1) $(join $(CACHE_DIR)/git/,$(call dep_name,$1)); \fi; \git clone -q --branch $(call dep_commit,$1) --single-branch -- $(join $(CACHE_DIR)/git/,$(call dep_name,$1)) $2endefdefine dep_fetch_git$(call dep_cache_fetch_git,$1,$(DEPS_DIR)/$(call dep_name,$1));endefdefine dep_fetch_git-subfoldermkdir -p $(ERLANG_MK_TMP)/git-subfolder; \$(call dep_cache_fetch_git,$1,$(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)); \ln -s $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)/$(word 4,$(dep_$1)) \$(DEPS_DIR)/$(call dep_name,$1);endefelsedefine dep_fetch_gitgit clone -q -n -- $(call dep_repo,$1) $(DEPS_DIR)/$(call dep_name,$1); \cd $(DEPS_DIR)/$(call dep_name,$1) && git checkout -q $(call dep_commit,$1);endefdefine dep_fetch_git-subfoldermkdir -p $(ERLANG_MK_TMP)/git-subfolder; \git clone -q -n -- $(call dep_repo,$1) \$(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1); \cd $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1) \&& git checkout -q $(call dep_commit,$1); \ln -s $(ERLANG_MK_TMP)/git-subfolder/$(call dep_name,$1)/$(word 4,$(dep_$1)) \$(DEPS_DIR)/$(call dep_name,$1);endefendifdefine dep_fetch_git-submodulegit submodule update --init -- $(DEPS_DIR)/$1;endefdefine dep_fetch_hghg clone -q -U $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1)); \cd $(DEPS_DIR)/$(call dep_name,$(1)) && hg update -q $(call dep_commit,$(1));endefdefine dep_fetch_svnsvn checkout -q $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1));endefdefine dep_fetch_cpcp -R $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1));endefdefine dep_fetch_lnln -s $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1));endefifeq ($(CACHE_DEPS),1)# Hex only has a package version. No need to look in the Erlang.mk packages.define dep_fetch_hexmkdir -p $(CACHE_DIR)/hex $(DEPS_DIR)/$1; \$(eval hex_tar_name=$(if $(word 3,$(dep_$1)),$(word 3,$(dep_$1)),$1)-$(strip $(word 2,$(dep_$1))).tar) \$(if $(wildcard $(CACHE_DIR)/hex/$(hex_tar_name)),,$(call core_http_get,$(CACHE_DIR)/hex/$(hex_tar_name),\https://repo.hex.pm/tarballs/$(hex_tar_name);)) \tar -xOf $(CACHE_DIR)/hex/$(hex_tar_name) contents.tar.gz | tar -C $(DEPS_DIR)/$1 -xzf -;endefelse# Hex only has a package version. No need to look in the Erlang.mk packages.define dep_fetch_hexmkdir -p $(ERLANG_MK_TMP)/hex $(DEPS_DIR)/$1; \$(call core_http_get,$(ERLANG_MK_TMP)/hex/$1.tar,\https://repo.hex.pm/tarballs/$(if $(word 3,$(dep_$1)),$(word 3,$(dep_$1)),$1)-$(strip $(word 2,$(dep_$1))).tar); \tar -xOf $(ERLANG_MK_TMP)/hex/$1.tar contents.tar.gz | tar -C $(DEPS_DIR)/$1 -xzf -;endefendifdefine dep_fetch_failecho "Error: Unknown or invalid dependency: $(1)." >&2; \exit 78;endef# Kept for compatibility purposes with older Erlang.mk configuration.define dep_fetch_legacy$(warning WARNING: '$(1)' dependency configuration uses deprecated format.) \git clone -q -n -- $(word 1,$(dep_$(1))) $(DEPS_DIR)/$(1); \cd $(DEPS_DIR)/$(1) && git checkout -q $(if $(word 2,$(dep_$(1))),$(word 2,$(dep_$(1))),master);endefdefine dep_target$(DEPS_DIR)/$(call dep_name,$1): | $(ERLANG_MK_TMP)$(eval DEP_NAME := $(call dep_name,$1))$(eval DEP_STR := $(if $(filter $1,$(DEP_NAME)),$1,"$1 ($(DEP_NAME))"))$(verbose) if test -d $(APPS_DIR)/$(DEP_NAME); then \echo "Error: Dependency" $(DEP_STR) "conflicts with application found in $(APPS_DIR)/$(DEP_NAME)." >&2; \exit 17; \fi$(verbose) mkdir -p $(DEPS_DIR)$(dep_verbose) $(call dep_fetch_$(strip $(call dep_fetch,$(1))),$(1))$(verbose) if [ -f $(DEPS_DIR)/$(1)/configure.ac -o -f $(DEPS_DIR)/$(1)/configure.in ] \&& [ ! -f $(DEPS_DIR)/$(1)/configure ]; then \echo " AUTO " $(DEP_STR); \cd $(DEPS_DIR)/$(1) && autoreconf -Wall -vif -I m4; \fi- $(verbose) if [ -f $(DEPS_DIR)/$(DEP_NAME)/configure ]; then \echo " CONF " $(DEP_STR); \cd $(DEPS_DIR)/$(DEP_NAME) && ./configure; \fiifeq ($(filter $(1),$(NO_AUTOPATCH)),)$(verbose) $$(MAKE) --no-print-directory autopatch-$(DEP_NAME)endif.PHONY: autopatch-$(call dep_name,$1)autopatch-$(call dep_name,$1)::$(verbose) if [ "$1" = "elixir" -a "$(ELIXIR_PATCH)" ]; then \ln -s lib/elixir/ebin $(DEPS_DIR)/elixir/; \else \$$(call dep_autopatch,$(call dep_name,$1)) \fiendef$(foreach dep,$(BUILD_DEPS) $(DEPS),$(eval $(call dep_target,$(dep))))ifndef IS_APPclean:: clean-appsclean-apps:$(verbose) set -e; for dep in $(ALL_APPS_DIRS) ; do \$(MAKE) -C $$dep clean IS_APP=1; \donedistclean:: distclean-appsdistclean-apps:$(verbose) set -e; for dep in $(ALL_APPS_DIRS) ; do \$(MAKE) -C $$dep distclean IS_APP=1; \doneendififndef SKIP_DEPSdistclean:: distclean-depsdistclean-deps:$(gen_verbose) rm -rf $(DEPS_DIR)endififeq ($(CACHE_DEPS),1)cacheclean:: cacheclean-git cacheclean-hexcacheclean-git:$(gen_verbose) rm -rf $(CACHE_DIR)/gitcacheclean-hex:$(gen_verbose) rm -rf $(CACHE_DIR)/hexendif# Forward-declare variables used in core/deps-tools.mk. This is required# in case plugins use them.ERLANG_MK_RECURSIVE_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-deps-list.logERLANG_MK_RECURSIVE_DOC_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-doc-deps-list.logERLANG_MK_RECURSIVE_REL_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-rel-deps-list.logERLANG_MK_RECURSIVE_TEST_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-test-deps-list.logERLANG_MK_RECURSIVE_SHELL_DEPS_LIST = $(ERLANG_MK_TMP)/recursive-shell-deps-list.logERLANG_MK_QUERY_DEPS_FILE = $(ERLANG_MK_TMP)/query-deps.logERLANG_MK_QUERY_DOC_DEPS_FILE = $(ERLANG_MK_TMP)/query-doc-deps.logERLANG_MK_QUERY_REL_DEPS_FILE = $(ERLANG_MK_TMP)/query-rel-deps.logERLANG_MK_QUERY_TEST_DEPS_FILE = $(ERLANG_MK_TMP)/query-test-deps.logERLANG_MK_QUERY_SHELL_DEPS_FILE = $(ERLANG_MK_TMP)/query-shell-deps.log# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: clean-app# Configuration.ERLC_OPTS ?= -Werror +debug_info +warn_export_vars +warn_shadow_vars \+warn_obsolete_guard # +bin_opt_info +warn_export_all +warn_missing_specCOMPILE_FIRST ?=COMPILE_FIRST_PATHS = $(addprefix src/,$(addsuffix .erl,$(COMPILE_FIRST)))ERLC_EXCLUDE ?=ERLC_EXCLUDE_PATHS = $(addprefix src/,$(addsuffix .erl,$(ERLC_EXCLUDE)))ERLC_ASN1_OPTS ?=ERLC_MIB_OPTS ?=COMPILE_MIB_FIRST ?=COMPILE_MIB_FIRST_PATHS = $(addprefix mibs/,$(addsuffix .mib,$(COMPILE_MIB_FIRST)))# Verbosity.app_verbose_0 = @echo " APP " $(PROJECT);app_verbose_2 = set -x;app_verbose = $(app_verbose_$(V))appsrc_verbose_0 = @echo " APP " $(PROJECT).app.src;appsrc_verbose_2 = set -x;appsrc_verbose = $(appsrc_verbose_$(V))makedep_verbose_0 = @echo " DEPEND" $(PROJECT).d;makedep_verbose_2 = set -x;makedep_verbose = $(makedep_verbose_$(V))erlc_verbose_0 = @echo " ERLC " $(filter-out $(patsubst %,%.erl,$(ERLC_EXCLUDE)),\$(filter %.erl %.core,$(?F)));erlc_verbose_2 = set -x;erlc_verbose = $(erlc_verbose_$(V))xyrl_verbose_0 = @echo " XYRL " $(filter %.xrl %.yrl,$(?F));xyrl_verbose_2 = set -x;xyrl_verbose = $(xyrl_verbose_$(V))asn1_verbose_0 = @echo " ASN1 " $(filter %.asn1,$(?F));asn1_verbose_2 = set -x;asn1_verbose = $(asn1_verbose_$(V))mib_verbose_0 = @echo " MIB " $(filter %.bin %.mib,$(?F));mib_verbose_2 = set -x;mib_verbose = $(mib_verbose_$(V))ifneq ($(wildcard src/),)# Targets.app:: $(if $(wildcard ebin/test),clean) deps$(verbose) $(MAKE) --no-print-directory $(PROJECT).d$(verbose) $(MAKE) --no-print-directory app-buildifeq ($(wildcard src/$(PROJECT_MOD).erl),)define app_file{application, '$(PROJECT)', [{description, "$(PROJECT_DESCRIPTION)"},{vsn, "$(PROJECT_VERSION)"},$(if $(IS_DEP),{id$(comma)$(space)"$(1)"}$(comma)){modules, [$(call comma_list,$(2))]},{registered, []},{applications, [$(call comma_list,kernel stdlib $(OTP_DEPS) $(LOCAL_DEPS) $(OPTIONAL_DEPS) $(foreach dep,$(DEPS),$(call dep_name,$(dep))))]},{optional_applications, [$(call comma_list,$(OPTIONAL_DEPS))]},{env, $(subst \,\\,$(PROJECT_ENV))}$(if $(findstring {,$(PROJECT_APP_EXTRA_KEYS)),$(comma)$(newline)$(tab)$(subst \,\\,$(PROJECT_APP_EXTRA_KEYS)),)]}.endefelsedefine app_file{application, '$(PROJECT)', [{description, "$(PROJECT_DESCRIPTION)"},{vsn, "$(PROJECT_VERSION)"},$(if $(IS_DEP),{id$(comma)$(space)"$(1)"}$(comma)){modules, [$(call comma_list,$(2))]},{registered, [$(call comma_list,$(PROJECT)_sup $(PROJECT_REGISTERED))]},{applications, [$(call comma_list,kernel stdlib $(OTP_DEPS) $(LOCAL_DEPS) $(OPTIONAL_DEPS) $(foreach dep,$(DEPS),$(call dep_name,$(dep))))]},{optional_applications, [$(call comma_list,$(OPTIONAL_DEPS))]},{mod, {$(PROJECT_MOD), []}},{env, $(subst \,\\,$(PROJECT_ENV))}$(if $(findstring {,$(PROJECT_APP_EXTRA_KEYS)),$(comma)$(newline)$(tab)$(subst \,\\,$(PROJECT_APP_EXTRA_KEYS)),)]}.endefendifapp-build: ebin/$(PROJECT).app$(verbose) :# Source files.ALL_SRC_FILES := $(sort $(call core_find,src/,*))ERL_FILES := $(filter %.erl,$(ALL_SRC_FILES))CORE_FILES := $(filter %.core,$(ALL_SRC_FILES))# ASN.1 files.ifneq ($(wildcard asn1/),)ASN1_FILES = $(sort $(call core_find,asn1/,*.asn1))ERL_FILES += $(addprefix src/,$(patsubst %.asn1,%.erl,$(notdir $(ASN1_FILES))))define compile_asn1$(verbose) mkdir -p include/$(asn1_verbose) erlc -v -I include/ -o asn1/ +noobj $(ERLC_ASN1_OPTS) $(1)$(verbose) mv asn1/*.erl src/-$(verbose) mv asn1/*.hrl include/$(verbose) mv asn1/*.asn1db include/endef$(PROJECT).d:: $(ASN1_FILES)$(if $(strip $?),$(call compile_asn1,$?))endif# SNMP MIB files.ifneq ($(wildcard mibs/),)MIB_FILES = $(sort $(call core_find,mibs/,*.mib))$(PROJECT).d:: $(COMPILE_MIB_FIRST_PATHS) $(MIB_FILES)$(verbose) mkdir -p include/ priv/mibs/$(mib_verbose) erlc -v $(ERLC_MIB_OPTS) -o priv/mibs/ -I priv/mibs/ $?$(mib_verbose) erlc -o include/ -- $(addprefix priv/mibs/,$(patsubst %.mib,%.bin,$(notdir $?)))endif# Leex and Yecc files.XRL_FILES := $(filter %.xrl,$(ALL_SRC_FILES))XRL_ERL_FILES = $(addprefix src/,$(patsubst %.xrl,%.erl,$(notdir $(XRL_FILES))))ERL_FILES += $(XRL_ERL_FILES)YRL_FILES := $(filter %.yrl,$(ALL_SRC_FILES))YRL_ERL_FILES = $(addprefix src/,$(patsubst %.yrl,%.erl,$(notdir $(YRL_FILES))))ERL_FILES += $(YRL_ERL_FILES)$(PROJECT).d:: $(XRL_FILES) $(YRL_FILES)$(if $(strip $?),$(xyrl_verbose) erlc -v -o src/ $(YRL_ERLC_OPTS) $?)# Erlang and Core Erlang files.define makedep.erlE = ets:new(makedep, [bag]),G = digraph:new([acyclic]),ErlFiles = lists:usort(string:tokens("$(ERL_FILES)", " ")),DepsDir = "$(call core_native_path,$(DEPS_DIR))",AppsDir = "$(call core_native_path,$(APPS_DIR))",DepsDirsSrc = "$(if $(wildcard $(DEPS_DIR)/*/src), $(call core_native_path,$(wildcard $(DEPS_DIR)/*/src)))",DepsDirsInc = "$(if $(wildcard $(DEPS_DIR)/*/include), $(call core_native_path,$(wildcard $(DEPS_DIR)/*/include)))",AppsDirsSrc = "$(if $(wildcard $(APPS_DIR)/*/src), $(call core_native_path,$(wildcard $(APPS_DIR)/*/src)))",AppsDirsInc = "$(if $(wildcard $(APPS_DIR)/*/include), $(call core_native_path,$(wildcard $(APPS_DIR)/*/include)))",DepsDirs = lists:usort(string:tokens(DepsDirsSrc++DepsDirsInc, " ")),AppsDirs = lists:usort(string:tokens(AppsDirsSrc++AppsDirsInc, " ")),Modules = [{list_to_atom(filename:basename(F, ".erl")), F} || F <- ErlFiles],Add = fun (Mod, Dep) ->case lists:keyfind(Dep, 1, Modules) offalse -> ok;{_, DepFile} ->{_, ModFile} = lists:keyfind(Mod, 1, Modules),ets:insert(E, {ModFile, DepFile}),digraph:add_vertex(G, Mod),digraph:add_vertex(G, Dep),digraph:add_edge(G, Mod, Dep)endend,AddHd = fun (F, Mod, DepFile) ->case file:open(DepFile, [read]) of{error, enoent} ->ok;{ok, Fd} ->{_, ModFile} = lists:keyfind(Mod, 1, Modules),case ets:match(E, {ModFile, DepFile}) of[] ->ets:insert(E, {ModFile, DepFile}),F(F, Fd, Mod,0);_ -> okendendend,SearchHrl = funF(_Hrl, []) -> {error,enoent};F(Hrl, [Dir|Dirs]) ->HrlF = filename:join([Dir,Hrl]),case filelib:is_file(HrlF) oftrue ->{ok, HrlF};false -> F(Hrl,Dirs)endend,Attr = fun(_F, Mod, behavior, Dep) ->Add(Mod, Dep);(_F, Mod, behaviour, Dep) ->Add(Mod, Dep);(_F, Mod, compile, {parse_transform, Dep}) ->Add(Mod, Dep);(_F, Mod, compile, Opts) when is_list(Opts) ->case proplists:get_value(parse_transform, Opts) ofundefined -> ok;Dep -> Add(Mod, Dep)end;(F, Mod, include, Hrl) ->case SearchHrl(Hrl, ["src", "include",AppsDir,DepsDir]++AppsDirs++DepsDirs) of{ok, FoundHrl} -> AddHd(F, Mod, FoundHrl);{error, _} -> falseend;(F, Mod, include_lib, Hrl) ->case SearchHrl(Hrl, ["src", "include",AppsDir,DepsDir]++AppsDirs++DepsDirs) of{ok, FoundHrl} -> AddHd(F, Mod, FoundHrl);{error, _} -> falseend;(F, Mod, import, {Imp, _}) ->IsFile =case lists:keyfind(Imp, 1, Modules) offalse -> false;{_, FilePath} -> filelib:is_file(FilePath)end,case IsFile offalse -> ok;true -> Add(Mod, Imp)end;(_, _, _, _) -> okend,MakeDepend = fun(F, Fd, Mod, StartLocation) ->{ok, Filename} = file:pid2name(Fd),case io:parse_erl_form(Fd, undefined, StartLocation) of{ok, AbsData, EndLocation} ->case AbsData of{attribute, _, Key, Value} ->Attr(F, Mod, Key, Value),F(F, Fd, Mod, EndLocation);_ -> F(F, Fd, Mod, EndLocation)end;{eof, _ } -> file:close(Fd);{error, ErrorDescription } ->file:close(Fd);{error, ErrorInfo, ErrorLocation} ->F(F, Fd, Mod, ErrorLocation)end,okend,[beginMod = list_to_atom(filename:basename(F, ".erl")),case file:open(F, [read]) of{ok, Fd} -> MakeDepend(MakeDepend, Fd, Mod,0);{error, enoent} -> okendend || F <- ErlFiles],Depend = sofs:to_external(sofs:relation_to_family(sofs:relation(ets:tab2list(E)))),CompileFirst = [X || X <- lists:reverse(digraph_utils:topsort(G)), [] =/= digraph:in_neighbours(G, X)],TargetPath = fun(Target) ->case lists:keyfind(Target, 1, Modules) offalse -> "";{_, DepFile} ->DirSubname = tl(string:tokens(filename:dirname(DepFile), "/")),string:join(DirSubname ++ [atom_to_list(Target)], "/")endend,Output0 = ["# Generated by Erlang.mk. Edit at your own risk!\n\n",[[F, "::", [[" ", D] || D <- Deps], "; @touch \$$@\n"] || {F, Deps} <- Depend],"\nCOMPILE_FIRST +=", [[" ", TargetPath(CF)] || CF <- CompileFirst], "\n"],Output = case "é" of[233] -> unicode:characters_to_binary(Output0);_ -> Output0end,ok = file:write_file("$(1)", Output),halt()endefifeq ($(if $(NO_MAKEDEP),$(wildcard $(PROJECT).d),),)$(PROJECT).d:: $(ERL_FILES) $(call core_find,include/,*.hrl) $(MAKEFILE_LIST)$(makedep_verbose) $(call erlang,$(call makedep.erl,$@))endififeq ($(IS_APP)$(IS_DEP),)ifneq ($(words $(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES)),0)# Rebuild everything when the Makefile changes.$(ERLANG_MK_TMP)/last-makefile-change: $(MAKEFILE_LIST) | $(ERLANG_MK_TMP)$(verbose) if test -f $@; then \touch $(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES); \touch -c $(PROJECT).d; \fi$(verbose) touch $@$(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES):: $(ERLANG_MK_TMP)/last-makefile-changeebin/$(PROJECT).app:: $(ERLANG_MK_TMP)/last-makefile-changeendifendif$(PROJECT).d::$(verbose) :include $(wildcard $(PROJECT).d)ebin/$(PROJECT).app:: ebin/ebin/:$(verbose) mkdir -p ebin/define compile_erl$(erlc_verbose) erlc -v $(if $(IS_DEP),$(filter-out -Werror,$(ERLC_OPTS)),$(ERLC_OPTS)) -o ebin/ \-pa ebin/ -I include/ $(filter-out $(ERLC_EXCLUDE_PATHS),$(COMPILE_FIRST_PATHS) $(1))endefdefine validate_app_filecase file:consult("ebin/$(PROJECT).app") of{ok, _} -> halt();_ -> halt(1)endendefebin/$(PROJECT).app:: $(ERL_FILES) $(CORE_FILES) $(wildcard src/$(PROJECT).app.src)$(eval FILES_TO_COMPILE := $(filter-out src/$(PROJECT).app.src,$?))$(if $(strip $(FILES_TO_COMPILE)),$(call compile_erl,$(FILES_TO_COMPILE)))# Older git versions do not have the --first-parent flag. Do without in that case.$(eval GITDESCRIBE := $(shell git describe --dirty --abbrev=7 --tags --always --first-parent 2>/dev/null \|| git describe --dirty --abbrev=7 --tags --always 2>/dev/null || true))$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \$(filter-out $(ERLC_EXCLUDE_PATHS),$(ERL_FILES) $(CORE_FILES) $(BEAM_FILES)))))))ifeq ($(wildcard src/$(PROJECT).app.src),)$(app_verbose) printf '$(subst %,%%,$(subst $(newline),\n,$(subst ','\'',$(call app_file,$(GITDESCRIBE),$(MODULES)))))' \> ebin/$(PROJECT).app$(verbose) if ! $(call erlang,$(call validate_app_file)); then \echo "The .app file produced is invalid. Please verify the value of PROJECT_ENV." >&2; \exit 1; \fielse$(verbose) if [ -z "$$(grep -e '^[^%]*{\s*modules\s*,' src/$(PROJECT).app.src)" ]; then \echo "Empty modules entry not found in $(PROJECT).app.src. Please consult the erlang.mk documentation for instructions." >&2; \exit 1; \fi$(appsrc_verbose) cat src/$(PROJECT).app.src \| sed "s/{[[:space:]]*modules[[:space:]]*,[[:space:]]*\[\]}/{modules, \[$(call comma_list,$(MODULES))\]}/" \| sed "s/{id,[[:space:]]*\"git\"}/{id, \"$(subst /,\/,$(GITDESCRIBE))\"}/" \> ebin/$(PROJECT).appendififneq ($(wildcard src/$(PROJECT).appup),)$(verbose) cp src/$(PROJECT).appup ebin/endifclean:: clean-appclean-app:$(gen_verbose) rm -rf $(PROJECT).d ebin/ priv/mibs/ $(XRL_ERL_FILES) $(YRL_ERL_FILES) \$(addprefix include/,$(patsubst %.mib,%.hrl,$(notdir $(MIB_FILES)))) \$(addprefix include/,$(patsubst %.asn1,%.hrl,$(notdir $(ASN1_FILES)))) \$(addprefix include/,$(patsubst %.asn1,%.asn1db,$(notdir $(ASN1_FILES)))) \$(addprefix src/,$(patsubst %.asn1,%.erl,$(notdir $(ASN1_FILES))))endif# Copyright (c) 2016, Loïc Hoguin <essen@ninenines.eu># Copyright (c) 2015, Viktor Söderqvist <viktor@zuiderkwast.se># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: docs-deps# Configuration.ALL_DOC_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(DOC_DEPS))# Targets.$(foreach dep,$(DOC_DEPS),$(eval $(call dep_target,$(dep))))ifneq ($(SKIP_DEPS),)doc-deps:elsedoc-deps: $(ALL_DOC_DEPS_DIRS)$(verbose) set -e; for dep in $(ALL_DOC_DEPS_DIRS) ; do $(MAKE) -C $$dep IS_DEP=1; doneendif# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: rel-deps# Configuration.ALL_REL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(REL_DEPS))# Targets.$(foreach dep,$(REL_DEPS),$(eval $(call dep_target,$(dep))))ifneq ($(SKIP_DEPS),)rel-deps:elserel-deps: $(ALL_REL_DEPS_DIRS)$(verbose) set -e; for dep in $(ALL_REL_DEPS_DIRS) ; do $(MAKE) -C $$dep; doneendif# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: test-deps test-dir test-build clean-test-dir# Configuration.TEST_DIR ?= $(CURDIR)/testALL_TEST_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(TEST_DEPS))TEST_ERLC_OPTS ?= +debug_info +warn_export_vars +warn_shadow_vars +warn_obsolete_guardTEST_ERLC_OPTS += -DTEST=1# Targets.$(foreach dep,$(TEST_DEPS),$(eval $(call dep_target,$(dep))))ifneq ($(SKIP_DEPS),)test-deps:elsetest-deps: $(ALL_TEST_DEPS_DIRS)$(verbose) set -e; for dep in $(ALL_TEST_DEPS_DIRS) ; do \if [ -z "$(strip $(FULL))" ] && [ ! -L $$dep ] && [ -f $$dep/ebin/dep_built ]; then \:; \else \$(MAKE) -C $$dep IS_DEP=1; \if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \fi \doneendififneq ($(wildcard $(TEST_DIR)),)test-dir: $(ERLANG_MK_TMP)/$(PROJECT).last-testdir-build@:test_erlc_verbose_0 = @echo " ERLC " $(filter-out $(patsubst %,%.erl,$(ERLC_EXCLUDE)),\$(filter %.erl %.core,$(notdir $(FILES_TO_COMPILE))));test_erlc_verbose_2 = set -x;test_erlc_verbose = $(test_erlc_verbose_$(V))define compile_test_erl$(test_erlc_verbose) erlc -v $(TEST_ERLC_OPTS) -o $(TEST_DIR) \-pa ebin/ -I include/ $(1)endefERL_TEST_FILES = $(call core_find,$(TEST_DIR)/,*.erl)$(ERLANG_MK_TMP)/$(PROJECT).last-testdir-build: $(ERL_TEST_FILES) $(MAKEFILE_LIST)$(eval FILES_TO_COMPILE := $(if $(filter $(MAKEFILE_LIST),$?),$(filter $(ERL_TEST_FILES),$^),$?))$(if $(strip $(FILES_TO_COMPILE)),$(call compile_test_erl,$(FILES_TO_COMPILE)) && touch $@)endiftest-build:: IS_TEST=1test-build:: ERLC_OPTS=$(TEST_ERLC_OPTS)test-build:: $(if $(wildcard src),$(if $(wildcard ebin/test),,clean)) $(if $(IS_APP),,deps test-deps)# We already compiled everything when IS_APP=1.ifndef IS_APPifneq ($(wildcard src),)$(verbose) $(MAKE) --no-print-directory $(PROJECT).d ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"$(verbose) $(MAKE) --no-print-directory app-build ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"$(gen_verbose) touch ebin/testendififneq ($(wildcard $(TEST_DIR)),)$(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"endifendif# Roughly the same as test-build, but when IS_APP=1.# We only care about compiling the current application.ifdef IS_APPtest-build-app:: ERLC_OPTS=$(TEST_ERLC_OPTS)test-build-app:: deps test-depsifneq ($(wildcard src),)$(verbose) $(MAKE) --no-print-directory $(PROJECT).d ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"$(verbose) $(MAKE) --no-print-directory app-build ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"$(gen_verbose) touch ebin/testendififneq ($(wildcard $(TEST_DIR)),)$(verbose) $(MAKE) --no-print-directory test-dir ERLC_OPTS="$(call escape_dquotes,$(TEST_ERLC_OPTS))"endifendifclean:: clean-test-dirclean-test-dir:ifneq ($(wildcard $(TEST_DIR)/*.beam),)$(gen_verbose) rm -f $(TEST_DIR)/*.beam $(ERLANG_MK_TMP)/$(PROJECT).last-testdir-buildendif# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: rebar.config# We strip out -Werror because we don't want to fail due to# warnings when used as a dependency.compat_prepare_erlc_opts = $(shell echo "$1" | sed 's/, */,/g')define compat_convert_erlc_opts$(if $(filter-out -Werror,$1),\$(if $(findstring +,$1),\$(shell echo $1 | cut -b 2-)))endefdefine compat_erlc_opts_to_list[$(call comma_list,$(foreach o,$(call compat_prepare_erlc_opts,$1),$(call compat_convert_erlc_opts,$o)))]endefdefine compat_rebar_config{deps, [$(call comma_list,$(foreach d,$(DEPS),\$(if $(filter hex,$(call dep_fetch,$d)),\{$(call dep_name,$d)$(comma)"$(call dep_repo,$d)"},\{$(call dep_name,$d)$(comma)".*"$(comma){git,"$(call dep_repo,$d)"$(comma)"$(call dep_commit,$d)"}})))]}.{erl_opts, $(call compat_erlc_opts_to_list,$(ERLC_OPTS))}.endefrebar.config:$(gen_verbose) $(call core_render,compat_rebar_config,rebar.config)# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.ifeq ($(filter asciideck,$(DEPS) $(DOC_DEPS)),asciideck).PHONY: asciidoc asciidoc-guide asciidoc-manual install-asciidoc distclean-asciidoc-guide distclean-asciidoc-manual# Core targets.docs:: asciidocdistclean:: distclean-asciidoc-guide distclean-asciidoc-manual# Plugin-specific targets.asciidoc: asciidoc-guide asciidoc-manual# User guide.ifeq ($(wildcard doc/src/guide/book.asciidoc),)asciidoc-guide:elseasciidoc-guide: distclean-asciidoc-guide doc-depsa2x -v -f pdf doc/src/guide/book.asciidoc && mv doc/src/guide/book.pdf doc/guide.pdfa2x -v -f chunked doc/src/guide/book.asciidoc && mv doc/src/guide/book.chunked/ doc/html/distclean-asciidoc-guide:$(gen_verbose) rm -rf doc/html/ doc/guide.pdfendif# Man pages.ASCIIDOC_MANUAL_FILES := $(wildcard doc/src/manual/*.asciidoc)ifeq ($(ASCIIDOC_MANUAL_FILES),)asciidoc-manual:else# Configuration.MAN_INSTALL_PATH ?= /usr/local/share/manMAN_SECTIONS ?= 3 7MAN_PROJECT ?= $(shell echo $(PROJECT) | sed 's/^./\U&\E/')MAN_VERSION ?= $(PROJECT_VERSION)# Plugin-specific targets.define asciidoc2man.erltry[beginio:format(" ADOC ~s~n", [F]),ok = asciideck:to_manpage(asciideck:parse_file(F), #{compress => gzip,outdir => filename:dirname(F),extra2 => "$(MAN_PROJECT) $(MAN_VERSION)",extra3 => "$(MAN_PROJECT) Function Reference"})end || F <- [$(shell echo $(addprefix $(comma)\",$(addsuffix \",$1)) | sed 's/^.//')]],halt(0)catch C:E$(if $V,:S) ->io:format("Exception: ~p:~p~n$(if $V,Stacktrace: ~p~n)", [C, E$(if $V,$(comma) S)]),halt(1)end.endefasciidoc-manual:: doc-depsasciidoc-manual:: $(ASCIIDOC_MANUAL_FILES)$(gen_verbose) $(call erlang,$(call asciidoc2man.erl,$?))$(verbose) $(foreach s,$(MAN_SECTIONS),mkdir -p doc/man$s/ && mv doc/src/manual/*.$s.gz doc/man$s/;)install-docs:: install-asciidocinstall-asciidoc: asciidoc-manual$(foreach s,$(MAN_SECTIONS),\mkdir -p $(MAN_INSTALL_PATH)/man$s/ && \install -g `id -g` -o `id -u` -m 0644 doc/man$s/*.gz $(MAN_INSTALL_PATH)/man$s/;)distclean-asciidoc-manual:$(gen_verbose) rm -rf $(addprefix doc/man,$(MAN_SECTIONS))endifendif# Copyright (c) 2014-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: bootstrap bootstrap-lib bootstrap-rel new list-templates# Core targets.help::$(verbose) printf "%s\n" "" \"Bootstrap targets:" \" bootstrap Generate a skeleton of an OTP application" \" bootstrap-lib Generate a skeleton of an OTP library" \" bootstrap-rel Generate the files needed to build a release" \" new-app in=NAME Create a new local OTP application NAME" \" new-lib in=NAME Create a new local OTP library NAME" \" new t=TPL n=NAME Generate a module NAME based on the template TPL" \" new t=T n=N in=APP Generate a module NAME based on the template TPL in APP" \" list-templates List available templates"# Bootstrap templates.define bs_appsrc{application, $p, [{description, ""},{vsn, "0.1.0"},{id, "git"},{modules, []},{registered, []},{applications, [kernel,stdlib]},{mod, {$p_app, []}},{env, []}]}.endefdefine bs_appsrc_lib{application, $p, [{description, ""},{vsn, "0.1.0"},{id, "git"},{modules, []},{registered, []},{applications, [kernel,stdlib]}]}.endef# To prevent autocompletion issues with ZSH, we add "include erlang.mk"# separately during the actual bootstrap.define bs_MakefilePROJECT = $pPROJECT_DESCRIPTION = New projectPROJECT_VERSION = 0.1.0$(if $(SP),# Whitespace to be used when creating files from templates.SP = $(SP))endefdefine bs_apps_MakefilePROJECT = $pPROJECT_DESCRIPTION = New projectPROJECT_VERSION = 0.1.0$(if $(SP),# Whitespace to be used when creating files from templates.SP = $(SP))# Make sure we know where the applications are located.ROOT_DIR ?= $(call core_relpath,$(dir $(ERLANG_MK_FILENAME)),$(APPS_DIR)/app)APPS_DIR ?= ..DEPS_DIR ?= $(call core_relpath,$(DEPS_DIR),$(APPS_DIR)/app)include $$(ROOT_DIR)/erlang.mkendefdefine bs_app-module($p_app).-behaviour(application).-export([start/2]).-export([stop/1]).start(_Type, _Args) ->$p_sup:start_link().stop(_State) ->ok.endefdefine bs_relx_config{release, {$p_release, "1"}, [$p, sasl, runtime_tools]}.{dev_mode, false}.{include_erts, true}.{extended_start_script, true}.{sys_config, "config/sys.config"}.{vm_args, "config/vm.args"}.endefdefine bs_sys_config[].endefdefine bs_vm_args-name $p@127.0.0.1-setcookie $p-heartendef# Normal templates.define tpl_supervisor-module($(n)).-behaviour(supervisor).-export([start_link/0]).-export([init/1]).start_link() ->supervisor:start_link({local, ?MODULE}, ?MODULE, []).init([]) ->Procs = [],{ok, {{one_for_one, 1, 5}, Procs}}.endefdefine tpl_gen_server-module($(n)).-behaviour(gen_server).%% API.-export([start_link/0]).%% gen_server.-export([init/1]).-export([handle_call/3]).-export([handle_cast/2]).-export([handle_info/2]).-export([terminate/2]).-export([code_change/3]).-record(state, {}).%% API.-spec start_link() -> {ok, pid()}.start_link() ->gen_server:start_link(?MODULE, [], []).%% gen_server.init([]) ->{ok, #state{}}.handle_call(_Request, _From, State) ->{reply, ignored, State}.handle_cast(_Msg, State) ->{noreply, State}.handle_info(_Info, State) ->{noreply, State}.terminate(_Reason, _State) ->ok.code_change(_OldVsn, State, _Extra) ->{ok, State}.endefdefine tpl_module-module($(n)).-export([]).endefdefine tpl_cowboy_http-module($(n)).-behaviour(cowboy_http_handler).-export([init/3]).-export([handle/2]).-export([terminate/3]).-record(state, {}).init(_, Req, _Opts) ->{ok, Req, #state{}}.handle(Req, State=#state{}) ->{ok, Req2} = cowboy_req:reply(200, Req),{ok, Req2, State}.terminate(_Reason, _Req, _State) ->ok.endefdefine tpl_gen_fsm-module($(n)).-behaviour(gen_fsm).%% API.-export([start_link/0]).%% gen_fsm.-export([init/1]).-export([state_name/2]).-export([handle_event/3]).-export([state_name/3]).-export([handle_sync_event/4]).-export([handle_info/3]).-export([terminate/3]).-export([code_change/4]).-record(state, {}).%% API.-spec start_link() -> {ok, pid()}.start_link() ->gen_fsm:start_link(?MODULE, [], []).%% gen_fsm.init([]) ->{ok, state_name, #state{}}.state_name(_Event, StateData) ->{next_state, state_name, StateData}.handle_event(_Event, StateName, StateData) ->{next_state, StateName, StateData}.state_name(_Event, _From, StateData) ->{reply, ignored, state_name, StateData}.handle_sync_event(_Event, _From, StateName, StateData) ->{reply, ignored, StateName, StateData}.handle_info(_Info, StateName, StateData) ->{next_state, StateName, StateData}.terminate(_Reason, _StateName, _StateData) ->ok.code_change(_OldVsn, StateName, StateData, _Extra) ->{ok, StateName, StateData}.endefdefine tpl_gen_statem-module($(n)).-behaviour(gen_statem).%% API.-export([start_link/0]).%% gen_statem.-export([callback_mode/0]).-export([init/1]).-export([state_name/3]).-export([handle_event/4]).-export([terminate/3]).-export([code_change/4]).-record(state, {}).%% API.-spec start_link() -> {ok, pid()}.start_link() ->gen_statem:start_link(?MODULE, [], []).%% gen_statem.callback_mode() ->state_functions.init([]) ->{ok, state_name, #state{}}.state_name(_EventType, _EventData, StateData) ->{next_state, state_name, StateData}.handle_event(_EventType, _EventData, StateName, StateData) ->{next_state, StateName, StateData}.terminate(_Reason, _StateName, _StateData) ->ok.code_change(_OldVsn, StateName, StateData, _Extra) ->{ok, StateName, StateData}.endefdefine tpl_cowboy_loop-module($(n)).-behaviour(cowboy_loop_handler).-export([init/3]).-export([info/3]).-export([terminate/3]).-record(state, {}).init(_, Req, _Opts) ->{loop, Req, #state{}, 5000, hibernate}.info(_Info, Req, State) ->{loop, Req, State, hibernate}.terminate(_Reason, _Req, _State) ->ok.endefdefine tpl_cowboy_rest-module($(n)).-export([init/3]).-export([content_types_provided/2]).-export([get_html/2]).init(_, _Req, _Opts) ->{upgrade, protocol, cowboy_rest}.content_types_provided(Req, State) ->{[{{<<"text">>, <<"html">>, '*'}, get_html}], Req, State}.get_html(Req, State) ->{<<"<html><body>This is REST!</body></html>">>, Req, State}.endefdefine tpl_cowboy_ws-module($(n)).-behaviour(cowboy_websocket_handler).-export([init/3]).-export([websocket_init/3]).-export([websocket_handle/3]).-export([websocket_info/3]).-export([websocket_terminate/3]).-record(state, {}).init(_, _, _) ->{upgrade, protocol, cowboy_websocket}.websocket_init(_, Req, _Opts) ->Req2 = cowboy_req:compact(Req),{ok, Req2, #state{}}.websocket_handle({text, Data}, Req, State) ->{reply, {text, Data}, Req, State};websocket_handle({binary, Data}, Req, State) ->{reply, {binary, Data}, Req, State};websocket_handle(_Frame, Req, State) ->{ok, Req, State}.websocket_info(_Info, Req, State) ->{ok, Req, State}.websocket_terminate(_Reason, _Req, _State) ->ok.endefdefine tpl_ranch_protocol-module($(n)).-behaviour(ranch_protocol).-export([start_link/4]).-export([init/4]).-type opts() :: [].-export_type([opts/0]).-record(state, {socket :: inet:socket(),transport :: module()}).start_link(Ref, Socket, Transport, Opts) ->Pid = spawn_link(?MODULE, init, [Ref, Socket, Transport, Opts]),{ok, Pid}.-spec init(ranch:ref(), inet:socket(), module(), opts()) -> ok.init(Ref, Socket, Transport, _Opts) ->ok = ranch:accept_ack(Ref),loop(#state{socket=Socket, transport=Transport}).loop(State) ->loop(State).endef# Plugin-specific targets.ifndef WSifdef SPWS = $(subst a,,a $(wordlist 1,$(SP),a a a a a a a a a a a a a a a a a a a a))elseWS = $(tab)endifendifbootstrap:ifneq ($(wildcard src/),)$(error Error: src/ directory already exists)endif$(eval p := $(PROJECT))$(if $(shell echo $p | LC_ALL=C grep -x "[a-z0-9_]*"),,\$(error Error: Invalid characters in the application name))$(eval n := $(PROJECT)_sup)$(verbose) $(call core_render,bs_Makefile,Makefile)$(verbose) echo "include erlang.mk" >> Makefile$(verbose) mkdir src/ifdef LEGACY$(verbose) $(call core_render,bs_appsrc,src/$(PROJECT).app.src)endif$(verbose) $(call core_render,bs_app,src/$(PROJECT)_app.erl)$(verbose) $(call core_render,tpl_supervisor,src/$(PROJECT)_sup.erl)bootstrap-lib:ifneq ($(wildcard src/),)$(error Error: src/ directory already exists)endif$(eval p := $(PROJECT))$(if $(shell echo $p | LC_ALL=C grep -x "[a-z0-9_]*"),,\$(error Error: Invalid characters in the application name))$(verbose) $(call core_render,bs_Makefile,Makefile)$(verbose) echo "include erlang.mk" >> Makefile$(verbose) mkdir src/ifdef LEGACY$(verbose) $(call core_render,bs_appsrc_lib,src/$(PROJECT).app.src)endifbootstrap-rel:ifneq ($(wildcard relx.config),)$(error Error: relx.config already exists)endififneq ($(wildcard config/),)$(error Error: config/ directory already exists)endif$(eval p := $(PROJECT))$(verbose) $(call core_render,bs_relx_config,relx.config)$(verbose) mkdir config/$(verbose) $(call core_render,bs_sys_config,config/sys.config)$(verbose) $(call core_render,bs_vm_args,config/vm.args)$(verbose) awk '/^include erlang.mk/ && !ins {print "BUILD_DEPS += relx";ins=1};{print}' Makefile > Makefile.bak$(verbose) mv Makefile.bak Makefilenew-app:ifndef in$(error Usage: $(MAKE) new-app in=APP)endififneq ($(wildcard $(APPS_DIR)/$in),)$(error Error: Application $in already exists)endif$(eval p := $(in))$(if $(shell echo $p | LC_ALL=C grep -x "[a-z0-9_]*"),,\$(error Error: Invalid characters in the application name))$(eval n := $(in)_sup)$(verbose) mkdir -p $(APPS_DIR)/$p/src/$(verbose) $(call core_render,bs_apps_Makefile,$(APPS_DIR)/$p/Makefile)ifdef LEGACY$(verbose) $(call core_render,bs_appsrc,$(APPS_DIR)/$p/src/$p.app.src)endif$(verbose) $(call core_render,bs_app,$(APPS_DIR)/$p/src/$p_app.erl)$(verbose) $(call core_render,tpl_supervisor,$(APPS_DIR)/$p/src/$p_sup.erl)new-lib:ifndef in$(error Usage: $(MAKE) new-lib in=APP)endififneq ($(wildcard $(APPS_DIR)/$in),)$(error Error: Application $in already exists)endif$(eval p := $(in))$(if $(shell echo $p | LC_ALL=C grep -x "[a-z0-9_]*"),,\$(error Error: Invalid characters in the application name))$(verbose) mkdir -p $(APPS_DIR)/$p/src/$(verbose) $(call core_render,bs_apps_Makefile,$(APPS_DIR)/$p/Makefile)ifdef LEGACY$(verbose) $(call core_render,bs_appsrc_lib,$(APPS_DIR)/$p/src/$p.app.src)endifnew:ifeq ($(wildcard src/)$(in),)$(error Error: src/ directory does not exist)endififndef t$(error Usage: $(MAKE) new t=TEMPLATE n=NAME [in=APP])endififndef n$(error Usage: $(MAKE) new t=TEMPLATE n=NAME [in=APP])endififdef in$(verbose) $(call core_render,tpl_$(t),$(APPS_DIR)/$(in)/src/$(n).erl)else$(verbose) $(call core_render,tpl_$(t),src/$(n).erl)endiflist-templates:$(verbose) @echo Available templates:$(verbose) printf " %s\n" $(sort $(patsubst tpl_%,%,$(filter tpl_%,$(.VARIABLES))))# Copyright (c) 2014-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: clean-c_src distclean-c_src-env# Configuration.C_SRC_DIR ?= $(CURDIR)/c_srcC_SRC_ENV ?= $(C_SRC_DIR)/env.mkC_SRC_OUTPUT ?= $(CURDIR)/priv/$(PROJECT)C_SRC_TYPE ?= shared# System type and C compiler/flags.ifeq ($(PLATFORM),msys2)C_SRC_OUTPUT_EXECUTABLE_EXTENSION ?= .exeC_SRC_OUTPUT_SHARED_EXTENSION ?= .dllC_SRC_OUTPUT_STATIC_EXTENSION ?= .libelseC_SRC_OUTPUT_EXECUTABLE_EXTENSION ?=C_SRC_OUTPUT_SHARED_EXTENSION ?= .soC_SRC_OUTPUT_STATIC_EXTENSION ?= .aendififeq ($(C_SRC_TYPE),shared)C_SRC_OUTPUT_FILE = $(C_SRC_OUTPUT)$(C_SRC_OUTPUT_SHARED_EXTENSION)else ifeq ($(C_SRC_TYPE),static)C_SRC_OUTPUT_FILE = $(C_SRC_OUTPUT)$(C_SRC_OUTPUT_STATIC_EXTENSION)elseC_SRC_OUTPUT_FILE = $(C_SRC_OUTPUT)$(C_SRC_OUTPUT_EXECUTABLE_EXTENSION)endifRANLIB ?= ranlibARFLAGS ?= crifeq ($(PLATFORM),msys2)# We hardcode the compiler used on MSYS2. The default CC=cc does# not produce working code. The "gcc" MSYS2 package also doesn't.CC = /mingw64/bin/gccexport CCCFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypesCXXFLAGS ?= -O3 -finline-functions -Wallelse ifeq ($(PLATFORM),darwin)CC ?= ccCFLAGS ?= -O3 -std=c99 -Wall -Wmissing-prototypesCXXFLAGS ?= -O3 -WallLDFLAGS ?= -flat_namespace -undefined suppresselse ifeq ($(PLATFORM),freebsd)CC ?= ccCFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypesCXXFLAGS ?= -O3 -finline-functions -Wallelse ifeq ($(PLATFORM),linux)CC ?= gccCFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypesCXXFLAGS ?= -O3 -finline-functions -Wallendififneq ($(PLATFORM),msys2)CFLAGS += -fPICCXXFLAGS += -fPICendififeq ($(C_SRC_TYPE),static)CFLAGS += -DSTATIC_ERLANG_NIF=1CXXFLAGS += -DSTATIC_ERLANG_NIF=1endifCFLAGS += -I"$(ERTS_INCLUDE_DIR)" -I"$(ERL_INTERFACE_INCLUDE_DIR)"CXXFLAGS += -I"$(ERTS_INCLUDE_DIR)" -I"$(ERL_INTERFACE_INCLUDE_DIR)"LDLIBS += -L"$(ERL_INTERFACE_LIB_DIR)" -lei# Verbosity.c_verbose_0 = @echo " C " $(filter-out $(notdir $(MAKEFILE_LIST) $(C_SRC_ENV)),$(^F));c_verbose = $(c_verbose_$(V))cpp_verbose_0 = @echo " CPP " $(filter-out $(notdir $(MAKEFILE_LIST) $(C_SRC_ENV)),$(^F));cpp_verbose = $(cpp_verbose_$(V))link_verbose_0 = @echo " LD " $(@F);link_verbose = $(link_verbose_$(V))ar_verbose_0 = @echo " AR " $(@F);ar_verbose = $(ar_verbose_$(V))ranlib_verbose_0 = @echo " RANLIB" $(@F);ranlib_verbose = $(ranlib_verbose_$(V))# Targets.ifeq ($(wildcard $(C_SRC_DIR)),)else ifneq ($(wildcard $(C_SRC_DIR)/Makefile),)app:: app-c_srctest-build:: app-c_srcapp-c_src:$(MAKE) -C $(C_SRC_DIR)clean::$(MAKE) -C $(C_SRC_DIR) cleanelseifeq ($(SOURCES),)SOURCES := $(sort $(foreach pat,*.c *.C *.cc *.cpp,$(call core_find,$(C_SRC_DIR)/,$(pat))))endifOBJECTS = $(addsuffix .o, $(basename $(SOURCES)))COMPILE_C = $(c_verbose) $(CC) $(CFLAGS) $(CPPFLAGS) -cCOMPILE_CPP = $(cpp_verbose) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -capp:: $(C_SRC_ENV) $(C_SRC_OUTPUT_FILE)test-build:: $(C_SRC_ENV) $(C_SRC_OUTPUT_FILE)ifneq ($(C_SRC_TYPE),static)$(C_SRC_OUTPUT_FILE): $(OBJECTS)$(verbose) mkdir -p $(dir $@)$(link_verbose) $(CC) $(OBJECTS) \$(LDFLAGS) $(if $(filter $(C_SRC_TYPE),shared),-shared) $(LDLIBS) \-o $(C_SRC_OUTPUT_FILE)else$(C_SRC_OUTPUT_FILE): $(OBJECTS)$(verbose) mkdir -p $(dir $@)$(ar_verbose) $(AR) $(ARFLAGS) $(C_SRC_OUTPUT_FILE) $(OBJECTS)$(ranlib_verbose) $(RANLIB) $(C_SRC_OUTPUT_FILE)endif$(OBJECTS): $(MAKEFILE_LIST) $(C_SRC_ENV)%.o: %.c$(COMPILE_C) $(OUTPUT_OPTION) $<%.o: %.cc$(COMPILE_CPP) $(OUTPUT_OPTION) $<%.o: %.C$(COMPILE_CPP) $(OUTPUT_OPTION) $<%.o: %.cpp$(COMPILE_CPP) $(OUTPUT_OPTION) $<clean:: clean-c_srcclean-c_src:$(gen_verbose) rm -f $(C_SRC_OUTPUT_FILE) $(OBJECTS)endififneq ($(wildcard $(C_SRC_DIR)),)ERL_ERTS_DIR = $(shell $(ERL) -eval 'io:format("~s~n", [code:lib_dir(erts)]), halt().')$(C_SRC_ENV):$(verbose) $(ERL) -eval "file:write_file(\"$(call core_native_path,$(C_SRC_ENV))\", \io_lib:format( \\"# Generated by Erlang.mk. Edit at your own risk!~n~n\" \\"ERTS_INCLUDE_DIR ?= ~s/erts-~s/include/~n\" \\"ERL_INTERFACE_INCLUDE_DIR ?= ~s~n\" \\"ERL_INTERFACE_LIB_DIR ?= ~s~n\" \\"ERTS_DIR ?= $(ERL_ERTS_DIR)~n\", \[code:root_dir(), erlang:system_info(version), \code:lib_dir(erl_interface, include), \code:lib_dir(erl_interface, lib)])), \halt()."distclean:: distclean-c_src-envdistclean-c_src-env:$(gen_verbose) rm -f $(C_SRC_ENV)-include $(C_SRC_ENV)ifneq ($(ERL_ERTS_DIR),$(ERTS_DIR))$(shell rm -f $(C_SRC_ENV))endifendif# Templates.define bs_c_nif#include "erl_nif.h"static int loads = 0;static int load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info){/* Initialize private data. */*priv_data = NULL;loads++;return 0;}static int upgrade(ErlNifEnv* env, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info){/* Convert the private data to the new version. */*priv_data = *old_priv_data;loads++;return 0;}static void unload(ErlNifEnv* env, void* priv_data){if (loads == 1) {/* Destroy the private data. */}loads--;}static ERL_NIF_TERM hello(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]){if (enif_is_atom(env, argv[0])) {return enif_make_tuple2(env,enif_make_atom(env, "hello"),argv[0]);}return enif_make_tuple2(env,enif_make_atom(env, "error"),enif_make_atom(env, "badarg"));}static ErlNifFunc nif_funcs[] = {{"hello", 1, hello}};ERL_NIF_INIT($n, nif_funcs, load, NULL, upgrade, unload)endefdefine bs_erl_nif-module($n).-export([hello/1]).-on_load(on_load/0).on_load() ->PrivDir = case code:priv_dir(?MODULE) of{error, _} ->AppPath = filename:dirname(filename:dirname(code:which(?MODULE))),filename:join(AppPath, "priv");Path ->Pathend,erlang:load_nif(filename:join(PrivDir, atom_to_list(?MODULE)), 0).hello(_) ->erlang:nif_error({not_loaded, ?MODULE}).endefnew-nif:ifneq ($(wildcard $(C_SRC_DIR)/$n.c),)$(error Error: $(C_SRC_DIR)/$n.c already exists)endififneq ($(wildcard src/$n.erl),)$(error Error: src/$n.erl already exists)endififndef n$(error Usage: $(MAKE) new-nif n=NAME [in=APP])endififdef in$(verbose) $(MAKE) -C $(APPS_DIR)/$(in)/ new-nif n=$n in=else$(verbose) mkdir -p $(C_SRC_DIR) src/$(verbose) $(call core_render,bs_c_nif,$(C_SRC_DIR)/$n.c)$(verbose) $(call core_render,bs_erl_nif,src/$n.erl)endif# Copyright (c) 2015-2017, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: ci ci-prepare ci-setupCI_OTP ?=ifeq ($(strip $(CI_OTP)),)ci::elseci:: $(addprefix ci-,$(CI_OTP))ci-prepare: $(addprefix $(KERL_INSTALL_DIR)/,$(CI_OTP))ci-setup::$(verbose) :ci-extra::$(verbose) :ci_verbose_0 = @echo " CI " $(1);ci_verbose = $(ci_verbose_$(V))define ci_targetci-$1: $(KERL_INSTALL_DIR)/$2$(verbose) $(MAKE) --no-print-directory clean$(ci_verbose) \PATH="$(KERL_INSTALL_DIR)/$2/bin:$(PATH)" \CI_OTP_RELEASE="$1" \CT_OPTS="-label $1" \CI_VM="$3" \$(MAKE) ci-setup tests$(verbose) $(MAKE) --no-print-directory ci-extraendef$(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp),$(otp),otp)))$(foreach otp,$(filter-out $(ERLANG_OTP),$(CI_OTP)),$(eval $(call kerl_otp_target,$(otp))))help::$(verbose) printf "%s\n" "" \"Continuous Integration targets:" \" ci Run '$(MAKE) tests' on all configured Erlang versions." \"" \"The CI_OTP variable must be defined with the Erlang versions" \"that must be tested. For example: CI_OTP = OTP-17.3.4 OTP-17.5.3"endif# Copyright (c) 2020, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.ifdef CONCUERROR_TESTS.PHONY: concuerror distclean-concuerror# ConfigurationCONCUERROR_LOGS_DIR ?= $(CURDIR)/logsCONCUERROR_OPTS ?=# Core targets.check:: concuerrorifndef KEEP_LOGSdistclean:: distclean-concuerrorendif# Plugin-specific targets.$(ERLANG_MK_TMP)/Concuerror/bin/concuerror: | $(ERLANG_MK_TMP)$(verbose) git clone https://github.com/parapluu/Concuerror $(ERLANG_MK_TMP)/Concuerror$(verbose) $(MAKE) -C $(ERLANG_MK_TMP)/Concuerror$(CONCUERROR_LOGS_DIR):$(verbose) mkdir -p $(CONCUERROR_LOGS_DIR)define concuerror_html_report<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Concuerror HTML report</title></head><body><h1>Concuerror HTML report</h1><p>Generated on $(concuerror_date)</p><ul>$(foreach t,$(concuerror_targets),<li><a href="$(t).txt">$(t)</a></li>)</ul></body></html>endefconcuerror: $(addprefix concuerror-,$(subst :,-,$(CONCUERROR_TESTS)))$(eval concuerror_date := $(shell date))$(eval concuerror_targets := $^)$(verbose) $(call core_render,concuerror_html_report,$(CONCUERROR_LOGS_DIR)/concuerror.html)define concuerror_target.PHONY: concuerror-$1-$2concuerror-$1-$2: test-build | $(ERLANG_MK_TMP)/Concuerror/bin/concuerror $(CONCUERROR_LOGS_DIR)$(ERLANG_MK_TMP)/Concuerror/bin/concuerror \--pa $(CURDIR)/ebin --pa $(TEST_DIR) \-o $(CONCUERROR_LOGS_DIR)/concuerror-$1-$2.txt \$$(CONCUERROR_OPTS) -m $1 -t $2endef$(foreach test,$(CONCUERROR_TESTS),$(eval $(call concuerror_target,$(firstword $(subst :, ,$(test))),$(lastword $(subst :, ,$(test))))))distclean-concuerror:$(gen_verbose) rm -rf $(CONCUERROR_LOGS_DIR)endif# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: ct apps-ct distclean-ct# Configuration.CT_OPTS ?=ifneq ($(wildcard $(TEST_DIR)),)ifndef CT_SUITESCT_SUITES := $(sort $(subst _SUITE.erl,,$(notdir $(call core_find,$(TEST_DIR)/,*_SUITE.erl))))endifendifCT_SUITES ?=CT_LOGS_DIR ?= $(CURDIR)/logs# Core targets.tests:: ctifndef KEEP_LOGSdistclean:: distclean-ctendifhelp::$(verbose) printf "%s\n" "" \"Common_test targets:" \" ct Run all the common_test suites for this project" \"" \"All your common_test suites have their associated targets." \"A suite named http_SUITE can be ran using the ct-http target."# Plugin-specific targets.CT_RUN = ct_run \-no_auto_compile \-noinput \-pa $(CURDIR)/ebin $(TEST_DIR) \-dir $(TEST_DIR) \-logdir $(CT_LOGS_DIR)ifeq ($(CT_SUITES),)ct: $(if $(IS_APP)$(ROOT_DIR),,apps-ct)else# We do not run tests if we are in an apps/* with no test directory.ifneq ($(IS_APP)$(wildcard $(TEST_DIR)),1)ct: test-build $(if $(IS_APP)$(ROOT_DIR),,apps-ct)$(verbose) mkdir -p $(CT_LOGS_DIR)$(gen_verbose) $(CT_RUN) -sname ct_$(PROJECT) -suite $(addsuffix _SUITE,$(CT_SUITES)) $(CT_OPTS)endifendififneq ($(ALL_APPS_DIRS),)define ct_app_targetapps-ct-$1: test-build$$(MAKE) -C $1 ct IS_APP=1endef$(foreach app,$(ALL_APPS_DIRS),$(eval $(call ct_app_target,$(app))))apps-ct: $(addprefix apps-ct-,$(ALL_APPS_DIRS))endififdef tifeq (,$(findstring :,$t))CT_EXTRA = -group $telset_words = $(subst :, ,$t)CT_EXTRA = -group $(firstword $(t_words)) -case $(lastword $(t_words))endifelseifdef cCT_EXTRA = -case $celseCT_EXTRA =endifendifdefine ct_suite_targetct-$1: test-build$$(verbose) mkdir -p $$(CT_LOGS_DIR)$$(gen_verbose_esc) $$(CT_RUN) -sname ct_$$(PROJECT) -suite $$(addsuffix _SUITE,$1) $$(CT_EXTRA) $$(CT_OPTS)endef$(foreach test,$(CT_SUITES),$(eval $(call ct_suite_target,$(test))))distclean-ct:$(gen_verbose) rm -rf $(CT_LOGS_DIR)# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: plt distclean-plt dialyze# Configuration.DIALYZER_PLT ?= $(CURDIR)/.$(PROJECT).pltexport DIALYZER_PLTPLT_APPS ?=DIALYZER_DIRS ?= --src -r $(wildcard src) $(ALL_APPS_DIRS)DIALYZER_OPTS ?= -Werror_handling -Wunmatched_returns # -WunderspecsDIALYZER_PLT_OPTS ?=# Core targets.check:: dialyzedistclean:: distclean-plthelp::$(verbose) printf "%s\n" "" \"Dialyzer targets:" \" plt Build a PLT file for this project" \" dialyze Analyze the project using Dialyzer"# Plugin-specific targets.define filter_opts.erlOpts = init:get_plain_arguments(),{Filtered, _} = lists:foldl(fun(O, {Os, true}) -> {[O|Os], false};(O = "-D", {Os, _}) -> {[O|Os], true};(O = [\\$$-, \\$$D, _ | _], {Os, _}) -> {[O|Os], false};(O = "-I", {Os, _}) -> {[O|Os], true};(O = [\\$$-, \\$$I, _ | _], {Os, _}) -> {[O|Os], false};(O = "-pa", {Os, _}) -> {[O|Os], true};(_, Acc) -> Accend, {[], false}, Opts),io:format("~s~n", [string:join(lists:reverse(Filtered), " ")]),halt().endef# DIALYZER_PLT is a variable understood directly by Dialyzer.## We append the path to erts at the end of the PLT. This works# because the PLT file is in the external term format and the# function binary_to_term/1 ignores any trailing data.$(DIALYZER_PLT): deps app$(eval DEPS_LOG := $(shell test -f $(ERLANG_MK_TMP)/deps.log && \while read p; do test -d $$p/ebin && echo $$p/ebin; done <$(ERLANG_MK_TMP)/deps.log))$(verbose) dialyzer --build_plt $(DIALYZER_PLT_OPTS) --apps \erts kernel stdlib $(PLT_APPS) $(OTP_DEPS) $(LOCAL_DEPS) $(DEPS_LOG) || test $$? -eq 2$(verbose) $(ERL) -eval 'io:format("~n~s~n", [code:lib_dir(erts)]), halt().' >> $@plt: $(DIALYZER_PLT)distclean-plt:$(gen_verbose) rm -f $(DIALYZER_PLT)ifneq ($(wildcard $(DIALYZER_PLT)),)dialyze: $(if $(filter --src,$(DIALYZER_DIRS)),,deps app)$(verbose) if ! tail -n1 $(DIALYZER_PLT) | \grep -q "^`$(ERL) -eval 'io:format("~s", [code:lib_dir(erts)]), halt().'`$$"; then \rm $(DIALYZER_PLT); \$(MAKE) plt; \fielsedialyze: $(DIALYZER_PLT)endif$(verbose) dialyzer `$(ERL) \-eval "$(subst $(newline),,$(call escape_dquotes,$(call filter_opts.erl)))" \-extra $(ERLC_OPTS)` $(DIALYZER_DIRS) $(DIALYZER_OPTS) $(if $(wildcard ebin/),-pa ebin/)# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: distclean-edoc edoc# Configuration.EDOC_OPTS ?=EDOC_SRC_DIRS ?=EDOC_OUTPUT ?= docdefine edoc.erlSrcPaths = lists:foldl(fun(P, Acc) ->filelib:wildcard(atom_to_list(P) ++ "/{src,c_src}")++ lists:filter(fun(D) ->filelib:is_dir(D)end, filelib:wildcard(atom_to_list(P) ++ "/{src,c_src}/**"))++ Accend, [], [$(call comma_list,$(patsubst %,'%',$(call core_native_path,$(EDOC_SRC_DIRS))))]),DefaultOpts = [{dir, "$(EDOC_OUTPUT)"}, {source_path, SrcPaths}, {subpackages, false}],edoc:application($(1), ".", [$(2)] ++ DefaultOpts),halt(0).endef# Core targets.ifneq ($(strip $(EDOC_SRC_DIRS)$(wildcard doc/overview.edoc)),)docs:: edocendifdistclean:: distclean-edoc# Plugin-specific targets.edoc: distclean-edoc doc-deps$(gen_verbose) $(call erlang,$(call edoc.erl,$(PROJECT),$(EDOC_OPTS)))distclean-edoc:$(gen_verbose) rm -f $(EDOC_OUTPUT)/*.css $(EDOC_OUTPUT)/*.html $(EDOC_OUTPUT)/*.png $(EDOC_OUTPUT)/edoc-info# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.# Configuration.DTL_FULL_PATH ?=DTL_PATH ?= templates/DTL_PREFIX ?=DTL_SUFFIX ?= _dtlDTL_OPTS ?=# Verbosity.dtl_verbose_0 = @echo " DTL " $(filter %.dtl,$(?F));dtl_verbose = $(dtl_verbose_$(V))# Core targets.DTL_PATH := $(abspath $(DTL_PATH))DTL_FILES := $(sort $(call core_find,$(DTL_PATH),*.dtl))ifneq ($(DTL_FILES),)DTL_NAMES = $(addprefix $(DTL_PREFIX),$(addsuffix $(DTL_SUFFIX),$(DTL_FILES:$(DTL_PATH)/%.dtl=%)))DTL_MODULES = $(if $(DTL_FULL_PATH),$(subst /,_,$(DTL_NAMES)),$(notdir $(DTL_NAMES)))BEAM_FILES += $(addsuffix .beam,$(addprefix ebin/,$(DTL_MODULES)))ifneq ($(words $(DTL_FILES)),0)# Rebuild templates when the Makefile changes.$(ERLANG_MK_TMP)/last-makefile-change-erlydtl: $(MAKEFILE_LIST) | $(ERLANG_MK_TMP)$(verbose) if test -f $@; then \touch $(DTL_FILES); \fi$(verbose) touch $@ebin/$(PROJECT).app:: $(ERLANG_MK_TMP)/last-makefile-change-erlydtlendifdefine erlydtl_compile.erl[beginModule0 = case "$(strip $(DTL_FULL_PATH))" of"" ->filename:basename(F, ".dtl");_ ->"$(call core_native_path,$(DTL_PATH))/" ++ F2 = filename:rootname(F, ".dtl"),re:replace(F2, "/", "_", [{return, list}, global])end,Module = list_to_atom("$(DTL_PREFIX)" ++ string:to_lower(Module0) ++ "$(DTL_SUFFIX)"),case erlydtl:compile(F, Module, [$(DTL_OPTS)] ++ [{out_dir, "ebin/"}, return_errors]) ofok -> ok;{ok, _} -> okendend || F <- string:tokens("$(1)", " ")],halt().endefebin/$(PROJECT).app:: $(DTL_FILES) | ebin/$(if $(strip $?),\$(dtl_verbose) $(call erlang,$(call erlydtl_compile.erl,$(call core_native_path,$?)),\-pa ebin/))endif# Copyright (c) 2016, Loïc Hoguin <essen@ninenines.eu># Copyright (c) 2014, Dave Cottlehuber <dch@skunkwerks.at># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: distclean-escript escript escript-zip# Configuration.ESCRIPT_NAME ?= $(PROJECT)ESCRIPT_FILE ?= $(ESCRIPT_NAME)ESCRIPT_SHEBANG ?= /usr/bin/env escriptESCRIPT_COMMENT ?= This is an -*- erlang -*- fileESCRIPT_EMU_ARGS ?= -escript main $(ESCRIPT_NAME)ESCRIPT_ZIP ?= 7z a -tzip -mx=9 -mtc=off $(if $(filter-out 0,$(V)),,> /dev/null)ESCRIPT_ZIP_FILE ?= $(ERLANG_MK_TMP)/escript.zip# Core targets.distclean:: distclean-escripthelp::$(verbose) printf "%s\n" "" \"Escript targets:" \" escript Build an executable escript archive" \# Plugin-specific targets.escript-zip:: FULL=1escript-zip:: deps app$(verbose) mkdir -p $(dir $(abspath $(ESCRIPT_ZIP_FILE)))$(verbose) rm -f $(abspath $(ESCRIPT_ZIP_FILE))$(gen_verbose) cd .. && $(ESCRIPT_ZIP) $(abspath $(ESCRIPT_ZIP_FILE)) $(PROJECT)/ebin/*ifneq ($(DEPS),)$(verbose) cd $(DEPS_DIR) && $(ESCRIPT_ZIP) $(abspath $(ESCRIPT_ZIP_FILE)) \$(subst $(DEPS_DIR)/,,$(addsuffix /*,$(wildcard \$(addsuffix /ebin,$(shell cat $(ERLANG_MK_TMP)/deps.log)))))endifescript:: escript-zip$(gen_verbose) printf "%s\n" \"#!$(ESCRIPT_SHEBANG)" \"%% $(ESCRIPT_COMMENT)" \"%%! $(ESCRIPT_EMU_ARGS)" > $(ESCRIPT_FILE)$(verbose) cat $(abspath $(ESCRIPT_ZIP_FILE)) >> $(ESCRIPT_FILE)$(verbose) chmod +x $(ESCRIPT_FILE)distclean-escript:$(gen_verbose) rm -f $(ESCRIPT_FILE) $(abspath $(ESCRIPT_ZIP_FILE))# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># Copyright (c) 2014, Enrique Fernandez <enrique.fernandez@erlang-solutions.com># This file is contributed to erlang.mk and subject to the terms of the ISC License..PHONY: eunit apps-eunit# ConfigurationEUNIT_OPTS ?=EUNIT_ERL_OPTS ?=EUNIT_TEST_SPEC ?= $1# Core targets.tests:: eunithelp::$(verbose) printf "%s\n" "" \"EUnit targets:" \" eunit Run all the EUnit tests for this project"# Plugin-specific targets.define eunit.erl$(call cover.erl)CoverSetup(),case eunit:test($(call EUNIT_TEST_SPEC,$1), [$(EUNIT_OPTS)]) ofok -> ok;error -> halt(2)end,CoverExport("$(call core_native_path,$(COVER_DATA_DIR))/eunit.coverdata"),halt()endefEUNIT_ERL_OPTS += -pa $(TEST_DIR) $(CURDIR)/ebinifdef tifeq (,$(findstring :,$(t)))eunit: test-build cover-data-dir$(gen_verbose) $(call erlang,$(call eunit.erl,['$(t)']),$(EUNIT_ERL_OPTS))elseeunit: test-build cover-data-dir$(gen_verbose) $(call erlang,$(call eunit.erl,fun $(t)/0),$(EUNIT_ERL_OPTS))endifelseEUNIT_EBIN_MODS = $(notdir $(basename $(ERL_FILES) $(BEAM_FILES)))EUNIT_TEST_MODS = $(notdir $(basename $(call core_find,$(TEST_DIR)/,*.erl)))EUNIT_MODS = $(foreach mod,$(EUNIT_EBIN_MODS) $(filter-out \$(patsubst %,%_tests,$(EUNIT_EBIN_MODS)),$(EUNIT_TEST_MODS)),'$(mod)')eunit: test-build $(if $(IS_APP)$(ROOT_DIR),,apps-eunit) cover-data-dirifneq ($(wildcard src/ $(TEST_DIR)),)$(gen_verbose) $(call erlang,$(call eunit.erl,[$(call comma_list,$(EUNIT_MODS))]),$(EUNIT_ERL_OPTS))endififneq ($(ALL_APPS_DIRS),)apps-eunit: test-build$(verbose) eunit_retcode=0 ; for app in $(ALL_APPS_DIRS); do $(MAKE) -C $$app eunit IS_APP=1; \[ $$? -ne 0 ] && eunit_retcode=1 ; done ; \exit $$eunit_retcodeendifendif# Copyright (c) 2020, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.HEX_CORE_GIT ?= https://github.com/hexpm/hex_coreHEX_CORE_COMMIT ?= v0.7.0PACKAGES += hex_corepkg_hex_core_name = hex_corepkg_hex_core_description = Reference implementation of Hex specificationspkg_hex_core_homepage = $(HEX_CORE_GIT)pkg_hex_core_fetch = gitpkg_hex_core_repo = $(HEX_CORE_GIT)pkg_hex_core_commit = $(HEX_CORE_COMMIT)# We automatically depend on hex_core when the project isn't already.$(if $(filter hex_core,$(DEPS) $(BUILD_DEPS) $(DOC_DEPS) $(REL_DEPS) $(TEST_DEPS)),,\$(eval $(call dep_target,hex_core)))hex-core: $(DEPS_DIR)/hex_core$(verbose) if [ ! -e $(DEPS_DIR)/hex_core/ebin/dep_built ]; then \$(MAKE) -C $(DEPS_DIR)/hex_core IS_DEP=1; \touch $(DEPS_DIR)/hex_core/ebin/dep_built; \fi# @todo This must also apply to fetching.HEX_CONFIG ?=define hex_config.erlbeginConfig0 = hex_core:default_config(),Config0$(HEX_CONFIG)endendefdefine hex_user_create.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),case hex_api_user:create(Config, <<"$(strip $1)">>, <<"$(strip $2)">>, <<"$(strip $3)">>) of{ok, {201, _, #{<<"email">> := Email, <<"url">> := URL, <<"username">> := Username}}} ->io:format("User ~s (~s) created at ~s~n""Please check your inbox for a confirmation email.~n""You must confirm before you are allowed to publish packages.~n",[Username, Email, URL]),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(80)endendef# The $(info ) call inserts a new line after the password prompt.hex-user-create: hex-core$(if $(HEX_USERNAME),,$(eval HEX_USERNAME := $(shell read -p "Username: " username; echo $$username)))$(if $(HEX_PASSWORD),,$(eval HEX_PASSWORD := $(shell stty -echo; read -p "Password: " password; stty echo; echo $$password) $(info )))$(if $(HEX_EMAIL),,$(eval HEX_EMAIL := $(shell read -p "Email: " email; echo $$email)))$(gen_verbose) $(call erlang,$(call hex_user_create.erl,$(HEX_USERNAME),$(HEX_PASSWORD),$(HEX_EMAIL)))define hex_key_add.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => iolist_to_binary([<<"Basic ">>, base64:encode(<<"$(strip $1):$(strip $2)">>)])},Permissions = [case string:split(P, <<":">>) of[D] -> #{domain => D};[D, R] -> #{domain => D, resource => R}end|| P <- string:split(<<"$(strip $4)">>, <<",">>, all)],case hex_api_key:add(ConfigF, <<"$(strip $3)">>, Permissions) of{ok, {201, _, #{<<"secret">> := Secret}}} ->io:format("Key ~s created for user ~s~nSecret: ~s~n""Please store the secret in a secure location, such as a password store.~n""The secret will be requested for most Hex-related operations.~n",[<<"$(strip $3)">>, <<"$(strip $1)">>, Secret]),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(81)endendefhex-key-add: hex-core$(if $(HEX_USERNAME),,$(eval HEX_USERNAME := $(shell read -p "Username: " username; echo $$username)))$(if $(HEX_PASSWORD),,$(eval HEX_PASSWORD := $(shell stty -echo; read -p "Password: " password; stty echo; echo $$password) $(info )))$(gen_verbose) $(call erlang,$(call hex_key_add.erl,$(HEX_USERNAME),$(HEX_PASSWORD),\$(if $(name),$(name),$(shell hostname)-erlang-mk),\$(if $(perm),$(perm),api)))HEX_TARBALL_EXTRA_METADATA ?=# @todo Check that we can += filesHEX_TARBALL_FILES ?= \$(wildcard early-plugins.mk) \$(wildcard ebin/$(PROJECT).app) \$(wildcard ebin/$(PROJECT).appup) \$(wildcard $(notdir $(ERLANG_MK_FILENAME))) \$(sort $(call core_find,include/,*.hrl)) \$(wildcard LICENSE*) \$(wildcard Makefile) \$(wildcard plugins.mk) \$(sort $(call core_find,priv/,*)) \$(wildcard README*) \$(wildcard rebar.config) \$(sort $(call core_find,src/,*))HEX_TARBALL_OUTPUT_FILE ?= $(ERLANG_MK_TMP)/$(PROJECT).tar# @todo Need to check for rebar.config and/or the absence of DEPS to know# whether a project will work with Rebar.## @todo contributors licenses links in HEX_TARBALL_EXTRA_METADATA# In order to build the requirements metadata we look into DEPS.# We do not require that the project use Hex dependencies, however# Hex.pm does require that the package name and version numbers# correspond to a real Hex package.define hex_tarball_create.erlFiles0 = [$(call comma_list,$(patsubst %,"%",$(HEX_TARBALL_FILES)))],Requirements0 = #{$(foreach d,$(DEPS),<<"$(if $(subst hex,,$(call query_fetch_method,$d)),$d,$(if $(word 3,$(dep_$d)),$(word 3,$(dep_$d)),$d))">> => #{<<"app">> => <<"$d">>,<<"optional">> => false,<<"requirement">> => <<"$(call query_version,$d)">>},)$(if $(DEPS),dummy => dummy)},Requirements = maps:remove(dummy, Requirements0),Metadata0 = #{app => <<"$(strip $(PROJECT))">>,build_tools => [<<"make">>, <<"rebar3">>],description => <<"$(strip $(PROJECT_DESCRIPTION))">>,files => [unicode:characters_to_binary(F) || F <- Files0],name => <<"$(strip $(PROJECT))">>,requirements => Requirements,version => <<"$(strip $(PROJECT_VERSION))">>},Metadata = Metadata0$(HEX_TARBALL_EXTRA_METADATA),Files = [case file:read_file(F) of{ok, Bin} ->{F, Bin};{error, Reason} ->io:format("Error trying to open file ~0p: ~0p~n", [F, Reason]),halt(82)end || F <- Files0],case hex_tarball:create(Metadata, Files) of{ok, #{tarball := Tarball}} ->ok = file:write_file("$(strip $(HEX_TARBALL_OUTPUT_FILE))", Tarball),halt(0);{error, Reason} ->io:format("Error ~0p~n", [Reason]),halt(83)endendefhex_tar_verbose_0 = @echo " TAR $(notdir $(ERLANG_MK_TMP))/$(@F)";hex_tar_verbose_2 = set -x;hex_tar_verbose = $(hex_tar_verbose_$(V))$(HEX_TARBALL_OUTPUT_FILE): hex-core app$(hex_tar_verbose) $(call erlang,$(call hex_tarball_create.erl))hex-tarball-create: $(HEX_TARBALL_OUTPUT_FILE)define hex_release_publish_summary.erl{ok, Tarball} = erl_tar:open("$(strip $(HEX_TARBALL_OUTPUT_FILE))", [read]),ok = erl_tar:extract(Tarball, [{cwd, "$(ERLANG_MK_TMP)"}, {files, ["metadata.config"]}]),{ok, Metadata} = file:consult("$(ERLANG_MK_TMP)/metadata.config"),#{<<"name">> := Name,<<"version">> := Version,<<"files">> := Files,<<"requirements">> := Deps} = maps:from_list(Metadata),io:format("Publishing ~s ~s~n Dependencies:~n", [Name, Version]),case Deps of[] ->io:format(" (none)~n");_ ->[begin#{<<"app">> := DA, <<"requirement">> := DR} = maps:from_list(D),io:format(" ~s ~s~n", [DA, DR])end || {_, D} <- Deps]end,io:format(" Included files:~n"),[io:format(" ~s~n", [F]) || F <- Files],io:format("You may also review the contents of the tarball file.~n""Please enter your secret key to proceed.~n"),halt(0)endefdefine hex_release_publish.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => <<"$(strip $1)">>},{ok, Tarball} = file:read_file("$(strip $(HEX_TARBALL_OUTPUT_FILE))"),case hex_api_release:publish(ConfigF, Tarball, [{replace, $2}]) of{ok, {200, _, #{}}} ->io:format("Release replaced~n"),halt(0);{ok, {201, _, #{}}} ->io:format("Release published~n"),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(84)endendefhex-release-tarball: hex-core $(HEX_TARBALL_OUTPUT_FILE)$(verbose) $(call erlang,$(call hex_release_publish_summary.erl))hex-release-publish: hex-core hex-release-tarball$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_release_publish.erl,$(HEX_SECRET),false))hex-release-replace: hex-core hex-release-tarball$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_release_publish.erl,$(HEX_SECRET),true))define hex_release_delete.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => <<"$(strip $1)">>},case hex_api_release:delete(ConfigF, <<"$(strip $(PROJECT))">>, <<"$(strip $(PROJECT_VERSION))">>) of{ok, {204, _, _}} ->io:format("Release $(strip $(PROJECT_VERSION)) deleted~n"),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(85)endendefhex-release-delete: hex-core$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_release_delete.erl,$(HEX_SECRET)))define hex_release_retire.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => <<"$(strip $1)">>},Params = #{<<"reason">> => <<"$(strip $3)">>, <<"message">> => <<"$(strip $4)">>},case hex_api_release:retire(ConfigF, <<"$(strip $(PROJECT))">>, <<"$(strip $2)">>, Params) of{ok, {204, _, _}} ->io:format("Release $(strip $2) has been retired~n"),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(86)endendefhex-release-retire: hex-core$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_release_retire.erl,$(HEX_SECRET),\$(if $(HEX_VERSION),$(HEX_VERSION),$(PROJECT_VERSION)),\$(if $(HEX_REASON),$(HEX_REASON),invalid),\$(HEX_MESSAGE)))define hex_release_unretire.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => <<"$(strip $1)">>},case hex_api_release:unretire(ConfigF, <<"$(strip $(PROJECT))">>, <<"$(strip $2)">>) of{ok, {204, _, _}} ->io:format("Release $(strip $2) is not retired anymore~n"),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(87)endendefhex-release-unretire: hex-core$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_release_unretire.erl,$(HEX_SECRET),\$(if $(HEX_VERSION),$(HEX_VERSION),$(PROJECT_VERSION))))HEX_DOCS_DOC_DIR ?= doc/HEX_DOCS_TARBALL_FILES ?= $(sort $(call core_find,$(HEX_DOCS_DOC_DIR),*))HEX_DOCS_TARBALL_OUTPUT_FILE ?= $(ERLANG_MK_TMP)/$(PROJECT)-docs.tar.gz$(HEX_DOCS_TARBALL_OUTPUT_FILE): hex-core app docs$(hex_tar_verbose) tar czf $(HEX_DOCS_TARBALL_OUTPUT_FILE) -C $(HEX_DOCS_DOC_DIR) \$(HEX_DOCS_TARBALL_FILES:$(HEX_DOCS_DOC_DIR)%=%)hex-docs-tarball-create: $(HEX_DOCS_TARBALL_OUTPUT_FILE)define hex_docs_publish.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => <<"$(strip $1)">>},{ok, Tarball} = file:read_file("$(strip $(HEX_DOCS_TARBALL_OUTPUT_FILE))"),case hex_api:post(ConfigF,["packages", "$(strip $(PROJECT))", "releases", "$(strip $(PROJECT_VERSION))", "docs"],{"application/octet-stream", Tarball}) of{ok, {Status, _, _}} when Status >= 200, Status < 300 ->io:format("Docs published~n"),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(88)endendefhex-docs-publish: hex-core hex-docs-tarball-create$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_docs_publish.erl,$(HEX_SECRET)))define hex_docs_delete.erl{ok, _} = application:ensure_all_started(ssl),{ok, _} = application:ensure_all_started(inets),Config = $(hex_config.erl),ConfigF = Config#{api_key => <<"$(strip $1)">>},case hex_api:delete(ConfigF,["packages", "$(strip $(PROJECT))", "releases", "$(strip $2)", "docs"]) of{ok, {Status, _, _}} when Status >= 200, Status < 300 ->io:format("Docs removed~n"),halt(0);{ok, {Status, _, Errors}} ->io:format("Error ~b: ~0p~n", [Status, Errors]),halt(89)endendefhex-docs-delete: hex-core$(if $(HEX_SECRET),,$(eval HEX_SECRET := $(shell stty -echo; read -p "Secret: " secret; stty echo; echo $$secret) $(info )))$(gen_verbose) $(call erlang,$(call hex_docs_delete.erl,$(HEX_SECRET),\$(if $(HEX_VERSION),$(HEX_VERSION),$(PROJECT_VERSION))))# Copyright (c) 2015-2017, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.ifeq ($(filter proper,$(DEPS) $(TEST_DEPS)),proper).PHONY: proper# Targets.tests:: properdefine proper_check.erl$(call cover.erl)code:add_pathsa(["$(call core_native_path,$(CURDIR)/ebin)","$(call core_native_path,$(DEPS_DIR)/*/ebin)","$(call core_native_path,$(TEST_DIR))"]),Module = fun(M) ->[true] =:= lists:usort([case atom_to_list(F) of"prop_" ++ _ ->io:format("Testing ~p:~p/0~n", [M, F]),proper:quickcheck(M:F(), nocolors);_ ->trueend|| {F, 0} <- M:module_info(exports)])end,try beginCoverSetup(),Res = case $(1) ofall -> [true] =:= lists:usort([Module(M) || M <- [$(call comma_list,$(3))]]);module -> Module($(2));function -> proper:quickcheck($(2), nocolors)end,CoverExport("$(COVER_DATA_DIR)/proper.coverdata"),Resend oftrue -> halt(0);_ -> halt(1)catch error:undef$(if $V,:Stacktrace) ->io:format("Undefined property or module?~n$(if $V,~p~n)", [$(if $V,Stacktrace)]),halt(0)end.endefifdef tifeq (,$(findstring :,$(t)))proper: test-build cover-data-dir$(verbose) $(call erlang,$(call proper_check.erl,module,$(t)))elseproper: test-build cover-data-dir$(verbose) echo Testing $(t)/0$(verbose) $(call erlang,$(call proper_check.erl,function,$(t)()))endifelseproper: test-build cover-data-dir$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \$(wildcard ebin/*.beam) $(call core_find,$(TEST_DIR)/,*.beam))))))$(gen_verbose) $(call erlang,$(call proper_check.erl,all,undefined,$(MODULES)))endifendif# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.# Verbosity.proto_verbose_0 = @echo " PROTO " $(filter %.proto,$(?F));proto_verbose = $(proto_verbose_$(V))# Core targets.ifneq ($(wildcard src/),)ifneq ($(filter gpb protobuffs,$(BUILD_DEPS) $(DEPS)),)PROTO_FILES := $(filter %.proto,$(ALL_SRC_FILES))ERL_FILES += $(addprefix src/,$(patsubst %.proto,%_pb.erl,$(notdir $(PROTO_FILES))))ifeq ($(PROTO_FILES),)$(ERLANG_MK_TMP)/last-makefile-change-protobuffs:$(verbose) :else# Rebuild proto files when the Makefile changes.# We exclude $(PROJECT).d to avoid a circular dependency.$(ERLANG_MK_TMP)/last-makefile-change-protobuffs: $(filter-out $(PROJECT).d,$(MAKEFILE_LIST)) | $(ERLANG_MK_TMP)$(verbose) if test -f $@; then \touch $(PROTO_FILES); \fi$(verbose) touch $@$(PROJECT).d:: $(ERLANG_MK_TMP)/last-makefile-change-protobuffsendififeq ($(filter gpb,$(BUILD_DEPS) $(DEPS)),)define compile_proto.erl[beginprotobuffs_compile:generate_source(F, [{output_include_dir, "./include"},{output_src_dir, "./src"}])end || F <- string:tokens("$1", " ")],halt().endefelsedefine compile_proto.erl[begingpb_compile:file(F, [$(foreach i,$(sort $(dir $(PROTO_FILES))),{i$(comma) "$i"}$(comma)){include_as_lib, true},{module_name_suffix, "_pb"},{o_hrl, "./include"},{o_erl, "./src"},{use_packages, true}])end || F <- string:tokens("$1", " ")],halt().endefendififneq ($(PROTO_FILES),)$(PROJECT).d:: $(PROTO_FILES)$(verbose) mkdir -p ebin/ include/$(if $(strip $?),$(proto_verbose) $(call erlang,$(call compile_proto.erl,$?)))endifendifendif# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.ifeq ($(filter relx,$(BUILD_DEPS) $(DEPS) $(REL_DEPS)),relx).PHONY: relx-rel relx-relup distclean-relx-rel run# Configuration.RELX_CONFIG ?= $(CURDIR)/relx.configRELX_CONFIG_SCRIPT ?= $(CURDIR)/relx.config.scriptRELX_OUTPUT_DIR ?= _relRELX_REL_EXT ?=RELX_TAR ?= 1ifdef SFXRELX_TAR = 1endif# Core targets.ifeq ($(IS_DEP),)ifneq ($(wildcard $(RELX_CONFIG))$(wildcard $(RELX_CONFIG_SCRIPT)),)rel:: relx-relrelup:: relx-relupendifendifdistclean:: distclean-relx-rel# Plugin-specific targets.define relx_get_config.erl(fun() ->Config0 =case file:consult("$(call core_native_path,$(RELX_CONFIG))") of{ok, Terms} ->Terms;{error, _} ->[]end,case filelib:is_file("$(call core_native_path,$(RELX_CONFIG_SCRIPT))") oftrue ->Bindings = erl_eval:add_binding('CONFIG', Config0, erl_eval:new_bindings()),{ok, Config1} = file:script("$(call core_native_path,$(RELX_CONFIG_SCRIPT))", Bindings),Config1;false ->Config0endend)()endefdefine relx_release.erlConfig = $(call relx_get_config.erl),{release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),Vsn = case Vsn0 of{cmd, Cmd} -> os:cmd(Cmd);semver -> "";{semver, _} -> "";{git, short} -> string:trim(os:cmd("git rev-parse --short HEAD"), both, "\n");{git, long} -> string:trim(os:cmd("git rev-parse HEAD"), both, "\n");VsnStr -> Vsn0end,{ok, _} = relx:build_release(#{name => Name, vsn => Vsn}, Config ++ [{output_dir, "$(RELX_OUTPUT_DIR)"}]),halt(0).endefdefine relx_tar.erlConfig = $(call relx_get_config.erl),{release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),Vsn = case Vsn0 of{cmd, Cmd} -> os:cmd(Cmd);semver -> "";{semver, _} -> "";{git, short} -> string:trim(os:cmd("git rev-parse --short HEAD"), both, "\n");{git, long} -> string:trim(os:cmd("git rev-parse HEAD"), both, "\n");VsnStr -> Vsn0end,{ok, _} = relx:build_tar(#{name => Name, vsn => Vsn}, Config ++ [{output_dir, "$(RELX_OUTPUT_DIR)"}]),halt(0).endefdefine relx_relup.erlConfig = $(call relx_get_config.erl),{release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),Vsn = case Vsn0 of{cmd, Cmd} -> os:cmd(Cmd);semver -> "";{semver, _} -> "";{git, short} -> string:trim(os:cmd("git rev-parse --short HEAD"), both, "\n");{git, long} -> string:trim(os:cmd("git rev-parse HEAD"), both, "\n");VsnStr -> Vsn0end,{ok, _} = relx:build_relup(Name, Vsn, undefined, Config ++ [{output_dir, "$(RELX_OUTPUT_DIR)"}]),halt(0).endefrelx-rel: rel-deps app$(call erlang,$(call relx_release.erl),-pa ebin/)$(verbose) $(MAKE) relx-post-relifeq ($(RELX_TAR),1)$(call erlang,$(call relx_tar.erl),-pa ebin/)endifrelx-relup: rel-deps app$(call erlang,$(call relx_release.erl),-pa ebin/)$(MAKE) relx-post-rel$(call erlang,$(call relx_relup.erl),-pa ebin/)ifeq ($(RELX_TAR),1)$(call erlang,$(call relx_tar.erl),-pa ebin/)endifdistclean-relx-rel:$(gen_verbose) rm -rf $(RELX_OUTPUT_DIR)# Default hooks.relx-post-rel::$(verbose) :# Run target.ifeq ($(wildcard $(RELX_CONFIG))$(wildcard $(RELX_CONFIG_SCRIPT)),)run::elsedefine get_relx_release.erlConfig = $(call relx_get_config.erl),{release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),Vsn = case Vsn0 of{cmd, Cmd} -> os:cmd(Cmd);semver -> "";{semver, _} -> "";{git, short} -> string:trim(os:cmd("git rev-parse --short HEAD"), both, "\n");{git, long} -> string:trim(os:cmd("git rev-parse HEAD"), both, "\n");VsnStr -> Vsn0end,Extended = case lists:keyfind(extended_start_script, 1, Config) of{_, true} -> "1";_ -> ""end,io:format("~s ~s ~s", [Name, Vsn, Extended]),halt(0).endefRELX_REL := $(shell $(call erlang,$(get_relx_release.erl)))RELX_REL_NAME := $(word 1,$(RELX_REL))RELX_REL_VSN := $(word 2,$(RELX_REL))RELX_REL_CMD := $(if $(word 3,$(RELX_REL)),console)ifeq ($(PLATFORM),msys2)RELX_REL_EXT := .cmdendifrun:: all$(verbose) $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/bin/$(RELX_REL_NAME)$(RELX_REL_EXT) $(RELX_REL_CMD)ifdef RELOADrel::$(verbose) $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/bin/$(RELX_REL_NAME)$(RELX_REL_EXT) ping$(verbose) $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/bin/$(RELX_REL_NAME)$(RELX_REL_EXT) \eval "io:format(\"~p~n\", [c:lm()])."endifhelp::$(verbose) printf "%s\n" "" \"Relx targets:" \" run Compile the project, build the release and run it"endifendif# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># Copyright (c) 2014, M Robert Martin <rob@version2beta.com># This file is contributed to erlang.mk and subject to the terms of the ISC License..PHONY: shell# Configuration.SHELL_ERL ?= erlSHELL_PATHS ?= $(CURDIR)/ebin $(TEST_DIR)SHELL_OPTS ?=ALL_SHELL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(SHELL_DEPS))# Core targetshelp::$(verbose) 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))))ifneq ($(SKIP_DEPS),)build-shell-deps:elsebuild-shell-deps: $(ALL_SHELL_DEPS_DIRS)$(verbose) set -e; for dep in $(ALL_SHELL_DEPS_DIRS) ; do \if [ -z "$(strip $(FULL))" ] && [ ! -L $$dep ] && [ -f $$dep/ebin/dep_built ]; then \:; \else \$(MAKE) -C $$dep IS_DEP=1; \if [ ! -L $$dep ] && [ -d $$dep/ebin ]; then touch $$dep/ebin/dep_built; fi; \fi \doneendifshell:: build-shell-deps$(gen_verbose) $(SHELL_ERL) -pa $(SHELL_PATHS) $(SHELL_OPTS)# Copyright 2017, Stanislaw Klekot <dozzie@jarowit.net># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: distclean-sphinx sphinx# Configuration.SPHINX_BUILD ?= sphinx-buildSPHINX_SOURCE ?= docSPHINX_CONFDIR ?=SPHINX_FORMATS ?= htmlSPHINX_DOCTREES ?= $(ERLANG_MK_TMP)/sphinx.doctreesSPHINX_OPTS ?=#sphinx_html_opts =#sphinx_html_output = html#sphinx_man_opts =#sphinx_man_output = man#sphinx_latex_opts =#sphinx_latex_output = latex# Helpers.sphinx_build_0 = @echo " SPHINX" $1; $(SPHINX_BUILD) -N -qsphinx_build_1 = $(SPHINX_BUILD) -Nsphinx_build_2 = set -x; $(SPHINX_BUILD)sphinx_build = $(sphinx_build_$(V))define sphinx.build$(call sphinx_build,$1) -b $1 -d $(SPHINX_DOCTREES) $(if $(SPHINX_CONFDIR),-c $(SPHINX_CONFDIR)) $(SPHINX_OPTS) $(sphinx_$1_opts) -- $(SPHINX_SOURCE) $(call sphinx.output,$1)endefdefine sphinx.output$(if $(sphinx_$1_output),$(sphinx_$1_output),$1)endef# Targets.ifneq ($(wildcard $(if $(SPHINX_CONFDIR),$(SPHINX_CONFDIR),$(SPHINX_SOURCE))/conf.py),)docs:: sphinxdistclean:: distclean-sphinxendifhelp::$(verbose) printf "%s\n" "" \"Sphinx targets:" \" sphinx Generate Sphinx documentation." \"" \"ReST sources and 'conf.py' file are expected in directory pointed by" \"SPHINX_SOURCE ('doc' by default). SPHINX_FORMATS lists formats to build (only" \"'html' format is generated by default); target directory can be specified by" \'setting sphinx_$${format}_output, for example: sphinx_html_output = output/html' \"Additional Sphinx options can be set in SPHINX_OPTS."# Plugin-specific targets.sphinx:$(foreach F,$(SPHINX_FORMATS),$(call sphinx.build,$F))distclean-sphinx:$(gen_verbose) rm -rf $(filter-out $(SPHINX_SOURCE),$(foreach F,$(SPHINX_FORMATS),$(call sphinx.output,$F)))# Copyright (c) 2017, Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com># This file is contributed to erlang.mk and subject to the terms of the ISC License..PHONY: show-ERL_LIBS show-ERLC_OPTS show-TEST_ERLC_OPTSshow-ERL_LIBS:@echo $(ERL_LIBS)show-ERLC_OPTS:@$(foreach opt,$(ERLC_OPTS) -pa ebin -I include,echo "$(opt)";)show-TEST_ERLC_OPTS:@$(foreach opt,$(TEST_ERLC_OPTS) -pa ebin -I include,echo "$(opt)";)# Copyright (c) 2015-2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.ifeq ($(filter triq,$(DEPS) $(TEST_DEPS)),triq).PHONY: triq# Targets.tests:: triqdefine triq_check.erl$(call cover.erl)code:add_pathsa(["$(call core_native_path,$(CURDIR)/ebin)","$(call core_native_path,$(DEPS_DIR)/*/ebin)","$(call core_native_path,$(TEST_DIR))"]),try beginCoverSetup(),Res = case $(1) ofall -> [true] =:= lists:usort([triq:check(M) || M <- [$(call comma_list,$(3))]]);module -> triq:check($(2));function -> triq:check($(2))end,CoverExport("$(COVER_DATA_DIR)/triq.coverdata"),Resend oftrue -> halt(0);_ -> halt(1)catch error:undef$(if $V,:Stacktrace) ->io:format("Undefined property or module?~n$(if $V,~p~n)", [$(if $V,Stacktrace)]),halt(0)end.endefifdef tifeq (,$(findstring :,$(t)))triq: test-build cover-data-dir$(verbose) $(call erlang,$(call triq_check.erl,module,$(t)))elsetriq: test-build cover-data-dir$(verbose) echo Testing $(t)/0$(verbose) $(call erlang,$(call triq_check.erl,function,$(t)()))endifelsetriq: test-build cover-data-dir$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \$(wildcard ebin/*.beam) $(call core_find,$(TEST_DIR)/,*.beam))))))$(gen_verbose) $(call erlang,$(call triq_check.erl,all,undefined,$(MODULES)))endifendif# Copyright (c) 2022, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: xref# Configuration.# We do not use locals_not_used or deprecated_function_calls# because the compiler will error out by default in those# cases with Erlang.mk. Deprecated functions may make sense# in some cases but few libraries define them. We do not# use exports_not_used by default because it hinders more# than it helps library projects such as Cowboy. Finally,# undefined_functions provides little that undefined_function_calls# doesn't already provide, so it's not enabled by default.XREF_CHECKS ?= [undefined_function_calls]# Instead of predefined checks a query can be evaluated# using the Xref DSL. The $q variable is used in that case.# The scope is a list of keywords that correspond to# application directories, being essentially an easy way# to configure which applications to analyze. With:## - app: .# - apps: $(ALL_APPS_DIRS)# - deps: $(ALL_DEPS_DIRS)# - otp: Built-in Erlang/OTP applications.## The default is conservative (app) and will not be# appropriate for all types of queries (for example# application_call requires adding all applications# that might be called or they will not be found).XREF_SCOPE ?= app # apps deps otp# If the above is not enough, additional application# directories can be configured.XREF_EXTRA_APP_DIRS ?=# As well as additional non-application directories.XREF_EXTRA_DIRS ?=# Erlang.mk supports -ignore_xref([...]) with forms# {M, F, A} | {F, A} | M, the latter ignoring whole# modules. Ignores can also be provided project-wide.XREF_IGNORE ?= []# All callbacks may be ignored. Erlang.mk will ignore# them automatically for exports_not_used (unless it# is explicitly disabled by the user).XREF_IGNORE_CALLBACKS ?=# Core targets.help::$(verbose) printf '%s\n' '' \'Xref targets:' \' xref Analyze the project using Xref' \' xref q=QUERY Evaluate an Xref query'# Plugin-specific targets.define xref.erl{ok, Xref} = xref:start([]),Scope = [$(call comma_list,$(XREF_SCOPE))],AppDirs0 = [$(call comma_list,$(foreach d,$(XREF_EXTRA_APP_DIRS),"$d"))],AppDirs1 = case lists:member(otp, Scope) offalse -> AppDirs0;true ->RootDir = code:root_dir(),AppDirs0 ++ [filename:dirname(P) || P <- code:get_path(), lists:prefix(RootDir, P)]end,AppDirs2 = case lists:member(deps, Scope) offalse -> AppDirs1;true -> [$(call comma_list,$(foreach d,$(ALL_DEPS_DIRS),"$d"))] ++ AppDirs1end,AppDirs3 = case lists:member(apps, Scope) offalse -> AppDirs2;true -> [$(call comma_list,$(foreach d,$(ALL_APPS_DIRS),"$d"))] ++ AppDirs2end,AppDirs = case lists:member(app, Scope) offalse -> AppDirs3;true -> ["../$(notdir $(CURDIR))"|AppDirs3]end,[{ok, _} = xref:add_application(Xref, AppDir, [{builtins, true}]) || AppDir <- AppDirs],ExtraDirs = [$(call comma_list,$(foreach d,$(XREF_EXTRA_DIRS),"$d"))],[{ok, _} = xref:add_directory(Xref, ExtraDir, [{builtins, true}]) || ExtraDir <- ExtraDirs],ok = xref:set_library_path(Xref, code:get_path() -- (["ebin", "."] ++ AppDirs ++ ExtraDirs)),Checks = case {$1, is_list($2)} of{check, true} -> $2;{check, false} -> [$2];{query, _} -> [$2]end,FinalRes = [beginIsInformational = case $1 ofquery -> true;check ->is_tuple(Check) andalsolists:member(element(1, Check),[call, use, module_call, module_use, application_call, application_use])end,{ok, Res0} = case $1 ofcheck -> xref:analyze(Xref, Check);query -> xref:q(Xref, Check)end,Res = case IsInformational oftrue -> Res0;false ->lists:filter(fun(R) ->{Mod, InMFA, MFA} = case R of{InMFA0 = {M, _, _}, MFA0} -> {M, InMFA0, MFA0};{M, _, _} -> {M, R, R}end,Attrs = tryMod:module_info(attributes)catch error:undef ->[]end,InlineIgnores = lists:flatten([[case V ofM when is_atom(M) -> {M, '_', '_'};{F, A} -> {Mod, F, A};_ -> Vend || V <- Values]|| {ignore_xref, Values} <- Attrs]),BuiltinIgnores = [{eunit_test, wrapper_test_exported_, 0}],DoCallbackIgnores = case {Check, "$(strip $(XREF_IGNORE_CALLBACKS))"} of{exports_not_used, ""} -> true;{_, "0"} -> false;_ -> trueend,CallbackIgnores = case DoCallbackIgnores offalse -> [];true ->Behaviors = lists:flatten([[BL || {behavior, BL} <- Attrs],[BL || {behaviour, BL} <- Attrs]]),[{Mod, CF, CA} || B <- Behaviors, {CF, CA} <- B:behaviour_info(callbacks)]end,WideIgnores = ifis_list($(XREF_IGNORE)) ->[if is_atom(I) -> {I, '_', '_'}; true -> I end|| I <- $(XREF_IGNORE)];true -> [$(XREF_IGNORE)]end,Ignores = InlineIgnores ++ BuiltinIgnores ++ CallbackIgnores ++ WideIgnores,not (lists:member(InMFA, Ignores)orelse lists:member(MFA, Ignores)orelse lists:member({Mod, '_', '_'}, Ignores))end, Res0)end,case Res of[] -> ok;_ when IsInformational ->case Check of{call, {CM, CF, CA}} ->io:format("Functions that ~s:~s/~b calls:~n", [CM, CF, CA]);{use, {CM, CF, CA}} ->io:format("Function ~s:~s/~b is called by:~n", [CM, CF, CA]);{module_call, CMod} ->io:format("Modules that ~s calls:~n", [CMod]);{module_use, CMod} ->io:format("Module ~s is used by:~n", [CMod]);{application_call, CApp} ->io:format("Applications that ~s calls:~n", [CApp]);{application_use, CApp} ->io:format("Application ~s is used by:~n", [CApp]);_ when $1 =:= query ->io:format("Query ~s returned:~n", [Check])end,[case R of{{InM, InF, InA}, {M, F, A}} ->io:format("- ~s:~s/~b called by ~s:~s/~b~n",[M, F, A, InM, InF, InA]);{M, F, A} ->io:format("- ~s:~s/~b~n", [M, F, A]);ModOrApp ->io:format("- ~s~n", [ModOrApp])end || R <- Res],ok;_ ->[case {Check, R} of{undefined_function_calls, {{InM, InF, InA}, {M, F, A}}} ->io:format("Undefined function ~s:~s/~b called by ~s:~s/~b~n",[M, F, A, InM, InF, InA]);{undefined_functions, {M, F, A}} ->io:format("Undefined function ~s:~s/~b~n", [M, F, A]);{locals_not_used, {M, F, A}} ->io:format("Unused local function ~s:~s/~b~n", [M, F, A]);{exports_not_used, {M, F, A}} ->io:format("Unused exported function ~s:~s/~b~n", [M, F, A]);{deprecated_function_calls, {{InM, InF, InA}, {M, F, A}}} ->io:format("Deprecated function ~s:~s/~b called by ~s:~s/~b~n",[M, F, A, InM, InF, InA]);{deprecated_functions, {M, F, A}} ->io:format("Deprecated function ~s:~s/~b~n", [M, F, A]);_ ->io:format("~p: ~p~n", [Check, R])end || R <- Res],errorendend || Check <- Checks],stopped = xref:stop(Xref),case lists:usort(FinalRes) of[ok] -> halt(0);_ -> halt(1)endendefxref: deps appifdef q$(verbose) $(call erlang,$(call xref.erl,query,"$q"),-pa ebin/)else$(verbose) $(call erlang,$(call xref.erl,check,$(XREF_CHECKS)),-pa ebin/)endif# Copyright (c) 2016, Loïc Hoguin <essen@ninenines.eu># Copyright (c) 2015, Viktor Söderqvist <viktor@zuiderkwast.se># This file is part of erlang.mk and subject to the terms of the ISC License.COVER_REPORT_DIR ?= coverCOVER_DATA_DIR ?= $(COVER_REPORT_DIR)ifdef COVERCOVER_APPS ?= $(notdir $(ALL_APPS_DIRS))COVER_DEPS ?=COVER_EXCLUDE_MODS ?=endif# Code coverage for Common Test.ifdef COVERifdef CT_RUNifneq ($(wildcard $(TEST_DIR)),)test-build:: $(TEST_DIR)/ct.cover.spec$(TEST_DIR)/ct.cover.spec: cover-data-dir$(gen_verbose) printf "%s\n" \"{incl_app, '$(PROJECT)', details}." \"{incl_dirs, '$(PROJECT)', [\"$(call core_native_path,$(CURDIR)/ebin)\" \$(foreach a,$(COVER_APPS),$(comma) \"$(call core_native_path,$(APPS_DIR)/$a/ebin)\") \$(foreach d,$(COVER_DEPS),$(comma) \"$(call core_native_path,$(DEPS_DIR)/$d/ebin)\")]}." \'{export,"$(call core_native_path,$(abspath $(COVER_DATA_DIR))/ct.coverdata)"}.' \"{excl_mods, '$(PROJECT)', [$(call comma_list,$(COVER_EXCLUDE_MODS))]}." > $@CT_RUN += -cover $(TEST_DIR)/ct.cover.specendifendifendif# Code coverage for other tools.ifdef COVERdefine cover.erlCoverSetup = fun() ->Dirs = ["$(call core_native_path,$(CURDIR)/ebin)"$(foreach a,$(COVER_APPS),$(comma) "$(call core_native_path,$(APPS_DIR)/$a/ebin)")$(foreach d,$(COVER_DEPS),$(comma) "$(call core_native_path,$(DEPS_DIR)/$d/ebin)")],Excludes = [$(call comma_list,$(foreach e,$(COVER_EXCLUDE_MODS),"$e"))],[case file:list_dir(Dir) of{error, enotdir} -> false;{error, _} -> halt(2);{ok, Files} ->BeamFiles = [filename:join(Dir, File) ||File <- Files,not lists:member(filename:basename(File, ".beam"), Excludes),filename:extension(File) =:= ".beam"],case cover:compile_beam(BeamFiles) of{error, _} -> halt(1);_ -> trueendend || Dir <- Dirs]end,CoverExport = fun(Filename) -> cover:export(Filename) end,endefelsedefine cover.erlCoverSetup = fun() -> ok end,CoverExport = fun(_) -> ok end,endefendif# Core targetsifdef COVERifneq ($(COVER_REPORT_DIR),)tests::$(verbose) $(MAKE) --no-print-directory cover-reportendifcover-data-dir: | $(COVER_DATA_DIR)$(COVER_DATA_DIR):$(verbose) mkdir -p $(COVER_DATA_DIR)elsecover-data-dir:endifclean:: coverdata-cleanifneq ($(COVER_REPORT_DIR),)distclean:: cover-report-cleanendifhelp::$(verbose) printf "%s\n" "" \"Cover targets:" \" cover-report Generate a HTML coverage report from previously collected" \" cover data." \" all.coverdata Merge all coverdata files into all.coverdata." \"" \"If COVER=1 is set, coverage data is generated by the targets eunit and ct. The" \"target tests additionally generates a HTML coverage report from the combined" \"coverdata files from each of these testing tools. HTML reports can be disabled" \"by setting COVER_REPORT_DIR to empty."# Plugin specific targetsCOVERDATA = $(filter-out $(COVER_DATA_DIR)/all.coverdata,$(wildcard $(COVER_DATA_DIR)/*.coverdata)).PHONY: coverdata-cleancoverdata-clean:$(gen_verbose) rm -f $(COVER_DATA_DIR)/*.coverdata $(TEST_DIR)/ct.cover.spec# Merge all coverdata files into one.define cover_export.erl$(foreach f,$(COVERDATA),cover:import("$(f)") == ok orelse halt(1),)cover:export("$(COVER_DATA_DIR)/$@"), halt(0).endefall.coverdata: $(COVERDATA) cover-data-dir$(gen_verbose) $(call erlang,$(cover_export.erl))# These are only defined if COVER_REPORT_DIR is non-empty. Set COVER_REPORT_DIR to# empty if you want the coverdata files but not the HTML report.ifneq ($(COVER_REPORT_DIR),).PHONY: cover-report-clean cover-reportcover-report-clean:$(gen_verbose) rm -rf $(COVER_REPORT_DIR)ifneq ($(COVER_REPORT_DIR),$(COVER_DATA_DIR))$(if $(shell ls -A $(COVER_DATA_DIR)/),,$(verbose) rmdir $(COVER_DATA_DIR))endififeq ($(COVERDATA),)cover-report:else# Modules which include eunit.hrl always contain one line without coverage# because eunit defines test/0 which is never called. We compensate for this.EUNIT_HRL_MODS = $(subst $(space),$(comma),$(shell \grep -H -e '^\s*-include.*include/eunit\.hrl"' src/*.erl \| sed "s/^src\/\(.*\)\.erl:.*/'\1'/" | uniq))define cover_report.erl$(foreach f,$(COVERDATA),cover:import("$(f)") == ok orelse halt(1),)Ms = cover:imported_modules(),[cover:analyse_to_file(M, "$(COVER_REPORT_DIR)/" ++ atom_to_list(M)++ ".COVER.html", [html]) || M <- Ms],Report = [begin {ok, R} = cover:analyse(M, module), R end || M <- Ms],EunitHrlMods = [$(EUNIT_HRL_MODS)],Report1 = [{M, {Y, case lists:member(M, EunitHrlMods) oftrue -> N - 1; false -> N end}} || {M, {Y, N}} <- Report],TotalY = lists:sum([Y || {_, {Y, _}} <- Report1]),TotalN = lists:sum([N || {_, {_, N}} <- Report1]),Perc = fun(Y, N) -> case Y + N of 0 -> 100; S -> round(100 * Y / S) end end,TotalPerc = Perc(TotalY, TotalN),{ok, F} = file:open("$(COVER_REPORT_DIR)/index.html", [write]),io:format(F, "<!DOCTYPE html><html>~n""<head><meta charset=\"UTF-8\">~n""<title>Coverage report</title></head>~n""<body>~n", []),io:format(F, "<h1>Coverage</h1>~n<p>Total: ~p%</p>~n", [TotalPerc]),io:format(F, "<table><tr><th>Module</th><th>Coverage</th></tr>~n", []),[io:format(F, "<tr><td><a href=\"~p.COVER.html\">~p</a></td>""<td>~p%</td></tr>~n",[M, M, Perc(Y, N)]) || {M, {Y, N}} <- Report1],How = "$(subst $(space),$(comma)$(space),$(basename $(COVERDATA)))",Date = "$(shell date -u "+%Y-%m-%dT%H:%M:%SZ")",io:format(F, "</table>~n""<p>Generated using ~s and erlang.mk on ~s.</p>~n""</body></html>", [How, Date]),halt().endefcover-report:$(verbose) mkdir -p $(COVER_REPORT_DIR)$(gen_verbose) $(call erlang,$(cover_report.erl))endifendif # ifneq ($(COVER_REPORT_DIR),)# Copyright (c) 2016, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License..PHONY: sfxifdef RELX_RELifdef SFX# Configuration.SFX_ARCHIVE ?= $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/$(RELX_REL_NAME)-$(RELX_REL_VSN).tar.gzSFX_OUTPUT_FILE ?= $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME).run# Core targets.rel:: sfx# Plugin-specific targets.define sfx_stub#!/bin/shTMPDIR=`mktemp -d`ARCHIVE=`awk '/^__ARCHIVE_BELOW__$$/ {print NR + 1; exit 0;}' $$0`FILENAME=$$(basename $$0)REL=$${FILENAME%.*}tail -n+$$ARCHIVE $$0 | tar -xzf - -C $$TMPDIR$$TMPDIR/bin/$$REL consoleRET=$$?rm -rf $$TMPDIRexit $$RET__ARCHIVE_BELOW__endefsfx:$(verbose) $(call core_render,sfx_stub,$(SFX_OUTPUT_FILE))$(gen_verbose) cat $(SFX_ARCHIVE) >> $(SFX_OUTPUT_FILE)$(verbose) chmod +x $(SFX_OUTPUT_FILE)endifendif# Copyright (c) 2013-2017, Loïc Hoguin <essen@ninenines.eu># This file is part of erlang.mk and subject to the terms of the ISC License.# External plugins.DEP_PLUGINS ?=$(foreach p,$(DEP_PLUGINS),\$(eval $(if $(findstring /,$p),\$(call core_dep_plugin,$p,$(firstword $(subst /, ,$p))),\$(call core_dep_plugin,$p/plugins.mk,$p))))help:: help-pluginshelp-plugins::$(verbose) :# Copyright (c) 2013-2015, Loïc Hoguin <essen@ninenines.eu># Copyright (c) 2015-2016, Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com># This file is part of erlang.mk and subject to the terms of the ISC License.# Fetch dependencies recursively (without building them)..PHONY: fetch-deps fetch-doc-deps fetch-rel-deps fetch-test-deps \fetch-shell-deps.PHONY: $(ERLANG_MK_RECURSIVE_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_REL_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST)fetch-deps: $(ERLANG_MK_RECURSIVE_DEPS_LIST)fetch-doc-deps: $(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST)fetch-rel-deps: $(ERLANG_MK_RECURSIVE_REL_DEPS_LIST)fetch-test-deps: $(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST)fetch-shell-deps: $(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST)ifneq ($(SKIP_DEPS),)$(ERLANG_MK_RECURSIVE_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_REL_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST):$(verbose) :> $@else# By default, we fetch "normal" dependencies. They are also included no# matter the type of requested dependencies.## $(ALL_DEPS_DIRS) includes $(BUILD_DEPS).$(ERLANG_MK_RECURSIVE_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS)$(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS) $(ALL_DOC_DEPS_DIRS)$(ERLANG_MK_RECURSIVE_REL_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS) $(ALL_REL_DEPS_DIRS)$(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS) $(ALL_TEST_DEPS_DIRS)$(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST): $(LOCAL_DEPS_DIRS) $(ALL_DEPS_DIRS) $(ALL_SHELL_DEPS_DIRS)# Allow to use fetch-deps and $(DEP_TYPES) to fetch multiple types of# dependencies with a single target.ifneq ($(filter doc,$(DEP_TYPES)),)$(ERLANG_MK_RECURSIVE_DEPS_LIST): $(ALL_DOC_DEPS_DIRS)endififneq ($(filter rel,$(DEP_TYPES)),)$(ERLANG_MK_RECURSIVE_DEPS_LIST): $(ALL_REL_DEPS_DIRS)endififneq ($(filter test,$(DEP_TYPES)),)$(ERLANG_MK_RECURSIVE_DEPS_LIST): $(ALL_TEST_DEPS_DIRS)endififneq ($(filter shell,$(DEP_TYPES)),)$(ERLANG_MK_RECURSIVE_DEPS_LIST): $(ALL_SHELL_DEPS_DIRS)endifERLANG_MK_RECURSIVE_TMP_LIST := $(abspath $(ERLANG_MK_TMP)/recursive-tmp-deps-$(shell echo $$PPID).log)$(ERLANG_MK_RECURSIVE_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_REL_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST) \$(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST): | $(ERLANG_MK_TMP)ifeq ($(IS_APP)$(IS_DEP),)$(verbose) rm -f $(ERLANG_MK_RECURSIVE_TMP_LIST)endif$(verbose) touch $(ERLANG_MK_RECURSIVE_TMP_LIST)$(verbose) set -e; for dep in $^ ; do \if ! grep -qs ^$$dep$$ $(ERLANG_MK_RECURSIVE_TMP_LIST); then \echo $$dep >> $(ERLANG_MK_RECURSIVE_TMP_LIST); \if grep -qs -E "^[[:blank:]]*include[[:blank:]]+(erlang\.mk|.*/erlang\.mk|.*ERLANG_MK_FILENAME.*)$$" \$$dep/GNUmakefile $$dep/makefile $$dep/Makefile; then \$(MAKE) -C $$dep fetch-deps \IS_DEP=1 \ERLANG_MK_RECURSIVE_TMP_LIST=$(ERLANG_MK_RECURSIVE_TMP_LIST); \fi \fi \doneifeq ($(IS_APP)$(IS_DEP),)$(verbose) sort < $(ERLANG_MK_RECURSIVE_TMP_LIST) | \uniq > $(ERLANG_MK_RECURSIVE_TMP_LIST).sorted$(verbose) cmp -s $(ERLANG_MK_RECURSIVE_TMP_LIST).sorted $@ \|| mv $(ERLANG_MK_RECURSIVE_TMP_LIST).sorted $@$(verbose) rm -f $(ERLANG_MK_RECURSIVE_TMP_LIST).sorted$(verbose) rm $(ERLANG_MK_RECURSIVE_TMP_LIST)endifendif # ifneq ($(SKIP_DEPS),)# List dependencies recursively..PHONY: list-deps list-doc-deps list-rel-deps list-test-deps \list-shell-depslist-deps: $(ERLANG_MK_RECURSIVE_DEPS_LIST)list-doc-deps: $(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST)list-rel-deps: $(ERLANG_MK_RECURSIVE_REL_DEPS_LIST)list-test-deps: $(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST)list-shell-deps: $(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST)list-deps list-doc-deps list-rel-deps list-test-deps list-shell-deps:$(verbose) cat $^# Query dependencies recursively..PHONY: query-deps query-doc-deps query-rel-deps query-test-deps \query-shell-depsQUERY ?= name fetch_method repo versiondefine query_target$(1): $(2) clean-tmp-query.logifeq ($(IS_APP)$(IS_DEP),)$(verbose) rm -f $(4)endif$(verbose) $(foreach dep,$(3),\echo $(PROJECT): $(foreach q,$(QUERY),$(call query_$(q),$(dep))) >> $(4) ;)$(if $(filter-out query-deps,$(1)),,\$(verbose) set -e; for dep in $(3) ; do \if grep -qs ^$$$$dep$$$$ $(ERLANG_MK_TMP)/query.log; then \:; \else \echo $$$$dep >> $(ERLANG_MK_TMP)/query.log; \$(MAKE) -C $(DEPS_DIR)/$$$$dep $$@ QUERY="$(QUERY)" IS_DEP=1 || true; \fi \done)ifeq ($(IS_APP)$(IS_DEP),)$(verbose) touch $(4)$(verbose) cat $(4)endifendefclean-tmp-query.log:ifeq ($(IS_DEP),)$(verbose) rm -f $(ERLANG_MK_TMP)/query.logendif$(eval $(call query_target,query-deps,$(ERLANG_MK_RECURSIVE_DEPS_LIST),$(BUILD_DEPS) $(DEPS),$(ERLANG_MK_QUERY_DEPS_FILE)))$(eval $(call query_target,query-doc-deps,$(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST),$(DOC_DEPS),$(ERLANG_MK_QUERY_DOC_DEPS_FILE)))$(eval $(call query_target,query-rel-deps,$(ERLANG_MK_RECURSIVE_REL_DEPS_LIST),$(REL_DEPS),$(ERLANG_MK_QUERY_REL_DEPS_FILE)))$(eval $(call query_target,query-test-deps,$(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST),$(TEST_DEPS),$(ERLANG_MK_QUERY_TEST_DEPS_FILE)))$(eval $(call query_target,query-shell-deps,$(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST),$(SHELL_DEPS),$(ERLANG_MK_QUERY_SHELL_DEPS_FILE)))
-module(hash_sup).-behaviour(supervisor).-export([start_link/0]).-export([init/1]).start_link() ->supervisor:start_link({local, ?MODULE}, ?MODULE, []).init([]) ->Procs = [],{ok, {{one_for_one, 1, 5}, Procs}}.
-module(hash_handler).-behavior(cowboy_rest).-export([init/2]).-export([allowed_methods/2]).-export([content_types_accepted/2]).-export([content_types_provided/2]).-export([resource_exists/2]).-export([from_json/2]).-export([to_json/2]).init(Req, State) ->{cowboy_rest, Req, State}.allowed_methods(Req, State) ->{[<<"POST">>, <<"OPTIONS">>], Req, State}.content_types_accepted(Req, State) ->{[{<<"application/json">>, from_json}],Req, State}.content_types_provided(Req, State) ->% Required everytime the client request contains an% "Accept" header. Even if the method is never GET% and this callback is never called.{[{<<"application/json">>, to_json}], Req, State}.resource_exists(Req, State) ->{false, Req, State}.from_json(Req, State) ->Rounds = cowboy_req:binding(item_id, Req, 12),{ok, Body, Req1} = cowboy_req:read_body(Req),{ok, Salt} = bcrypt:gen_salt(Rounds),{ok, Hash} = bcrypt:hashpw(Body, Salt),Res = thoas:encode(#{<<"digest">> => list_to_binary(Hash)}),Req2 = cowboy_req:set_resp_body(Res, Req1),{true, Req2, State}.to_json(Req, State) ->% Not used but required by content_types_provided/2{true, Req, State}.
-module(hash_app).-behaviour(application).-export([start/2]).-export([stop/1]).start(_Type, _Args) ->Dispatch = cowboy_router:compile([{'_', [{"/api/hashes/[rounds/:rounds]", hash_handler, #{}}]}]),{ok, _} = cowboy:start_clear(http_listener,[{port, 8080}],#{env => #{dispatch => Dispatch}}),hash_sup:start_link().stop(_State) ->ok.
{release, {hash_release, "1"}, [hash, sasl, runtime_tools]}.{dev_mode, false}.{include_erts, true}.{extended_start_script, true}.{sys_config, "config/sys.config"}.{vm_args, "config/vm.args"}.
{application, 'hash', [{description, "New project"},{vsn, "0.1.0"},{modules, ['hash_app','hash_handler','hash_sup']},{registered, [hash_sup]},{applications, [kernel,stdlib,inets,cowboy,bcrypt,thoas,sync]},{optional_applications, []},{mod, {hash_app, []}},{env, []}]}.
-name hash@127.0.0.1-setcookie hash-heart
[].
PROJECT = hashPROJECT_DESCRIPTION = New projectPROJECT_VERSION = 0.1.0# Whitespace to be used when creating files from templates.SP = 2# Make sure we know where the applications are located.ROOT_DIR ?= ../..DEPS_DIR ?= ../../depsDEPS = cowboy bcrypt thoas syncdep_cowboy_commit = 2.10.0dep_thoas = git https://github.com/lpil/thoas v1.0.0DEP_PLUGINS = cowboyLOCAL_DEPS = inetsBUILD_DEPS += relxERLANG_OTP = OTP-26.0.2include $(ROOT_DIR)/erlang.mk
-module(forward_sup).-behaviour(supervisor).-export([start_link/0]).-export([init/1]).start_link() ->supervisor:start_link({local, ?MODULE}, ?MODULE, []).init([]) ->Procs = [],{ok, {{one_for_one, 1, 5}, Procs}}.
-module(forward_handler).-behavior(cowboy_rest).-export([init/2]).-export([allowed_methods/2]).-export([content_types_accepted/2]).-export([content_types_provided/2]).-export([resource_exists/2]).-export([from_json/2]).-export([to_json/2]).init(Req, State) ->{cowboy_rest, Req, State}.allowed_methods(Req, State) ->{[<<"POST">>, <<"OPTIONS">>], Req, State}.content_types_accepted(Req, State) ->{[{<<"application/json">>, from_json}],Req, State}.content_types_provided(Req, State) ->{[{<<"application/json">>, to_json}], Req, State}.resource_exists(Req, State) ->{false, Req, State}.from_json(Req, State) ->{ok, Body, Req1} = cowboy_req:read_body(Req),{ok, Data} = thoas:decode(Body),Result = forward(Data),ResultJSON = thoas:encode(Result),Req2 = cowboy_req:set_resp_body(ResultJSON, Req1),{true, Req2, State}.to_json(Req, State) ->% Not used but required by content_types_provided/2{true, Req, State}.forward(Data) ->forward(Data, []).forward([], Result) ->Result;forward([#{<<"uri">> := URI,<<"payload">> := Payload}|Tail], Result) ->JSONBody = thoas:encode(Payload),case httpc:request(post, {URI, [], "application/json", JSONBody}, [], []) of{ok, {{_, 200, _}, _Headers, Response}} ->{ok, ResponseMap} = thoas:decode(list_to_binary(Response)),forward(Tail, [#{uri => URI, payload => Payload, result => ResponseMap}|Result]);{ok, {_StatusLine, _Headers, _Response}} ->forward(Tail, [#{uri => URI, payload => Payload, result => failed}|Result])end.
-module(forward_app).-behaviour(application).-export([start/2]).-export([stop/1]).start(_Type, _Args) ->Dispatch = cowboy_router:compile([{'_', [{"/api/forwards", forward_handler, #{}}]}]),{ok, _} = cowboy:start_clear(http_listener,[{port, 8080}],#{env => #{dispatch => Dispatch}}),forward_sup:start_link().stop(_State) ->ok.
{release, {forward_release, "1"}, [forward, sasl, runtime_tools]}.{dev_mode, false}.{include_erts, true}.{extended_start_script, true}.{sys_config, "config/sys.config"}.{vm_args, "config/vm.args"}.
{application, 'forward', [{description, "New project"},{vsn, "0.1.0"},{modules, ['forward_app','forward_handler','forward_sup']},{registered, [forward_sup]},{applications, [kernel,stdlib,inets,cowboy,thoas,sync]},{optional_applications, []},{mod, {forward_app, []}},{env, []}]}.
-name forward@127.0.0.1-setcookie forward-heart
[].
PROJECT = forwardPROJECT_DESCRIPTION = New projectPROJECT_VERSION = 0.1.0# Whitespace to be used when creating files from templates.SP = 2# Make sure we know where the applications are located.ROOT_DIR ?= ../..DEPS_DIR ?= ../../depsDEPS = cowboy thoas syncdep_cowboy_commit = 2.10.0dep_thoas = git https://github.com/lpil/thoas v1.0.0DEP_PLUGINS = $(PROJECT) cowboyLOCAL_DEPS = inetsBUILD_DEPS += relxERLANG_OTP = OTP-26.0.2include $(ROOT_DIR)/erlang.mk
PROJECT = survivalPROJECT_DESCRIPTION = New projectPROJECT_VERSION = 0.1.0# Whitespace to be used when creating files from templates.SP = 2include erlang.mk
**/*.d.erlang.mk**/_rel**/deps**/*.beam**/ebin/test**/logs**/relx