Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use rebar to build and test mochiweb

  • Loading branch information...
commit 8f380bc8c4a5cdbd1185fe79910d22df09215dc5 1 parent 7c2bc22
David Reid authored
View
1  .gitignore
@@ -1,3 +1,4 @@
/ebin
/doc
/_test
+.eunit
View
23 Makefile
@@ -1,20 +1,19 @@
-all: ebin/
- (cd src;$(MAKE) all)
+REBAR=./rebar
+
+all:
+ @$(REBAR) compile
edoc:
- (cd src;$(MAKE) edoc)
+ @$(REBAR) doc
-test: ebin/
- (cd src;$(MAKE) test)
+test:
+ @$(REBAR) eunit
clean:
- rm -rf ebin
+ @$(REBAR) clean
-clean_plt:
- (cd src;$(MAKE) clean_plt)
+build_plt:
+ @$(REBAR) build_plt
dialyzer:
- (cd src;$(MAKE) dialyzer)
-
-ebin/:
- @mkdir -p ebin
+ @$(REBAR) analyze
View
BIN  rebar
Binary file not shown
View
4 rebar.config
@@ -0,0 +1,4 @@
+% -*- mode: erlang -*-
+{erl_opts, [debug_info]}.
+{cover_enabled, true}.
+{eunit_opts, [verbose, {report,{eunit_surefire,[{dir,"."}]}}]}.
View
33 src/Makefile
@@ -1,33 +0,0 @@
-include ../support/include.mk
-
-APPLICATION=mochiweb
-DOC_OPTS={dir,\"../doc\"}
-TEST_PLT=$(TEST_DIR)/dialyzer_plt
-
-all: $(EBIN_FILES)
-
-debug:
- $(MAKE) DEBUG=-DDEBUG
-
-clean:
- rm -rf $(EBIN_FILES)
-
-edoc:
- $(ERL) -noshell -pa ../ebin \
- -eval "edoc:application($(APPLICATION), \".\", [$(DOC_OPTS)])" \
- -s init stop
-
-test: $(EBIN_FILES)
- mkdir -p $(TEST_DIR);
- @../support/run_tests.escript $(EBIN_DIR) | tee $(TEST_DIR)/test.log
-
-$(TEST_PLT):
- mkdir -p $(TEST_DIR)
- cp $(DIALYZER_PLT) $(TEST_PLT)
- dialyzer --plt $(TEST_PLT) --add_to_plt
-
-clean_plt:
- rm $(TEST_PLT)
-
-dialyzer: $(TEST_PLT)
- dialyzer --src --plt $(TEST_PLT) -DNOTEST -DDIALYZER -c ../src | tee $(TEST_DIR)/dialyzer.log
Please sign in to comment.
Something went wrong with that request. Please try again.