Permalink
Browse files

changed build system to rebar http://hg.basho.com/rebar/wiki/Home

  • Loading branch information...
1 parent 50b1b01 commit 49a806853c2ef2273b8f6257b3a9040cb3097c19 @mrinalwadhwa committed Mar 15, 2010
View
@@ -1 +0,0 @@
-{'./src/*', [{i,"./include" },{outdir,"./ebin"}]}.
View
@@ -1,6 +1,6 @@
The MIT License
-Copyright (c) 2009 Mrinal Wadhwa http://www.mrinalwadhwa.com
+Copyright (c) 2010 Mrinal Wadhwa http://www.mrinalwadhwa.com
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
View
@@ -1,32 +0,0 @@
-SRC_ERLS = `find src -name '*.erl'`
-TEST_ERLS = `find test -name '*.erl'`
-APPS = `find src -name '*.app'`
-COPY_APPS = for APP in $(APPS); do cp $$APP ebin; done
-
-all:
- @ $(COPY_APPS)
- @ erl -make
-
-debug:
- @ make tmp
- @ cd tmp; erlc +debug_info *.erl; cp amf0.beam amf3.beam ../ebin
-
-tests:
- @ make clean debug
- @ cd tmp; erl -noshell -eval "eunit:test([amf0,amf3],[verbose])" -s init stop
-
-cover:
- @ make clean debug
- @ cd tmp; erl -noshell -eval "test_coverage:analyze([amf0, amf3])" -s init stop
-
-dialyzer:
- @ make clean debug
- @ cd tmp; dialyzer --build_plt -r "."
-
-clean:
- @ rm -rf tmp ebin/*
-
-tmp:
- @ mkdir tmp;
- @ cp $(SRC_ERLS) tmp/
- @ cp $(TEST_ERLS) tmp/
View
@@ -22,21 +22,10 @@ eAMF currently supports AMF3 ([Specification][amf3l]) and provides two main feat
##How to build?
-eAMF uses [GNU Make](http://www.gnu.org/software/make/) for building binaries from source.
+eAMF uses [rebar](http://hg.basho.com/rebar/wiki/Home) for building binaries from source.
-<code>$ make</code>
-
-1. Builds the source
-2. Executes eunit unit tests
-3. Creates documentation using edoc
-
-
-<code>$ make debug</code>
-
-1. Builds the source in debug mode
-2. Executes eunit unit tests
-3. Runs code coverage analysis using the cover module
-4. Analyzes the code using dialyzer
+Builds the source: <code>$ ./rebar compile</code>
+Run EUnit tests and Code Coverage analysis: <code>$ ./rebar eunit</code>
##Types
@@ -2,7 +2,7 @@
[
{description, "A Library for serializing and de-serializing Action Message Format (AMF)"},
{vsn, "0.0.1"},
- {modules, [amf0, amf3]},
+ {modules, [amf0, amf3, amf0_tests, amf3_tests]},
{registered, []},
{env, []},
{applications, [kernel, stdlib]}
View
BIN rebar
Binary file not shown.
View
@@ -0,0 +1,2 @@
+{erl_opts, [debug_info, fail_on_warning]}.
+{cover_enabled, true}.
File renamed without changes.
File renamed without changes.
View
@@ -1,21 +0,0 @@
--module(test_coverage).
--export([analyze/1]).
-
-analyze(Modules) when is_list(Modules) -> lists:foreach(fun analyze/1, Modules);
-analyze(Module) ->
- cover:start(),
- cover:compile_module(Module),
- eunit:test(Module),
- {ok,{_,{Covered,UnCovered}}} = cover:analyse(Module,coverage,module),
- {ok,File} = cover:analyse_to_file(Module),
- Total = Covered + UnCovered,
- Coverage = Covered/Total * 100,
- io:fwrite("~n~nCoverage Analysis: ~n"),
- io:fwrite("========================== ~n~n"),
- io:fwrite("Module: ~w~n",[Module]),
- io:fwrite("Executable Lines: ~w~n",[Total]),
- io:fwrite("Covered Lines: ~w~n",[Covered]),
- io:fwrite("UnCovered Lines: ~w~n",[UnCovered]),
- io:fwrite("Coverage: ~f %~n",[Coverage]),
- io:fwrite("~nFor more details see file: tmp/~s~n~n",[File]).
-

0 comments on commit 49a8068

Please sign in to comment.