diff --git a/.gitignore b/.gitignore index 2a53be2..b4d377e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -*.beam +ebin/* diff --git a/Makefile b/Makefile index 2380676..c781ffa 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ -include vsn.mk +IBROWSE_VSN = $(shell sed -n 's/.*{vsn,.*"\(.*\)"}.*/\1/p' src/ibrowse.app.src) all: - (cd src ; make) + ./rebar compile clean: - (cd src ; make clean) + ./rebar clean install: all mkdir -p $(DESTDIR)/lib/ibrowse-$(IBROWSE_VSN)/ diff --git a/ebin/ibrowse.app b/ebin/ibrowse.app deleted file mode 100644 index c8e4227..0000000 --- a/ebin/ibrowse.app +++ /dev/null @@ -1,13 +0,0 @@ -{application, ibrowse, - [{description, "HTTP client application"}, - {vsn, "2.1.2"}, - {modules, [ ibrowse, - ibrowse_http_client, - ibrowse_app, - ibrowse_sup, - ibrowse_lib, - ibrowse_lb ]}, - {registered, []}, - {applications, [kernel,stdlib,sasl]}, - {env, []}, - {mod, {ibrowse_app, []}}]}. diff --git a/rebar b/rebar new file mode 100755 index 0000000..b9c73ff Binary files /dev/null and b/rebar differ diff --git a/rebar.config b/rebar.config new file mode 100644 index 0000000..934a81f --- /dev/null +++ b/rebar.config @@ -0,0 +1 @@ +{erl_opts, [warn_unused_vars, nowarn_shadow_vars, warn_unused_import]}. diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 145c0a2..0000000 --- a/src/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -include ../vsn.mk - -ERL_FILES = ibrowse.erl \ - ibrowse_http_client.erl \ - ibrowse_app.erl \ - ibrowse_sup.erl \ - ibrowse_lib.erl \ - ibrowse_lb.erl \ - ibrowse_test.erl - - -INCLUDE_DIRS = -I./ - -ERLC ?= erlc -ERLC_EMULATOR ?= erl -boot start_clean -COMPILER_OPTIONS = -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import - -.SUFFIXES: .erl .beam $(SUFFIXES) -EBIN = ../ebin - -all: $(ERL_FILES:%.erl=$(EBIN)/%.beam) ../ebin/ibrowse.app - -$(EBIN)/%.beam: %.erl - ${ERLC} $(COMPILER_OPTIONS) $(INCLUDE_DIRS) -o ../ebin $< - -$(EBIN)/%.app: %.app.src ../vsn.mk Makefile - sed -e s/%IBROWSE_VSN%/$(IBROWSE_VSN)/ \ - $< > $@ - -clean: - rm -f $(EBIN)/*.beam $(EBIN)/*.app - diff --git a/src/ibrowse.app.src b/src/ibrowse.app.src index 2638eed..c8e4227 100644 --- a/src/ibrowse.app.src +++ b/src/ibrowse.app.src @@ -1,6 +1,6 @@ {application, ibrowse, [{description, "HTTP client application"}, - {vsn, "%IBROWSE_VSN%"}, + {vsn, "2.1.2"}, {modules, [ ibrowse, ibrowse_http_client, ibrowse_app, diff --git a/vsn.mk b/vsn.mk deleted file mode 100644 index ac4bf7a..0000000 --- a/vsn.mk +++ /dev/null @@ -1,2 +0,0 @@ -IBROWSE_VSN = 2.1.2 -