Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use rebar as build tool

* Add rebar
* Move build flags from src/Makefile to rebar.config
* Remove src/Makefile
* Put version in src/ibrowse.app.src
* Remove vsn.mk
* Remove ebin/ibrowse.app
* Change Makefile to read version from src/ibrowse.app.src
* Change Makefile all target to call ./rebar compile
* Change Makefile clean target to call ./rebar clean
* Update .gitignore to ignore ebin/*
  • Loading branch information...
commit 8c12491c68e719b59d82e7837dbd382360ade9eb 1 parent 5b13e5b
@andrewtj andrewtj authored
View
2  .gitignore
@@ -1,2 +1,2 @@
-*.beam
+ebin/*
View
6 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)/
View
13 ebin/ibrowse.app
@@ -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, []}}]}.
View
BIN  rebar
Binary file not shown
View
1  rebar.config
@@ -0,0 +1 @@
+{erl_opts, [warn_unused_vars, nowarn_shadow_vars, warn_unused_import]}.
View
32 src/Makefile
@@ -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
-
View
2  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,
View
2  vsn.mk
@@ -1,2 +0,0 @@
-IBROWSE_VSN = 2.1.2
-
Please sign in to comment.
Something went wrong with that request. Please try again.