Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 57 lines (41 sloc) 1.171 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
# Variables definitions:

# variable definition ecursively expanded when the variable is used,
# not when it's declared
REBAR =$(shell which rebar || echo ./rebar)

DIALYZER = dialyzer
DIALYZER_WARNINGS = -Wunmatched_returns -Werror_handling \
                    -Wrace_conditions -Wunderspecs

# conditional variable definition, assign only if not yet assigned.
ERL = erl -I include -noshell -pa ebin

# variable definition expanded when it's declared
APP := elixir

# Makefile targets format:
#
# target: dependencies
# [tab] system command

.PHONY: deps

# Compile erlang source and then
# compile elixir as a post-hook
compile: deps
@$(REBAR) compile

deps:
@$(REBAR) get-deps

clean:
@$(REBAR) clean

distclean:
@$(REBAR) delete-deps

doc:
@$(REBAR) doc skip_deps=true

test: test_erlang test_elixir

test_erlang: deps compile
@ $(REBAR) skip_deps=true eunit

test_elixir: deps compile
@ echo "==> elixir (exunit)"
@ time bin/elixir -r "test/elixir/**/*_test.exs"

release: compile test
dialyzer --src src $(DIALYZER_WARNINGS)

exbin: lib/*.ex lib/*/*.ex
@ rm -rf exbin
@ mkdir -p exbin
@ touch exbin
$(ERL) -s elixir_compiler core -s erlang halt
Something went wrong with that request. Please try again.