mirror of
https://github.com/correl/calrissian.git
synced 2024-12-18 03:00:22 +00:00
Update Makefile using current lfetool (v1.0.0)
This commit is contained in:
parent
e7ac6bdfba
commit
953f22f55a
2 changed files with 25 additions and 11 deletions
2
Makefile
2
Makefile
|
@ -1 +1 @@
|
||||||
include common.mk
|
include resources/make/common.mk
|
||||||
|
|
|
@ -3,19 +3,33 @@ LIB = $(PROJECT)
|
||||||
DEPS = ./deps
|
DEPS = ./deps
|
||||||
BIN_DIR = ./bin
|
BIN_DIR = ./bin
|
||||||
EXPM = $(BIN_DIR)/expm
|
EXPM = $(BIN_DIR)/expm
|
||||||
LFETOOL=$(BIN_DIR)/lfetool
|
|
||||||
SOURCE_DIR = ./src
|
SOURCE_DIR = ./src
|
||||||
OUT_DIR = ./ebin
|
OUT_DIR = ./ebin
|
||||||
TEST_DIR = ./test
|
TEST_DIR = ./test
|
||||||
TEST_OUT_DIR = ./.eunit
|
TEST_OUT_DIR = ./.eunit
|
||||||
SCRIPT_PATH=.:./bin:$(PATH):/usr/local/bin
|
SCRIPT_PATH=$(DEPS)/lfe/bin:.:./bin:"$(PATH)":/usr/local/bin
|
||||||
|
ERL_LIBS=$(shell $(LFETOOL) info erllibs)
|
||||||
|
EMPTY =
|
||||||
|
ifeq ($(shell which lfetool),$EMPTY)
|
||||||
|
LFETOOL=$(BIN_DIR)/lfetool
|
||||||
|
else
|
||||||
|
LFETOOL=lfetool
|
||||||
|
endif
|
||||||
|
OS := $(shell uname -s)
|
||||||
|
ifeq ($(OS),Linux)
|
||||||
|
HOST=$(HOSTNAME)
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Darwin)
|
||||||
|
HOST = $(shell scutil --get ComputerName)
|
||||||
|
endif
|
||||||
|
|
||||||
$(BIN_DIR):
|
$(BIN_DIR):
|
||||||
mkdir -p $(BIN_DIR)
|
mkdir -p $(BIN_DIR)
|
||||||
|
|
||||||
$(LFETOOL): $(BIN_DIR)
|
$(LFETOOL): $(BIN_DIR)
|
||||||
@[ -f $(LFETOOL) ] || \
|
@[ -f $(LFETOOL) ] || \
|
||||||
curl -o ./lfetool https://raw.github.com/lfe/lfetool/master/lfetool && \
|
curl -L -o ./lfetool https://raw.github.com/lfe/lfetool/master/lfetool && \
|
||||||
chmod 755 ./lfetool && \
|
chmod 755 ./lfetool && \
|
||||||
mv ./lfetool $(BIN_DIR)
|
mv ./lfetool $(BIN_DIR)
|
||||||
|
|
||||||
|
@ -28,7 +42,7 @@ $(EXPM): $(BIN_DIR)
|
||||||
|
|
||||||
get-deps:
|
get-deps:
|
||||||
@echo "Getting dependencies ..."
|
@echo "Getting dependencies ..."
|
||||||
@rebar get-deps
|
@which rebar.cmd >/dev/null 2>&1 && rebar.cmd get-deps || rebar get-deps
|
||||||
@PATH=$(SCRIPT_PATH) lfetool update deps
|
@PATH=$(SCRIPT_PATH) lfetool update deps
|
||||||
|
|
||||||
clean-ebin:
|
clean-ebin:
|
||||||
|
@ -40,27 +54,27 @@ clean-eunit:
|
||||||
|
|
||||||
compile: get-deps clean-ebin
|
compile: get-deps clean-ebin
|
||||||
@echo "Compiling project code and dependencies ..."
|
@echo "Compiling project code and dependencies ..."
|
||||||
@rebar compile
|
@which rebar.cmd >/dev/null 2>&1 && rebar.cmd compile || rebar compile
|
||||||
|
|
||||||
compile-no-deps: clean-ebin
|
compile-no-deps: clean-ebin
|
||||||
@echo "Compiling only project code ..."
|
@echo "Compiling only project code ..."
|
||||||
@rebar compile skip_deps=true
|
@which rebar.cmd >/dev/null 2>&1 && rebar.cmd compile skip_deps=true || rebar compile skip_deps=true
|
||||||
|
|
||||||
compile-tests:
|
compile-tests:
|
||||||
@PATH=$(SCRIPT_PATH) lfetool tests build
|
@PATH=$(SCRIPT_PATH) lfetool tests build
|
||||||
|
|
||||||
shell: compile
|
shell: compile
|
||||||
@clear
|
@which clear >/dev/null 2>&1 && clear || printf "\033c"
|
||||||
@echo "Starting shell ..."
|
@echo "Starting shell ..."
|
||||||
@PATH=$(SCRIPT_PATH) lfetool repl lfe
|
@PATH=$(SCRIPT_PATH) lfetool repl
|
||||||
|
|
||||||
shell-no-deps: compile-no-deps
|
shell-no-deps: compile-no-deps
|
||||||
@clear
|
@which clear >/dev/null 2>&1 && clear || printf "\033c"
|
||||||
@echo "Starting shell ..."
|
@echo "Starting shell ..."
|
||||||
@PATH=$(SCRIPT_PATH) lfetool repl
|
@PATH=$(SCRIPT_PATH) lfetool repl
|
||||||
|
|
||||||
clean: clean-ebin clean-eunit
|
clean: clean-ebin clean-eunit
|
||||||
@rebar clean
|
@which rebar.cmd >/dev/null 2>&1 && rebar.cmd clean || rebar clean
|
||||||
|
|
||||||
check-unit-only:
|
check-unit-only:
|
||||||
@PATH=$(SCRIPT_PATH) lfetool tests unit
|
@PATH=$(SCRIPT_PATH) lfetool tests unit
|
Loading…
Reference in a new issue