Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 596877aa703f9ee4652874640e8a2844a915cdf5 1 parent 5563e0b
Michael Santos authored September 03, 2012
13  .gitignore
... ...
@@ -0,0 +1,13 @@
  1
+*.[oa]
  2
+*.beam
  3
+*.swp
  4
+ebin
  5
+.eunit/
  6
+deps/
  7
+rpc/pmap.hrl
  8
+rpc/pmap_clnt.erl
  9
+rpc/pmap_xdr.erl
  10
+rpc/rpc.hrl
  11
+rpc/rpc_clnt.erl
  12
+rpc/rpc_xdr.erl
  13
+src/xdr_parse.erl
16  Makefile
... ...
@@ -1 +1,15 @@
1  
-include ../../support/subdir.mk
  1
+REBAR=$(shell which rebar || echo ./rebar)
  2
+
  3
+all: compile
  4
+
  5
+./rebar:
  6
+	erl -noshell -s inets start -s ssl start \
  7
+		-eval 'httpc:request(get, {"https://github.com/downloads/basho/rebar/rebar", []}, [], [{stream, "./rebar"}])' \
  8
+		-s inets stop -s init stop
  9
+	chmod +x ./rebar
  10
+
  11
+compile: $(REBAR)
  12
+	@$(REBAR) compile
  13
+
  14
+clean: $(REBAR)
  15
+	@$(REBAR) clean
0  ebin/.empty
No changes.
0  priv/.empty
No changes.
15  rebar.config
... ...
@@ -0,0 +1,15 @@
  1
+%% Uncomment these to enable compiling the rpc modules
  2
+%{post_hooks, [
  3
+%    {compile, "erl -noshell -pa ../ebin -eval 'file:set_cwd(\"rpc\")' -eval 'erpcgen:file(pmap, [xdrlib,clnt])' -s init stop"},
  4
+%    {compile, "erl -noshell -pa ../ebin -eval 'file:set_cwd(\"rpc\")' -eval 'erpcgen:file(rpc, [xdrlib,clnt])' -s init stop"},
  5
+%    {compile, "erlc -o ebin rpc/*.erl"}
  6
+%    ]
  7
+%}.
  8
+%{clean_files, [
  9
+%    "rpc/pmap.hrl",
  10
+%    "rpc/pmap_clnt.erl",
  11
+%    "rpc/pmap_xdr.erl",
  12
+%    "rpc/rpc.hrl",
  13
+%    "rpc/rpc_clnt.erl",
  14
+%    "rpc/rpc_xdr.erl"
  15
+%]}.
0  src/pmap.erl → rpc/pmap.erl
File renamed without changes
0  src/pmap.x → rpc/pmap.x
File renamed without changes
0  src/rpc.app.src → rpc/rpc.app.src
File renamed without changes
0  src/rpc.x → rpc/rpc.x
File renamed without changes
0  src/rpc_client.erl → rpc/rpc_client.erl
File renamed without changes
0  src/rpc_server.erl → rpc/rpc_server.erl
File renamed without changes
6  src/.cvsignore
... ...
@@ -1,6 +0,0 @@
1  
-pmap.hrl
2  
-pmap_clnt.erl
3  
-pmap_xdr.erl
4  
-rpc.hrl
5  
-rpc_xdr.erl
6  
-xdr_parse.erl
61  src/Makefile
... ...
@@ -1,61 +0,0 @@
1  
-# Copyright (c) 2000, 2001 Sendmail, Inc.  All rights reserved.
2  
-# This Makefile may require GNU make.
3  
-
4  
-include ../../../support/include.mk
5  
-include ../vsn.mk
6  
-
7  
-ERLC_FLAGS += -I ../..
8  
-
9  
-ESRC=.
10  
-ERPCGEN = ../priv/erpcgen
11  
-ERPCGEN_OPTS =
12  
-
13  
-ERPCGEN_MODULES = erpcgen xdr_parse xdrgen xdr_scan
14  
-
15  
-RPC_MODULES = rpc_client rpc_xdr rpc_server \
16  
-	      pmap pmap_clnt pmap_xdr \
17  
-	      xdr_auth
18  
-
19  
-MODULES =  $(RPC_MODULES) $(ERPCGEN_MODULES)
20  
-
21  
-ERPCGEN_TARGET_FILES= $(ERPCGEN_MODULES:%=../ebin/%.$(EMULATOR))
22  
-RPC_TARGET_FILES= $(RPC_MODULES:%=../ebin/%.$(EMULATOR))
23  
-TARGET_FILES= $(MODULES:%=../ebin/%.$(EMULATOR)) $(ERPCGEN)
24  
-
25  
-%_xdr.erl %.hrl: %.x $(ERPCGEN)
26  
-	$(ERPCGEN) -a '[xdrlib]' $*
27  
-
28  
-%_clnt.erl: %.x $(ERPCGEN)
29  
-	$(ERPCGEN) -a '[clnt]' $*
30  
-
31  
-# $(EBIN)/%.$(EMULATOR): $(ESRC)/%.erl
32  
-# 	$(ERLC) $(ERLC_FLAGS) -o$(EBIN) $<
33  
-
34  
-all: $(TARGET_FILES)
35  
-
36  
-$(ERPCGEN): erpcgen.src $(ERPCGEN_TARGET_FILES)
37  
-	sed -e 's;%ERL%;$(ERL);' \
38  
-	  erpcgen.src > $(ERPCGEN)
39  
-	chmod u+x $(ERPCGEN)
40  
-
41  
-xdr_parse.erl: xdr.yrl
42  
-	$(ERLC) -o xdr_parse.erl xdr.yrl
43  
-
44  
-clean:
45  
-	-rm -f $(TARGET_FILES)
46  
-	-rm -f core erl_crash.dump
47  
-	-rm -f pmap_clnt.erl pmap_xdr.erl pmap.hrl
48  
-	-rm -f rpc_xdr.erl rpc.hrl
49  
-	-rm -f erpcgen.boot erpcgen.script xdr_parse.erl
50  
-	-rm -f ../ebin/erpcgen.app ../ebin/rpc.app erpcgen.rel
51  
-
52  
-
53  
-../ebin/pmap.beam: pmap.hrl
54  
-../ebin/pmap_clnt.beam: pmap.hrl
55  
-../ebin/pmap_svc.beam: pmap.hrl
56  
-../ebin/rpc_client.beam: rpc.hrl
57  
-../ebin/rpc_server.beam: rpc.hrl
58  
-rpc_xdr.erl: rpc.x
59  
-pmap_xdr.erl: pmap.x
60  
-pmap_clnt.erl: pmap.x
61  
-
4  src/erpcgen.app.src
... ...
@@ -1,10 +1,8 @@
1 1
 {application, erpcgen,
2 2
  [
3 3
   {description, "Erlang RPC stub generator 'erpcgen'"},
4  
-  {vsn, "%VSN%"},
5  
-  {modules, [%MODULES%]},
  4
+  {vsn, "1.1"},
6 5
   {registered, []},
7 6
   {applications, [kernel, stdlib]}
8 7
   ]
9 8
 }.
10  
-
0  src/xdr.yrl → src/xdr_parse.yrl
File renamed without changes

0 notes on commit 596877a

Please sign in to comment.
Something went wrong with that request. Please try again.