Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build Erlang if it is not present on the host
- Loading branch information
Yurii Rashkovskii
committed
Feb 13, 2012
1 parent
519268e
commit 0ad4fc6
Showing
3 changed files
with
755 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.kerl | ||
erlang | ||
deps | ||
log | ||
apps/htoad/ebin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
HERE=$(shell pwd) | ||
KERL_CONFIG_OPTS="" | ||
|
||
ifeq ($(shell which erl),) | ||
ERL=erlang/bin/erl | ||
REBAR=". $(HERE)/erlang/activate && ./rebar" | ||
else | ||
ERL=$(shell which erl) | ||
REBAR="./rebar" | ||
endif | ||
|
||
all: release | ||
|
||
release: compile | ||
release: $(ERL) compile | ||
@rm -rf rel/htoad | ||
@./rebar generate | ||
@$(REBAR) generate | ||
|
||
compile: $(ERL) deps | ||
@$(REBAR) compile | ||
|
||
deps: $(ERL) | ||
@$(REBAR) get-deps | ||
|
||
compile: deps | ||
@./rebar compile | ||
$(ERL): | ||
@KERL_CONFIGURE_OPTIONS=$(KERL_CONFIG_OPTS) KERL_INSTALL_AGNERIZED_REBAR=n HOME=$(HERE) ./kerl build R15B r15b | ||
@KERL_CONFIGURE_OPTIONS=$(KERL_CONFIG_OPTS) KERL_INSTALL_AGNERIZED_REBAR=n HOME=$(HERE) ./kerl install r15b erlang | ||
|
||
deps: | ||
@./rebar get-deps |
Oops, something went wrong.