Skip to content

Commit

Permalink
Build GEOS
Browse files Browse the repository at this point in the history
GEOS is an external dependency for GeoCouch.
Add make targets to build it.

Change-Id: I7ada3221dd57e1377b5c51150c950d9b939a765e
Reviewed-on: http://review.couchbase.org/11806
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  • Loading branch information
vmx authored and fdmanana committed Apr 11, 2012
1 parent 583ec93 commit 648b04b
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions Makefile.top
Expand Up @@ -31,6 +31,10 @@ COMPONENTS += sigar portsigar
BUILD_SIGAR := 1
endif

ifneq "$(realpath geos)" ""
BUILD_GEOS := 1
endif

ifdef FOR_WINDOWS
COMPONENTS := $(filter-out memcachetest libcouchbase, $(COMPONENTS))
endif
Expand Down Expand Up @@ -202,8 +206,8 @@ make-install-ns_server: make-install-geocouch
cd ns_server && ./configure "--prefix=$(PREFIX)"
$(MAKE) -C ns_server install "PREFIX=$(PREFIX)"

make-install-geocouch:
$(MAKE) -C geocouch COUCH_SRC=../couchdb/src/couchdb
make-install-geocouch: build-geos
$(MAKE) -C geocouch COUCH_SRC=../couchdb/src/couchdb "CFLAGS=-I$(PREFIX)/include $(CFLAGS)" "LDFLAGS=-L$(PREFIX)/lib $(LDFLAGS)"
mkdir -p $(DESTDIR)$(PREFIX)/lib/couchdb/plugins/geocouch/ebin
cp -r geocouch/ebin/* $(DESTDIR)$(PREFIX)/lib/couchdb/plugins/geocouch/ebin
mkdir -p $(DESTDIR)$(PREFIX)/lib/couchdb/plugins/geocouch/deps/erlgeom
Expand Down Expand Up @@ -241,6 +245,12 @@ ifdef PLEASE_BUILD_COUCH_DEPS
deps-for-couchdb: make-install-couchdb-deps
endif

ifdef BUILD_GEOS
build-geos: make-install-geos
else
build-geos:
endif

WRAPPERS := $(patsubst %, $(PREFIX)/bin/%, memcached-wrapper moxi-wrapper)

$(WRAPPERS): $(PREFIX)/bin/%: tlm/%.in
Expand Down Expand Up @@ -369,6 +379,15 @@ make-install-icu4c: icu4c/source/Makefile

make-install-couchdb-deps: make-install-spidermonkey make-install-icu4c


geos/Makefile:
(cd geos && ./autogen.sh && ./configure "--prefix=$(PREFIX)")

make-install-geos: geos/Makefile
$(MAKE) -C geos
$(MAKE) -C geos install


CHECK_COMPONENTS ?= $(COMPONENTS)

CHECK_TARGETS := $(patsubst %, check-%, $(CHECK_COMPONENTS))
Expand Down

0 comments on commit 648b04b

Please sign in to comment.