diff options
author | Tristan Sloughter <[email protected]> | 2013-09-29 09:17:38 -0700 |
---|---|---|
committer | Tristan Sloughter <[email protected]> | 2013-09-29 09:17:38 -0700 |
commit | 0ebd6efef57735a5915171cad2dd39c9c409772f (patch) | |
tree | 8c219d7624bf3c899bdf889fc78aa3cf8b6bf53c | |
parent | c2bbc32be1cefafca6fd12867293070a9790fd76 (diff) | |
parent | 81b0d55be6ee3f57b36a013db2336f1fd29a5aee (diff) | |
download | relx-0ebd6efef57735a5915171cad2dd39c9c409772f.tar.gz relx-0ebd6efef57735a5915171cad2dd39c9c409772f.tar.bz2 relx-0ebd6efef57735a5915171cad2dd39c9c409772f.zip |
Merge pull request #58 from jwilberding/make
Add autodownloading of rebar to makefile when it does not exist on syste...
-rw-r--r-- | Makefile | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -32,7 +32,7 @@ endif REBAR=$(shell which rebar) ifeq ($(REBAR),) -$(error "Rebar not available on this system") +REBAR=$(CURDIR)/rebar endif # ============================================================================= @@ -62,15 +62,22 @@ all: deps compile escript # Rules to build the system # ============================================================================= -deps: +REBAR_URL=https://github.com/rebar/rebar/wiki/rebar +$(REBAR): + curl -Lo rebar $(REBAR_URL) || wget $(REBAR_URL) + chmod a+x rebar + +get-rebar: $(REBAR) + +deps: $(REBAR) $(REBAR) get-deps $(REBAR) compile -update-deps: +update-deps: $(REBAR) $(REBAR) update-deps $(REBAR) compile -compile: +compile: $(REBAR) $(REBAR) skip_deps=true compile escript: deps @@ -122,7 +129,7 @@ clean-common-test-data: # data. Without this rebar eunit gets very confused - rm -rf $(CURDIR)/test/*_SUITE_data -clean: clean-common-test-data +clean: clean-common-test-data $(REBAR) - rm -rf $(CURDIR)/test/*.beam - rm -rf $(CURDIR)/logs - rm -rf $(CURDIR)/ebin |