Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added dynamic configuration

  • Loading branch information...
commit 53f875dd91ca710d4fc3b9f084615dde7742a7df 1 parent 249b259
@saleyn authored
View
5 .gitignore
@@ -0,0 +1,5 @@
+*.beam
+*.o
+*.swp
+/priv
+/ebin
View
6 Makefile
@@ -19,13 +19,13 @@ clean-docs:
github-docs:
git checkout gh-pages
- git checkout master src include c_src Makefile
+ git checkout master src include c_src Makefile vsn.mk rebar.*
make docs
make clean
- rm -fr ebin src include c_src Makefile
+ rm -fr ebin src include c_src Makefile priv erl_crash.dump vsn.mk rebar.*
mv doc/* .
rmdir doc
sh -c "ret=0; set +e; \
- if git commit -a; then git push origin; else ret=1; git reset --hard; fi; \
+ if git commit -a; then git push origin; else ret=1; exit $$ret; git reset --hard; fi; \
set -e; git checkout master; exit $$ret"
View
6 rebar.config
@@ -3,10 +3,4 @@
warn_export_all
]}.
-{port_env, [{"CC", "g++"},
- {"CXX", "g++"},
- {"linux", "LDFLAGS", "$LDFLAGS -lcap"}]}.
-
-{port_specs, [{"priv/exec-port", ["c_src/*.cpp"]}]}.
-
{pre_hooks, [{clean, "rm -fr ebin priv erl_crash.dump"}]}.
View
13 rebar.config.script
@@ -0,0 +1,13 @@
+Arch = erlang:system_info(system_architecture),
+{ok, <<"VSN=", I/binary>>} = file:read_file("vsn.mk"),
+Vsn = binary_to_list(binary:replace(I, <<"\n">>, <<"">>)),
+[
+ {port_env, [{"CC", "g++"},
+ {"CXX", "g++"},
+ {"linux", "LDFLAGS", "$LDFLAGS -lcap"}]},
+
+ {port_specs, [{filename:join(["priv", Arch, "exec-port"]), ["c_src/*.cpp"]}]},
+ {edoc_opts, [{overview, "src/overview.edoc"}, {title, "The exec application"},
+ {includes, ["include"]}, {def, {vsn, Vsn}}]}
+].
+
View
3  src/exec.erl
@@ -236,8 +236,7 @@ default() ->
default(portexe) ->
% Get architecture (e.g. i386-linux)
Dir = filename:dirname(filename:dirname(code:which(?MODULE))),
- %filename:join([Dir, "priv", ?system_architecture, "bin", "exec-port"]);
- filename:join([Dir, "priv", "exec-port"]);
+ filename:join([Dir, "priv", ?system_architecture, "exec-port"]);
default(Option) ->
proplists:get_value(Option, default()).
View
1  vsn.mk
@@ -0,0 +1 @@
+VSN=0.1
Please sign in to comment.
Something went wrong with that request. Please try again.