You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/02/10 21:23:04 UTC
[42/50] couch commit: updated refs/heads/import to 09c6556
Avoid unnecessary linkage with per-port env
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/c3116d79
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/c3116d79
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/c3116d79
Branch: refs/heads/import
Commit: c3116d79c025ed5624829b601ede5d1b5149e59e
Parents: ad08d25
Author: Robert Newson <rn...@apache.org>
Authored: Tue Feb 4 12:54:48 2014 +0000
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Tue Feb 4 17:03:53 2014 -0600
----------------------------------------------------------------------
rebar.config.script | 43 ++++++++++++++-----------------------------
1 file changed, 14 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/c3116d79/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index a4f72ec..9053485 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -35,33 +35,21 @@ ConfigH = [
ConfigSrc = [["#define ", K, " ", V, $\n] || {K, V} <- ConfigH],
ok = file:write_file("priv/couch_js/config.h", ConfigSrc),
-
-JSLIBS = "-lmozjs185",
-{CFLAGS0, LDFLAGS} = case os:type() of
- {unix, darwin} ->
- {"-DXP_UNIX -I/usr/local/include/js", JSLIBS};
- {unix, linux} ->
- {"-DXP_UNIX -I/usr/include/js", JSLIBS ++ " -lm"};
- {unix, _} ->
- {"-DXP_UNIX -I/usr/local/include/js", JSLIBS ++ " -lm"};
- _ ->
- {"-DXP_WIN -I/usr/include/js", JSLIBS}
-end,
-CFLAGS1 = CFLAGS0 ++ " -DWITHOUT_CURL",
-
-
-PortEnv = [
- {"DRV_CFLAGS", "$DRV_CFLAGS -DPIC -O2 -fno-common"},
- {"DRV_LDFLAGS", "$DRV_LDFLAGS -lm -licuuc -licudata -licui18n -lpthread"},
- {"CFLAGS", "$CFLAGS -Wall -c -g -O2 " ++ CFLAGS1},
- {"LDFLAGS", LDFLAGS}
-],
-
+JS_LDFLAGS = "-lmozjs185 -DWITHOUTCURL",
+CouchJSSrc = ["priv/couch_js/{help,http,main,utf8,util}.c"],
BaseSpecs = [
- {CouchJSPath, ["priv/couch_js/{help,http,main,utf8,util}.c"]},
- {"priv/couch_icu_driver.so", ["priv/icu_driver/*.c"]},
- {"priv/couch_ejson_compare.so", ["priv/couch_ejson_compare/*.c"]}
+ %% couchjs
+ {"darwin", CouchJSPath, CouchJSSrc, [{env, [{"CFLAGS", "-DXP_UNIX -I/usr/local/include/js"}, {"LDFLAGS", JS_LDFLAGS}]}]},
+ {"linux", CouchJSPath, CouchJSSrc, [{env, [{"CFLAGS", "-DXP_UNIX -I/usr/include/js"}, {"LDFLAGS", JS_LDFLAGS ++ " -lm"}]}]},
+ {"unix", CouchJSPath, CouchJSSrc, [{env, [{"CFLAGS", "-DXP_UNIX -I/usr/local/include/js}"}, {"LDFLAGS", JS_LDFLAGS ++ " -lm"}]}]},
+ {"win32", CouchJSPath, CouchJSSrc, [{env, [{"CFLAGS", "-DXP_WIN -I/usr/include/js"}, {"LDFLAGS", JS_LDFLAGS}]}]},
+ % ICU
+ {"", "priv/couch_icu_driver.so", ["priv/icu_driver/*.c"], [{env, [
+ {"DRV_CFLAGS", "$DRV_CFLAGS -DPIC -O2 -fno-common"},
+ {"DRV_LDFLAGS", "$DRV_LDFLAGS -lm -licuuc -licudata -licui18n -lpthread"}]}]},
+ % ejson_compare
+ {"priv/couch_ejson_compare.so", ["priv/couch_ejson_compare/*.c"]}
],
SpawnSpec = [
@@ -79,7 +67,4 @@ PortSpecs = case os:type() of
end,
-[
- {port_env, PortEnv},
- {port_specs, PortSpecs}
-].
+[{port_specs, PortSpecs}].