Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D913110872 for ; Tue, 4 Feb 2014 12:56:33 +0000 (UTC) Received: (qmail 50352 invoked by uid 500); 4 Feb 2014 12:56:32 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 50197 invoked by uid 500); 4 Feb 2014 12:56:21 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 50166 invoked by uid 99); 4 Feb 2014 12:56:18 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Feb 2014 12:56:18 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 6C2C5314AD1; Tue, 4 Feb 2014 12:56:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rnewson@apache.org To: commits@couchdb.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: couchdb commit: updated refs/heads/1843-feature-bigcouch to 32cf5e5 Date: Tue, 4 Feb 2014 12:56:18 +0000 (UTC) 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 Authored: Tue Feb 4 12:54:48 2014 +0000 Committer: Robert Newson 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}].