Permalink
Browse files

Rebarify

Split off from jungerl and use rebar to compile. Requires some naming
changes for the files.

Remove CVS turds. Split off the rpc modules since, reading through the
rebar source, I didn't see a way of compiling only some of the .erl
files, like with the port_specs setting. Comment out compiling the rpc
files for now.
  • Loading branch information...
1 parent 5563e0b commit 596877aa703f9ee4652874640e8a2844a915cdf5 @msantos committed Sep 3, 2012
View
@@ -0,0 +1,13 @@
+*.[oa]
+*.beam
+*.swp
+ebin
+.eunit/
+deps/
+rpc/pmap.hrl
+rpc/pmap_clnt.erl
+rpc/pmap_xdr.erl
+rpc/rpc.hrl
+rpc/rpc_clnt.erl
+rpc/rpc_xdr.erl
+src/xdr_parse.erl
View
@@ -1 +1,15 @@
-include ../../support/subdir.mk
+REBAR=$(shell which rebar || echo ./rebar)
+
+all: compile
+
+./rebar:
+ erl -noshell -s inets start -s ssl start \
+ -eval 'httpc:request(get, {"https://github.com/downloads/basho/rebar/rebar", []}, [], [{stream, "./rebar"}])' \
+ -s inets stop -s init stop
+ chmod +x ./rebar
+
+compile: $(REBAR)
+ @$(REBAR) compile
+
+clean: $(REBAR)
+ @$(REBAR) clean
View
No changes.
View
No changes.
View
@@ -0,0 +1,15 @@
+%% Uncomment these to enable compiling the rpc modules
+%{post_hooks, [
+% {compile, "erl -noshell -pa ../ebin -eval 'file:set_cwd(\"rpc\")' -eval 'erpcgen:file(pmap, [xdrlib,clnt])' -s init stop"},
+% {compile, "erl -noshell -pa ../ebin -eval 'file:set_cwd(\"rpc\")' -eval 'erpcgen:file(rpc, [xdrlib,clnt])' -s init stop"},
+% {compile, "erlc -o ebin rpc/*.erl"}
+% ]
+%}.
+%{clean_files, [
+% "rpc/pmap.hrl",
+% "rpc/pmap_clnt.erl",
+% "rpc/pmap_xdr.erl",
+% "rpc/rpc.hrl",
+% "rpc/rpc_clnt.erl",
+% "rpc/rpc_xdr.erl"
+%]}.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -1,6 +0,0 @@
-pmap.hrl
-pmap_clnt.erl
-pmap_xdr.erl
-rpc.hrl
-rpc_xdr.erl
-xdr_parse.erl
View
@@ -1,61 +0,0 @@
-# Copyright (c) 2000, 2001 Sendmail, Inc. All rights reserved.
-# This Makefile may require GNU make.
-
-include ../../../support/include.mk
-include ../vsn.mk
-
-ERLC_FLAGS += -I ../..
-
-ESRC=.
-ERPCGEN = ../priv/erpcgen
-ERPCGEN_OPTS =
-
-ERPCGEN_MODULES = erpcgen xdr_parse xdrgen xdr_scan
-
-RPC_MODULES = rpc_client rpc_xdr rpc_server \
- pmap pmap_clnt pmap_xdr \
- xdr_auth
-
-MODULES = $(RPC_MODULES) $(ERPCGEN_MODULES)
-
-ERPCGEN_TARGET_FILES= $(ERPCGEN_MODULES:%=../ebin/%.$(EMULATOR))
-RPC_TARGET_FILES= $(RPC_MODULES:%=../ebin/%.$(EMULATOR))
-TARGET_FILES= $(MODULES:%=../ebin/%.$(EMULATOR)) $(ERPCGEN)
-
-%_xdr.erl %.hrl: %.x $(ERPCGEN)
- $(ERPCGEN) -a '[xdrlib]' $*
-
-%_clnt.erl: %.x $(ERPCGEN)
- $(ERPCGEN) -a '[clnt]' $*
-
-# $(EBIN)/%.$(EMULATOR): $(ESRC)/%.erl
-# $(ERLC) $(ERLC_FLAGS) -o$(EBIN) $<
-
-all: $(TARGET_FILES)
-
-$(ERPCGEN): erpcgen.src $(ERPCGEN_TARGET_FILES)
- sed -e 's;%ERL%;$(ERL);' \
- erpcgen.src > $(ERPCGEN)
- chmod u+x $(ERPCGEN)
-
-xdr_parse.erl: xdr.yrl
- $(ERLC) -o xdr_parse.erl xdr.yrl
-
-clean:
- -rm -f $(TARGET_FILES)
- -rm -f core erl_crash.dump
- -rm -f pmap_clnt.erl pmap_xdr.erl pmap.hrl
- -rm -f rpc_xdr.erl rpc.hrl
- -rm -f erpcgen.boot erpcgen.script xdr_parse.erl
- -rm -f ../ebin/erpcgen.app ../ebin/rpc.app erpcgen.rel
-
-
-../ebin/pmap.beam: pmap.hrl
-../ebin/pmap_clnt.beam: pmap.hrl
-../ebin/pmap_svc.beam: pmap.hrl
-../ebin/rpc_client.beam: rpc.hrl
-../ebin/rpc_server.beam: rpc.hrl
-rpc_xdr.erl: rpc.x
-pmap_xdr.erl: pmap.x
-pmap_clnt.erl: pmap.x
-
View
@@ -1,10 +1,8 @@
{application, erpcgen,
[
{description, "Erlang RPC stub generator 'erpcgen'"},
- {vsn, "%VSN%"},
- {modules, [%MODULES%]},
+ {vsn, "1.1"},
{registered, []},
{applications, [kernel, stdlib]}
]
}.
-
File renamed without changes.

0 comments on commit 596877a

Please sign in to comment.