couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject couchdb commit: updated refs/heads/1843-feature-bigcouch to 32cf5e5
Date Tue, 04 Feb 2014 12:56:18 GMT
Updated Branches:
  refs/heads/1843-feature-bigcouch 2f254d944 -> 32cf5e5f5


Avoid unnecessary linkage with per-port env


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/32cf5e5f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/32cf5e5f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/32cf5e5f

Branch: refs/heads/1843-feature-bigcouch
Commit: 32cf5e5f59189f9d30ae4fb6e0a7c6b236496115
Parents: 2f254d9
Author: Robert Newson <rnewson@apache.org>
Authored: Tue Feb 4 12:54:48 2014 +0000
Committer: Robert Newson <rnewson@apache.org>
Committed: Tue Feb 4 12:54:48 2014 +0000

----------------------------------------------------------------------
 src/couch/rebar.config.script | 43 +++++++++++++-------------------------
 1 file changed, 14 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/32cf5e5f/src/couch/rebar.config.script
----------------------------------------------------------------------
diff --git a/src/couch/rebar.config.script b/src/couch/rebar.config.script
index a4f72ec..9053485 100644
--- a/src/couch/rebar.config.script
+++ b/src/couch/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}].


Mime
View raw message