forked from erlangpack/erlang-oauth
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move test code to separate directory; rework Makefile.
- Loading branch information
Tim Fletcher
committed
Nov 6, 2008
1 parent
0ac0d56
commit 2a514aa
Showing
3 changed files
with
20 additions
and
17 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,31 +1,35 @@ | ||
EFLAGS=-pa ebin -pa ../erlang-fmt/ebin -pa ../eunit/ebin -I../ -Iinclude | ||
SOURCE_FILES := $(wildcard src/*.erl) | ||
|
||
ERL := erl $(EFLAGS) | ||
ERLC := erlc -W +debug_info -o ebin | ||
|
||
ERL_SOURCES := $(wildcard src/*.erl) | ||
ERL := erl -pa ebin -pa ../erlang-fmt/ebin -s crypto | ||
|
||
ERL_OBJECTS := $(ERL_SOURCES:src/%.erl=ebin/%.beam) | ||
|
||
all: beam_files | ||
|
||
all: objects | ||
|
||
objects: $(ERL_OBJECTS) | ||
beam_files: $(SOURCE_FILES:src/%.erl=ebin/%.beam) | ||
|
||
ebin/%.beam: src/%.erl | ||
@test -d ebin || mkdir ebin | ||
erlc $(EFLAGS) -W +debug_info -o ebin $< | ||
$(ERLC) $< | ||
|
||
ebin/oauth_unit.beam: | ||
$(ERLC) -pa ../eunit/ebin -I../ -Iinclude test/oauth_unit.erl | ||
|
||
ebin/oauth_termie.beam: | ||
$(ERLC) test/oauth_termie.erl | ||
|
||
clean: | ||
rm -rf ebin/*.beam erl_crash.dump | ||
|
||
test: objects | ||
$(ERL) -noshell -s crypto -s oauth_unit test -s init stop | ||
test: beam_files ebin/oauth_unit.beam | ||
@$(ERL) -noshell -s oauth_unit test -s init stop | ||
|
||
termie: objects | ||
$(ERL) -noshell -s crypto -s inets -s oauth_termie test -s init stop | ||
termie: beam_files ebin/oauth_termie.beam | ||
@$(ERL) -noshell -s inets -s oauth_termie test -s init stop | ||
|
||
shell: objects | ||
@$(ERL) -s crypto -s inets | ||
shell: beam_files | ||
@$(ERL) -s inets | ||
|
||
dialyzer: | ||
dialyzer $(EFLAGS) --src -c src/ | ||
dialyzer --no_check_plt --src -c src/ |
File renamed without changes.
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