From 57bcd4e211476bbf85fcb3836a03552c1ae98bed Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Fri, 11 Sep 2015 19:26:37 -0400 Subject: [PATCH] Update rebar.config for rebar3 --- Makefile | 3 - rebar.config | 41 ++++++++++---- resources/make/common.mk | 116 --------------------------------------- src/calrissian.app.src | 11 +--- 4 files changed, 32 insertions(+), 139 deletions(-) delete mode 100644 Makefile delete mode 100644 resources/make/common.mk diff --git a/Makefile b/Makefile deleted file mode 100644 index 0e89e1c..0000000 --- a/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -PROJECT = calrissian - -include resources/make/common.mk diff --git a/rebar.config b/rebar.config index 2aa306a..0437c24 100644 --- a/rebar.config +++ b/rebar.config @@ -1,12 +1,33 @@ -{erl_opts, [debug_info, {src_dirs, ["test"]}]}. -{lfe_first_files, []}. -{deps_dir, ["deps"]}. -{eunit_compile_opts, [ - {src_dirs, ["test"]} - ]}. +%% -*- mode: erlang -*- + +{erl_opts, [debug_info]}. + {deps, [ - {lfe, ".*", {git, "git://github.com/rvirding/lfe.git", "develop"}}, - {lutil, ".*", {git, "https://github.com/lfex/lutil.git", "master"}}, - {ltest, ".*", {git, "git://github.com/lfex/ltest.git", "master"}}, - {lcfg, ".*", {git, "git://github.com/lfex/lcfg.git", "master"}} + {lfe, {git, "git://github.com/rvirding/lfe", {tag, "1.0"}}} + ]}. + +{plugins, [ + {'lfe-compile', {git, "https://github.com/lfe-rebar3/compile.git", {tag, "0.4.0"}}} + ]}. + +{provider_hooks, [ + {pre, [{compile, {lfe, compile}}]} + ]}. + +{profiles, [ + {dev, [ + {plugins, [ + {'lfe-version', ".*", {git, "https://github.com/lfe-rebar3/version.git", {tag, "0.4.0"}}}, + {'lfe-repl', ".*", {git, "https://github.com/lfe-rebar3/repl.git", {tag, "0.2.1"}}}, + {'lfe-clean', ".*", {git, "https://github.com/lfe-rebar3/clean.git", {tag, "0.2.1"}}} + ]} + ]}, + + {test, [ + {eunit_compile_opts, [ + {src_dirs, ["test", "src"]} + ]}, + {deps, [ + {ltest, ".*", {git, "git://github.com/lfex/ltest.git", {tag, "0.8.0"}}}]} + ]} ]}. diff --git a/resources/make/common.mk b/resources/make/common.mk deleted file mode 100644 index dbbd1e2..0000000 --- a/resources/make/common.mk +++ /dev/null @@ -1,116 +0,0 @@ -ifeq ($(shell which erl),) -$(error Can't find Erlang executable 'erl') -exit 1 -endif - -LIB = $(PROJECT) -DEPS = ./deps -BIN_DIR = ./bin -SOURCE_DIR = ./src -OUT_DIR = ./ebin -TEST_DIR = ./test -TEST_OUT_DIR = ./.eunit -SCRIPT_PATH=$(DEPS)/lfe/bin:.:./bin:"$(PATH)":/usr/local/bin -ifeq ($(shell which lfetool),) -LFETOOL=$(BIN_DIR)/lfetool -else -LFETOOL=lfetool -endif -ERL_LIBS=.:..:$(shell pwd):$(shell $(LFETOOL) info erllibs) -OS := $(shell uname -s) -ifeq ($(OS),Linux) - HOST=$(HOSTNAME) -endif -ifeq ($(OS),Darwin) - HOST = $(shell scutil --get ComputerName) -endif - -$(BIN_DIR): - mkdir -p $(BIN_DIR) - -$(BIN_DIR)/lfetool: $(BIN_DIR) - @make get-lfetool - -get-lfetool: $(BIN_DIR) - curl -L -o ./lfetool https://raw.github.com/lfe/lfetool/dev-v1/lfetool && \ - chmod 755 ./lfetool && \ - mv ./lfetool $(BIN_DIR) - -get-version: - @PATH=$(SCRIPT_PATH) $(LFETOOL) info version - @echo "Erlang/OTP, LFE, & library versions:" - @ERL_LIBS=$(ERL_LIBS) PATH=$(SCRIPT_PATH) erl \ - -eval "lfe_io:format(\"~p~n\",['$(PROJECT)-util':'get-versions'()])." \ - -noshell -s erlang halt - -get-deps: - @echo "Getting dependencies ..." - @PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) $(LFETOOL) download deps - -clean-ebin: - @echo "Cleaning ebin dir ..." - @rm -f $(OUT_DIR)/*.beam - -clean-eunit: - -@PATH=$(SCRIPT_PATH) $(LFETOOL) tests clean - -compile: get-deps clean-ebin - @echo "Compiling project code and dependencies ..." - @which rebar.cmd >/dev/null 2>&1 && \ - PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) rebar.cmd compile || \ - PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) rebar compile - -compile-no-deps: clean-ebin - @echo "Compiling only project code ..." - @which rebar.cmd >/dev/null 2>&1 && \ - PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) \ - rebar.cmd compile skip_deps=true || \ - PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) rebar compile skip_deps=true - -compile-tests: clean-eunit - @PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) $(LFETOOL) tests build - -repl: compile - @which clear >/dev/null 2>&1 && clear || printf "\033c" - @echo "Starting an LFE REPL ..." - @PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) $(LFETOOL) repl lfe +pc unicode - -repl-no-deps: compile-no-deps - @which clear >/dev/null 2>&1 && clear || printf "\033c" - @echo "Starting an LFE REPL ..." - @PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) $(LFETOOL) repl lfe +pc unicode - -shell: compile - @which clear >/dev/null 2>&1 && clear || printf "\033c" - @echo "Starting an Erlang shell ..." - @PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) erl + pc unicode - -shell-no-deps: compile-no-deps - @which clear >/dev/null 2>&1 && clear || printf "\033c" - @echo "Starting an Erlang shell ..." - @PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) erl + pc unicode - -clean: clean-ebin clean-eunit - @which rebar.cmd >/dev/null 2>&1 && rebar.cmd clean || rebar clean - -check-unit-only: - @PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) $(LFETOOL) tests unit - -check-integration-only: - @PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) $(LFETOOL) tests integration - -check-system-only: - @PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) $(LFETOOL) tests system - -check-unit-with-deps: get-deps compile compile-tests check-unit-only -check-unit: clean-eunit compile-no-deps check-unit-only -check-integration: clean-eunit compile check-integration-only -check-system: clean-eunit compile check-system-only -check-all-with-deps: clean-eunit compile check-unit-only \ - check-integration-only check-system-only clean-eunit -check-all: get-deps clean-eunit compile-no-deps - @PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) $(LFETOOL) tests all - -check: check-unit-with-deps - -check-travis: $(BIN_DIR)/lfetool check diff --git a/src/calrissian.app.src b/src/calrissian.app.src index 0248928..31ca4de 100644 --- a/src/calrissian.app.src +++ b/src/calrissian.app.src @@ -8,16 +8,7 @@ {vsn, "0.1.0"}, %% All modules used by the application. - {modules, - [ - 'calrissian-monad', - 'calrissian-state', - 'calrissian-identity-monad', - 'calrissian-maybe-monad', - 'calrissian-error-monad', - 'calrissian-state-transformer', - 'calrissian-util' - ]}, + {modules, []}, %% All of the registered names the application uses. This can be ignored. {registered, []},