Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 379 lines (283 sloc) 12.346 kb
544dc39 @alk reimplemented top level makefile
alk authored
1 # -*- Mode: makefile -*-
2 TOPDIR := $(shell pwd)
3 PREFIX := $(TOPDIR)/install
4
d6cc7ea @trondn MB-6125 Allow for extra components to be built
trondn authored
5 COMPONENTS := $(COMPONENTS_EXTRA) \
6 bucket_engine \
f815a38 @Damienkatz Add couchstore to tlm
Damienkatz authored
7 couchstore \
544dc39 @alk reimplemented top level makefile
alk authored
8 ep-engine \
9 libconflate \
8a4c42d @bcui6611 MB-5821: Add tarball for workload-generator
bcui6611 authored
10 libmemcached \
544dc39 @alk reimplemented top level makefile
alk authored
11 libvbucket \
12 membase-cli \
13 memcached \
14 moxi \
d782c27 @alk simplify top-level makefile by always building couchdb
alk authored
15 couchdb \
16 couchbase-examples \
ab4b74e @bcui6611 CBD-583:Repimplement dbworkloadgen with cbtransfer
bcui6611 authored
17 ns_server
544dc39 @alk reimplemented top level makefile
alk authored
18
e210260 @alk make sure things work when DESTDIR is defined
alk authored
19 ifneq "$(DESTDIR)" ""
1ae23b6 @steveyen LDFLAGS recursion fix
steveyen authored
20 LDFLAGS := -L$(DESTDIR)$(PREFIX)/lib $(LDFLAGS)
21 CPPFLAGS := -I$(DESTDIR)$(PREFIX)/include $(CPPFLAGS)
e210260 @alk make sure things work when DESTDIR is defined
alk authored
22 export LDFLAGS CPPFLAGS
23 endif
24
2c0126f @trondn MB-3812 Build release code by default
trondn authored
25 ifneq "$(COUCHBASE_DEBUG_BUILD)" ""
26 WITH_DEBUG_FLAG=--with-debug
27 endif
28
65b1210 @alk build sigar if it's available
alk authored
29 ifneq "$(realpath portsigar/configure.ac)" ""
30 COMPONENTS += sigar portsigar
31 BUILD_SIGAR := 1
32 endif
33
544dc39 @alk reimplemented top level makefile
alk authored
34 ifdef FOR_WINDOWS
3811f5f @bcui6611 MB-6684: Remove memcachetest module from build
bcui6611 authored
35 COMPONENTS := $(filter-out libcouchbase, $(COMPONENTS))
544dc39 @alk reimplemented top level makefile
alk authored
36 endif
37
9130387 @alk upgrade libmemcached to fully-featured 'component'
alk authored
38 BUILD_COMPONENTS := $(filter-out ns_server, $(COMPONENTS))
65814aa @alk don't build and install mccouch
alk authored
39 BUILD_COMPONENTS_EX := geocouch
544dc39 @alk reimplemented top level makefile
alk authored
40
41 MAKE_INSTALL_TARGETS := $(patsubst %, make-install-%, $(BUILD_COMPONENTS))
bd4ae11 @aartamonau Correctly name install targets for geocouch and mccouch.
aartamonau authored
42 MAKE_INSTALL_TARGETS_EX := $(patsubst %, make-install-%, $(BUILD_COMPONENTS_EX))
2b8140e @steveyen make-install-geocouch if it exists
steveyen authored
43
3811f5f @bcui6611 MB-6684: Remove memcachetest module from build
bcui6611 authored
44 TEST_COMPONENTS := $(filter-out libconflate membase-cli moxi, $(BUILD_COMPONENTS))
ab6b007 @steveyen make test
steveyen authored
45 MAKE_TEST_TARGETS := $(patsubst %, make-test-%, $(TEST_COMPONENTS))
46 MAKE_TEST_TARGETS_EX :=
47
544dc39 @alk reimplemented top level makefile
alk authored
48 MAKEFILE_TARGETS := $(patsubst %, %/Makefile, $(BUILD_COMPONENTS))
49
50 OPTIONS := --prefix=$(PREFIX)
51 AUTOGEN := ./config/autorun.sh
b221405 @steveyen Renamed to WIN_FLAGS
steveyen authored
52
544dc39 @alk reimplemented top level makefile
alk authored
53 ifdef PREFER_STATIC
54 LIBRARY_OPTIONS := --enable-static --disable-shared
55 else
1e0725e @alk NUKE_LA_FILES should be off by default.MB-3806
alk authored
56 NUKE_LA_FILES ?= false
544dc39 @alk reimplemented top level makefile
alk authored
57 LIBRARY_OPTIONS := --disable-static --enable-shared
58 endif
59
6c2294f @alk don't try building ns_server twice.MB-3631
alk authored
60 all: do-install-all
9ad61b0 @trondn Define the default target before reading .repo/Makefile.extra
trondn authored
61
0644b39 @steveyen top level make dist
steveyen authored
62 DIST_VERSION = `git describe`
74c1c98 @steveyen Allow optional manifest.xml during make dist
steveyen authored
63 DIST_MANIFEST = manifest.xml
1858cfc @steveyen No dist of the workload-generator
steveyen authored
64 DIST_PRODUCT = couchbase-server
8a4c42d @bcui6611 MB-5821: Add tarball for workload-generator
bcui6611 authored
65 DIST_COMPONENTS_EXTRA = couchbase-python-client
3811f5f @bcui6611 MB-6684: Remove memcachetest module from build
bcui6611 authored
66 DIST_COMPONENTS = $(filter-out libcouchbase, $(COMPONENTS)) $(DIST_COMPONENTS_EXTRA)
0644b39 @steveyen top level make dist
steveyen authored
67
68 dist:
1483b01 @steveyen Parametrized dist components
steveyen authored
69 for i in $(DIST_COMPONENTS); do (cd $$i && rm -f *.tar.gz && make dist || true); done
74d1fb6 @steveyen Parametrized dist tarball name
steveyen authored
70 mkdir -p tmp/$(DIST_PRODUCT)_src
71 rm -rf tmp/$(DIST_PRODUCT)_src/*
1483b01 @steveyen Parametrized dist components
steveyen authored
72 (for i in $(DIST_COMPONENTS); do \
74d1fb6 @steveyen Parametrized dist tarball name
steveyen authored
73 mkdir -p tmp/$(DIST_PRODUCT)_src/$$i; \
74 (cd tmp/$(DIST_PRODUCT)_src/$$i && \
0644b39 @steveyen top level make dist
steveyen authored
75 tar --strip-components 1 -xzf ../../../$$i/$$i-*.tar.gz || \
821376f @steveyen MB-4749 - dont make dist memcachetest/libcouchbase/cb-examples
steveyen authored
76 tar --strip-components 1 -xzf ../../../$$i/*.tar.gz || \
77 (cd ../.. && rm -rf $(DIST_PRODUCT)_src/$$i)); \
0644b39 @steveyen top level make dist
steveyen authored
78 done)
74d1fb6 @steveyen Parametrized dist tarball name
steveyen authored
79 cp Makefile tmp/$(DIST_PRODUCT)_src
1483b01 @steveyen Parametrized dist components
steveyen authored
80 if [ -f $(DIST_MANIFEST) ]; then cp $(DIST_MANIFEST) tmp/$(DIST_PRODUCT)_src/manifest.xml; fi
74d1fb6 @steveyen Parametrized dist tarball name
steveyen authored
81 tar -C tmp -czf $(DIST_PRODUCT)_src-$(DIST_VERSION).tar.gz $(DIST_PRODUCT)_src
0644b39 @steveyen top level make dist
steveyen authored
82
ab6b007 @steveyen make test
steveyen authored
83 test: $(MAKE_TEST_TARGETS) $(MAKE_TEST_TARGETS_EX)
84
e737e5e @farshidce added targets for running end to end tests
farshidce authored
85 e2etest:
86 cd testrunner && $(MAKE) test
87
88 e2eviewtests:
89 cd testrunner && $(MAKE) test-views
90
65b1210 @alk build sigar if it's available
alk authored
91 ifdef BUILD_SIGAR
92 deps-for-portsigar: make-install-sigar
93 portsigar/Makefile: AUTOGEN := ./bootstrap
e210260 @alk make sure things work when DESTDIR is defined
alk authored
94 portsigar/Makefile: CONFIGURE_PREFIX := LDFLAGS="-L$(PREFIX)/lib $(LDFLAGS)"
65b1210 @alk build sigar if it's available
alk authored
95 sigar/Makefile: AUTOGEN := ./autogen.sh
95a0524 @alk avoid needless subproject rebuilds by passing 'stable' includes
alk authored
96 portsigar_EXTRA_MAKE_OPTIONS := 'CPPFLAGS=-I$(TOPDIR)/sigar/include $(CPPFLAGS)'
351e171 @alk pass LIBRARY_OPTIONS to sigar configure
alk authored
97 sigar_OPTIONS := $(LIBRARY_OPTIONS) $(sigar_OPTIONS)
65b1210 @alk build sigar if it's available
alk authored
98 endif
99
94be79b @vmx Build ns_server as last item.
vmx authored
100 do-install-all: $(MAKE_INSTALL_TARGETS) $(MAKE_INSTALL_TARGETS_EX) make-install-ns_server
544dc39 @alk reimplemented top level makefile
alk authored
101
3973999 @alk made ns_server use memcached & moxi wrappers
alk authored
102 -clean-common:
544dc39 @alk reimplemented top level makefile
alk authored
103 rm -rf install tmp
3973999 @alk made ns_server use memcached & moxi wrappers
alk authored
104 rm -f moxi*log
105 rm -f memcached*log
106
107 clean: -clean-common
108 for i in $(COMPONENTS); do (cd $$i && make clean || true); done
544dc39 @alk reimplemented top level makefile
alk authored
109
3973999 @alk made ns_server use memcached & moxi wrappers
alk authored
110 distclean: -clean-common
544dc39 @alk reimplemented top level makefile
alk authored
111 for i in $(COMPONENTS); do (cd $$i && make distclean || true); done
112 rm -rf install tmp
69f7283 @daleharvey Dont quit distclean of moxi / memcached logs arent found
daleharvey authored
113 rm -f moxi*log
114 rm -f memcached*log
544dc39 @alk reimplemented top level makefile
alk authored
115
0f67d2b @alk clean geocouch and mccouch as well
alk authored
116 clean-xfd: $(patsubst %, do-clean-xfd-%, $(COMPONENTS) $(BUILD_COMPONENTS_EX)) -clean-common
627bb98 @trondn MB-6554: add -q to git clean -xfd to mute it
trondn authored
117 (cd icu4c && git clean -Xfdq) || true
90783a1 @alk added clean-xfd-hard target
alk authored
118
0f67d2b @alk clean geocouch and mccouch as well
alk authored
119 clean-xfd-hard: $(patsubst %, do-hard-clean-xfd-%, $(COMPONENTS) $(BUILD_COMPONENTS_EX)) -clean-common
1b86c94 @alk build couch and it's deps if they're available
alk authored
120 (cd icu4c && git clean -xfd) || true
544dc39 @alk reimplemented top level makefile
alk authored
121
122 do-clean-xfd-%:
627bb98 @trondn MB-6554: add -q to git clean -xfd to mute it
trondn authored
123 (cd $* && git clean -Xfdq)
544dc39 @alk reimplemented top level makefile
alk authored
124
90783a1 @alk added clean-xfd-hard target
alk authored
125 do-hard-clean-xfd-%:
627bb98 @trondn MB-6554: add -q to git clean -xfd to mute it
trondn authored
126 (cd $* && git clean -xfdq)
90783a1 @alk added clean-xfd-hard target
alk authored
127
6eb3ee2 @alk separate configure step from autotools step
alk authored
128 CONFIGURE_TARGETS := $(patsubst %, %/configure, $(BUILD_COMPONENTS))
129
12d3066 @alk optionally rebuild configure if git HEAD is changed
alk authored
130 ifdef AUTO_RECONFIG
09a7dd4 @alk fixed AUTO_RECONFIG for voltron setup
alk authored
131
132 define define-configure-target-deps
133 $(1)/configure: $(1)/.git/HEAD $(1)/.git/$(shell git --git-dir=$(1)/.git symbolic-ref -q HEAD || echo HEAD)
134 endef
135 # $(foreach comp, $(BUILD_COMPONENTS),$(eval $(info $(call define-configure-target-deps,$(comp)))))
136 # $(error stop)
137 $(foreach comp, $(BUILD_COMPONENTS),$(eval $(call define-configure-target-deps,$(comp))))
138
12d3066 @alk optionally rebuild configure if git HEAD is changed
alk authored
139 endif
6eb3ee2 @alk separate configure step from autotools step
alk authored
140
09a7dd4 @alk fixed AUTO_RECONFIG for voltron setup
alk authored
141 $(CONFIGURE_TARGETS):
142 cd $(dir $@) && $(AUTOGEN_PREFIX) $(AUTOGEN)
143
6eb3ee2 @alk separate configure step from autotools step
alk authored
144 $(MAKEFILE_TARGETS): %/Makefile: | %/configure deps-for-%
8886488 @trondn Use the cache feature of autoconf
trondn authored
145 cd $* && $(CONFIGURE_PREFIX) ./configure -C $(OPTIONS) $($*_OPTIONS) $($*_EXTRA_OPTIONS)
544dc39 @alk reimplemented top level makefile
alk authored
146
147 $(MAKE_INSTALL_TARGETS): make-install-%: %/Makefile deps-for-%
148 (rm -rf tmp/$*; mkdir -p tmp/$*)
fc2f40e @alk always make install subprojects
alk authored
149 $(MAKE) -C $* install $($*_EXTRA_MAKE_OPTIONS)
1e0725e @alk NUKE_LA_FILES should be off by default.MB-3806
alk authored
150 if [ "x$(NUKE_LA_FILES)" = "xtrue" ]; then $(RM) -f $(DESTDIR)$(PREFIX)/lib/*.la; fi
544dc39 @alk reimplemented top level makefile
alk authored
151
ab6b007 @steveyen make test
steveyen authored
152 $(MAKE_TEST_TARGETS): make-test-%: make-install-%
153 $(MAKE) -C $* test
154
544dc39 @alk reimplemented top level makefile
alk authored
155 $(patsubst %, deps-for-%, $(BUILD_COMPONENTS)):
156
8baaf36 @trondn Build libmemcached without memcached
trondn authored
157 libmemcached_OPTIONS := $(LIBRARY_OPTIONS) --disable-dtrace --without-docs --disable-sasl --without-memcached
544dc39 @alk reimplemented top level makefile
alk authored
158 ifndef CROSS_COMPILING
718c1e9 @alk made recent libmemcached compile under mingw32
alk authored
159 deps-for-libmemcached: make-install-memcached
544dc39 @alk reimplemented top level makefile
alk authored
160 endif
7d56a2a @dustin Added tlm makefile from ns_server
dustin authored
161
6f21f01 @orieg Add tcmalloc support for libmemcached
orieg authored
162 ifdef USE_TCMALLOC
163 libmemcached_OPTIONS += --enable-tcmalloc
164 endif
165
544dc39 @alk reimplemented top level makefile
alk authored
166 # tar.gz _should_ have ./configure inside, but it doesn't
167 # make-install-libmemcached: AUTOGEN := true
168
2c0126f @trondn MB-3812 Build release code by default
trondn authored
169 libvbucket_OPTIONS := $(LIBRARY_OPTIONS) --without-docs $(WITH_DEBUG_FLAG)
544dc39 @alk reimplemented top level makefile
alk authored
170
a9703d7 @trondn Build libcouchbase as part of the build process
trondn authored
171 libcouchbase_OPTIONS := $(LIBRARY_OPTIONS) $(WITH_DEBUG_FLAG)
4a5e734 @trondn Add default LDFLAGS/CPPFLAGS for libcouchbase
trondn authored
172 libcouchbase_EXTRA_OPTIONS := 'LDFLAGS=-L$(DESTDIR)$(PREFIX)/lib $(LDFLAGS)' \
173 'CPPFLAGS=-I$(DESTDIR)$(PREFIX)/include $(CPPFLAGS)'
9f858e6 @trondn Fix dependency for libcouchbase
trondn authored
174 deps-for-libcouchbase: make-install-libvbucket make-install-memcached
a9703d7 @trondn Build libcouchbase as part of the build process
trondn authored
175
af98369 @trondn MB-6433: Make sure ep-engine finds libcouchstore
trondn authored
176 ep-engine_OPTIONS := $(WITH_DEBUG_FLAG) \
177 'LDFLAGS=-L$(DESTDIR)$(PREFIX)/lib $(LDFLAGS)' \
178 'CPPFLAGS=-I$(DESTDIR)$(PREFIX)/include $(CPPFLAGS)'
79b0a43 @trondn MB-6128: Don't build libcbio anymore
trondn authored
179 deps-for-ep-engine: make-install-memcached make-install-couchstore
544dc39 @alk reimplemented top level makefile
alk authored
180
7fc81ab @alk build couchstore with LIBRARY_OPTIONS and standard debug flags
alk authored
181 couchstore_OPTIONS := $(LIBRARY_OPTIONS) $(WITH_DEBUG_FLAG)
182
053e753 @trondn MB-5879: bucket_engine needs ep-engine cmd ids
trondn authored
183 bucket_engine_OPTIONS := $(WITH_DEBUG_FLAG) \
184 'CPPFLAGS=-I$(DESTDIR)$(PREFIX)/include $(CPPFLAGS)'
185 deps-for-bucket_engine: make-install-memcached make-install-ep-engine
544dc39 @alk reimplemented top level makefile
alk authored
186
187 moxi_OPTIONS := --enable-moxi-libvbucket \
188 --enable-moxi-libmemcached \
189 --without-check
95a0524 @alk avoid needless subproject rebuilds by passing 'stable' includes
alk authored
190 moxi_EXTRA_MAKE_OPTIONS := 'CPPFLAGS=-I$(TOPDIR)/libmemcached -I$(TOPDIR)/libvbucket/include -I$(PREFIX)/include $(CPPFLAGS)'
544dc39 @alk reimplemented top level makefile
alk authored
191 ifndef CROSS_COMPILING
e210260 @alk make sure things work when DESTDIR is defined
alk authored
192 moxi_OPTIONS += --with-memcached=$(DESTDIR)$(PREFIX)/bin/memcached
544dc39 @alk reimplemented top level makefile
alk authored
193 endif
194 deps-for-moxi: make-install-libconflate make-install-libvbucket make-install-libmemcached make-install-memcached
195
2c0126f @trondn MB-3812 Build release code by default
trondn authored
196 libconflate_OPTIONS := $(LIBRARY_OPTIONS) --without-check $(WITH_DEBUG_FLAG)
7d56a2a @dustin Added tlm makefile from ns_server
dustin authored
197
4025b3c @trondn Memcached should be built with isasl support
trondn authored
198 memcached_OPTIONS := --enable-isasl
199
6b6479b @alk order ns_server and _geo_couch install instead of mccouch
alk authored
200 make-install-ns_server: make-install-geocouch
34e98bb @alk don't ignore ./configure failures inside ns_server
alk authored
201 cd ns_server && ./configure "--prefix=$(PREFIX)"
6c2294f @alk don't try building ns_server twice.MB-3631
alk authored
202 $(MAKE) -C ns_server install "PREFIX=$(PREFIX)"
c9727da @alk added make-install-ns_server
alk authored
203
bbd3f78 @fdmanana Revert "Build GEOS"
fdmanana authored
204 make-install-geocouch:
205 $(MAKE) -C geocouch COUCH_SRC=../couchdb/src/couchdb
ce9a2e8 @alk handle DESTDIR in make-install-{mc,geo}couch
alk authored
206 mkdir -p $(DESTDIR)$(PREFIX)/lib/couchdb/plugins/geocouch/ebin
8b8155d @vmx GeoCouch build directory was renamed.
vmx authored
207 cp -r geocouch/ebin/* $(DESTDIR)$(PREFIX)/lib/couchdb/plugins/geocouch/ebin
d307135 @vmx Update for GeoCouch config location change.
vmx authored
208 mkdir -p $(DESTDIR)$(PREFIX)/etc/couchdb/default.d
209 cp -r geocouch/etc/couchdb/default.d/* $(DESTDIR)$(PREFIX)/etc/couchdb/default.d
ce9a2e8 @alk handle DESTDIR in make-install-{mc,geo}couch
alk authored
210 mkdir -p $(DESTDIR)$(PREFIX)/share/couchdb/www/script/test
211 cp -r geocouch/share/www/script/test/* $(DESTDIR)$(PREFIX)/share/couchdb/www/script/test
2b8140e @steveyen make-install-geocouch if it exists
steveyen authored
212
bd52050 @alk don't build couch deps by default
alk authored
213 ifdef PLEASE_BUILD_COUCH_DEPS
e1983be @steveyen Remove spidermonkey from 2.0
steveyen authored
214 couchdb_OPTIONS := --with-v8-lib=$(PREFIX)/lib --with-v8-include=$(PREFIX)/include "PATH=$(PREFIX)/bin:$(PATH)"
1b86c94 @alk build couch and it's deps if they're available
alk authored
215
216 # it's necessary to pass this late. couchdb is using libtool and
217 # libtool portably understands -rpath (NOTE: _single_ dash). Passing
218 # it to configure fails, because a bunch of stuff is checked with
219 # plain gcc versus with libtool wrapper.
bd52050 @alk don't build couch deps by default
alk authored
220 # NOTE: this doesn't work on Darwin and has issues on Solaris
221 couchdb_EXTRA_MAKE_OPTIONS := "LDFLAGS=-R $(PREFIX)/lib $(LDFLAGS)"
222 endif
1b86c94 @alk build couch and it's deps if they're available
alk authored
223
224 couchdb/Makefile: AUTOGEN = ./bootstrap
225
bd52050 @alk don't build couch deps by default
alk authored
226 ifdef PLEASE_BUILD_COUCH_DEPS
1b86c94 @alk build couch and it's deps if they're available
alk authored
227 deps-for-couchdb: make-install-couchdb-deps
228 endif
229
3973999 @alk made ns_server use memcached & moxi wrappers
alk authored
230 WRAPPERS := $(patsubst %, $(PREFIX)/bin/%, memcached-wrapper moxi-wrapper)
231
232 $(WRAPPERS): $(PREFIX)/bin/%: tlm/%.in
233 mkdir -p $(PREFIX)/bin
234 sed -e 's|@PREFIX@|$(PREFIX)|g' <$< >$@ || (rm $@ && false)
235 chmod +x $@
236
544dc39 @alk reimplemented top level makefile
alk authored
237 WIN32_MAKE_TARGET := do-install-all
238 WIN32_HOST := i586-mingw32msvc
29c42b8 @bcui6611 Fix a typo
bcui6611 authored
239 WIN_CYGWIN_FLAGS := CC=i686-pc-cygwin-gcc CXX=i686-pc-cygwin-g++
544dc39 @alk reimplemented top level makefile
alk authored
240
241 win32-cross:
242 $(MAKE) $(WIN32_MAKE_TARGET) FOR_WINDOWS=1 HOST=$(WIN32_HOST) CROSS_COMPILING=1
243
244 ifdef FOR_WINDOWS
245
b221405 @steveyen Renamed to WIN_FLAGS
steveyen authored
246 WIN_FLAGS := 'LOCAL=$(PREFIX)'
dc765dc @alk cleaned up windows cross-compilation and made it work on amd64
alk authored
247
248 ifndef LIBS_PREFIX
249 $(warning LIBS_PREFIX usually needs to be given so that I can find libcurl, libevent and libpthread)
250 else
251
bca4ec8 @alk don not overwrite important variables
alk authored
252 OPTIONS += 'CFLAGS=-I$(LIBS_PREFIX)/include $(CFLAGS)' 'LDFLAGS=-L$(LIBS_PREFIX)/lib $(LDFLAGS)'
9d74a7d @steveyen LOCALINC fix for win32 memcached make invocation
steveyen authored
253 LOCALINC := -I${PREFIX}/include
254 LOCALINC += -I$(LIBS_PREFIX)/include
544dc39 @alk reimplemented top level makefile
alk authored
255 ifdef NO_USECONDS_T
9d74a7d @steveyen LOCALINC fix for win32 memcached make invocation
steveyen authored
256 LOCALINC += -Duseconds_t=unsigned
544dc39 @alk reimplemented top level makefile
alk authored
257 endif
dc765dc @alk cleaned up windows cross-compilation and made it work on amd64
alk authored
258
b221405 @steveyen Renamed to WIN_FLAGS
steveyen authored
259 WIN_FLAGS += 'LOCALINC=$(LOCALINC)' 'LIB=-L$(LIBS_PREFIX)/lib $(LIB)'
dc765dc @alk cleaned up windows cross-compilation and made it work on amd64
alk authored
260
978b765 @bcui6611 CBD-465: Create a separate shared couchstore library
bcui6611 authored
261 couchstore_OPTIONS += --enable-shared --enable-static
dc765dc @alk cleaned up windows cross-compilation and made it work on amd64
alk authored
262 endif
544dc39 @alk reimplemented top level makefile
alk authored
263
264 ifdef HOST
265 OPTIONS := --host=$(HOST) $(OPTIONS)
b221405 @steveyen Renamed to WIN_FLAGS
steveyen authored
266 WIN_FLAGS += CC=$(HOST)-gcc CXX=$(HOST)-g++
544dc39 @alk reimplemented top level makefile
alk authored
267 endif
268
718c1e9 @alk made recent libmemcached compile under mingw32
alk authored
269 libmemcached_OPTIONS += --without-memcached
dc765dc @alk cleaned up windows cross-compilation and made it work on amd64
alk authored
270 moxi_OPTIONS += --without-memcached
718c1e9 @alk made recent libmemcached compile under mingw32
alk authored
271
544dc39 @alk reimplemented top level makefile
alk authored
272 memcached/Makefile:
dc765dc @alk cleaned up windows cross-compilation and made it work on amd64
alk authored
273 touch $@
544dc39 @alk reimplemented top level makefile
alk authored
274
275 ep-engine/Makefile:
dc765dc @alk cleaned up windows cross-compilation and made it work on amd64
alk authored
276 touch $@
544dc39 @alk reimplemented top level makefile
alk authored
277
278 bucket_engine/Makefile:
dc765dc @alk cleaned up windows cross-compilation and made it work on amd64
alk authored
279 touch $@
544dc39 @alk reimplemented top level makefile
alk authored
280
6eb3ee2 @alk separate configure step from autotools step
alk authored
281 memcached/configure ep-engine/configure bucket_engine/configure:
282 @true
283
7c2da93 @bcui6611 Create a membase-cli task for build on windows
bcui6611 authored
284 membase-cli/Makefile:
285 touch $@
286
287 make-install-membase-cli:
12794df @bcui6611 Copy membase cli to /opt/membase/bin
bcui6611 authored
288 (cd membase-cli && mkdir -p $(PREFIX)/bin/simplejson && \
ab4b74e @bcui6611 CBD-583:Repimplement dbworkloadgen with cbtransfer
bcui6611 authored
289 cp couchbase-cli cbbackup cbrestore cbtransfer cbclusterstats cbworkloadgen *.py LICENSE $(PREFIX)/bin && \
12794df @bcui6611 Copy membase cli to /opt/membase/bin
bcui6611 authored
290 cp simplejson/LICENSE.txt simplejson/*.py $(PREFIX)/bin/simplejson)
7c2da93 @bcui6611 Create a membase-cli task for build on windows
bcui6611 authored
291
78674f2 @bcui6611 Integrate docloader to server build
bcui6611 authored
292 couchbase-examples/Makefile:
293 touch $@
294
4b1760b @bcui6611 Reuse steps to set up couchbase-python-client
bcui6611 authored
295 make-install-couchbase-examples: install-couchbase-python-client
0aecc83 @bcui6611 CBD-393: Rename docloader
bcui6611 authored
296 (cp couchbase-examples/cbdocloader $(PREFIX)/bin && \
4b1760b @bcui6611 Reuse steps to set up couchbase-python-client
bcui6611 authored
297 mkdir -p $(PREFIX)/samples && \
612d0d1 @bcui6611 CBD-197: Add beer sample database
bcui6611 authored
298 cp couchbase-examples/*.zip $(PREFIX)/samples)
4b1760b @bcui6611 Reuse steps to set up couchbase-python-client
bcui6611 authored
299
300 install-couchbase-python-client:
301 cd couchbase-python-client && mkdir -p $(PREFIX)/bin/couchbase && \
ab70f6d @bcui6611 MB-6784: Add uuid.py to bin directory
bcui6611 authored
302 cp -r couchbase httplib2 simplejson uuid.py $(PREFIX)/bin
78674f2 @bcui6611 Integrate docloader to server build
bcui6611 authored
303
fc2f40e @alk always make install subprojects
alk authored
304 make-install-memcached:
b221405 @steveyen Renamed to WIN_FLAGS
steveyen authored
305 (cd memcached && $(MAKE) -f win32/Makefile.mingw $(WIN_FLAGS) all \
940b4b2 @bcui6611 Copy build results to right staging directory
bcui6611 authored
306 && mkdir -p $(PREFIX)/lib/memcached \
8a20961 @bcui6611 Add all .so files to lib/memcached directory
bcui6611 authored
307 && cp .libs/*.so $(PREFIX)/lib/memcached \
940b4b2 @bcui6611 Copy build results to right staging directory
bcui6611 authored
308 && cp memcached.exe mcstat.exe $(PREFIX)/bin)
dc765dc @alk cleaned up windows cross-compilation and made it work on amd64
alk authored
309
310 # hey, it's almost like Lisp
311 EP_ENGINE_MARCH := $(strip $(if $(or $(findstring x86_64, $(HOST)), $(findstring amd64, $(HOST))), ,-march=i686))
544dc39 @alk reimplemented top level makefile
alk authored
312
fc2f40e @alk always make install subprojects
alk authored
313 make-install-ep-engine:
544dc39 @alk reimplemented top level makefile
alk authored
314 chmod +x ep-engine/win32/config.sh
375d8ef @trondn Build gencode on win32
trondn authored
315 (cd ep-engine && \
316 $(MAKE) -f win32/Makefile.genconf $(WIN_CYGWIN_FLAGS) && \
317 $(MAKE) -f win32/Makefile.gencode $(WIN_CYGWIN_FLAGS) && \
318 $(MAKE) -f win32/Makefile.mingw "MARCH=$(EP_ENGINE_MARCH)" $(WIN_FLAGS) install)
7d56a2a @dustin Added tlm makefile from ns_server
dustin authored
319
fc2f40e @alk always make install subprojects
alk authored
320 make-install-bucket_engine:
b221405 @steveyen Renamed to WIN_FLAGS
steveyen authored
321 (cd bucket_engine && $(MAKE) -f win32/Makefile.mingw $(WIN_FLAGS) all \
940b4b2 @bcui6611 Copy build results to right staging directory
bcui6611 authored
322 && cp .libs/bucket_engine.so "$(PREFIX)/lib/memcached")
7d56a2a @dustin Added tlm makefile from ns_server
dustin authored
323
718c1e9 @alk made recent libmemcached compile under mingw32
alk authored
324 libmemcached/Makefile: fix-broken-libmemcached-tests
325
326 fix-broken-libmemcached-tests:
21293b4 @alk fail windows build if patch is not available
alk authored
327 patch -p1 -N -r /dev/null -t -d libmemcached <tlm/libmemcached-win32-fix.diff || (echo "probably patched"; patch -v >/dev/null 2>&1)
718c1e9 @alk made recent libmemcached compile under mingw32
alk authored
328
544dc39 @alk reimplemented top level makefile
alk authored
329 endif
1b86c94 @alk build couch and it's deps if they're available
alk authored
330
331 AUTOCONF213 := autoconf213
332
333 icu4c/source/Makefile:
334 (cd icu4c/source && ./configure "--prefix=$(PREFIX)")
335
fc2f40e @alk always make install subprojects
alk authored
336 make-install-icu4c: icu4c/source/Makefile
1b86c94 @alk build couch and it's deps if they're available
alk authored
337 $(MAKE) -C icu4c/source install
338
e1983be @steveyen Remove spidermonkey from 2.0
steveyen authored
339 make-install-couchdb-deps: make-install-icu4c
dce838f @alk added check target that runs tests in all subprojects
alk authored
340
341 CHECK_COMPONENTS ?= $(COMPONENTS)
342
343 CHECK_TARGETS := $(patsubst %, check-%, $(CHECK_COMPONENTS))
344
345 MAKE_CHECK_TARGET := check
346
347 check-fast: check-ns_server check-bucket_engine check-ep-engine check-ns_server check-libvbucket check-couchdb
348
349 check: $(CHECK_TARGETS)
350
351 check-memcached check-moxi check-bucket_engine check-ns_server: MAKE_CHECK_TARGET := test
352
353 $(CHECK_TARGETS): check-%: make-install-%
354 $(MAKE) -C $* $(MAKE_CHECK_TARGET)
4504bb5 @alk moved extra makefiles inclusions to bottom
alk authored
355
4678ee8 @alk fixed replace-wrappers to always replace {memcached,moxi}.orig
alk authored
356 replace-wrappers: $(WRAPPERS) all
357 mv $(PREFIX)/bin/memcached $(PREFIX)/bin/memcached.orig
358 mv $(PREFIX)/bin/moxi $(PREFIX)/bin/moxi.orig
62a7960 @alk added replace-wrappers make target
alk authored
359 sed -e 's|/bin/memcached|/bin/memcached.orig|g' <$(PREFIX)/bin/memcached-wrapper >$(PREFIX)/bin/memcached
360 sed -e 's|/bin/moxi|/bin/moxi.orig|g' <$(PREFIX)/bin/moxi-wrapper >$(PREFIX)/bin/moxi
361 chmod +x $(PREFIX)/bin/memcached $(PREFIX)/bin/moxi
362
a0230e2 @alk don't depend on tlm/Makefile.top. Fixes src tarballs. MB-4621
alk authored
363 ifneq "$(realpath tlm/Makefile.top)" ""
60f686f @alk automagically update top-level Makefile
alk authored
364 Makefile: tlm/Makefile.top
365 rm -f $@
366 cp $< $@
a0230e2 @alk don't depend on tlm/Makefile.top. Fixes src tarballs. MB-4621
alk authored
367 endif
60f686f @alk automagically update top-level Makefile
alk authored
368
4504bb5 @alk moved extra makefiles inclusions to bottom
alk authored
369 # Allow the user to override stuff for all projects (like
370 # --with-erlang=)
371 ifneq "$(realpath $(HOME)/.couchbase/build/Makefile.extra)" ""
372 include $(HOME)/.couchbase/build/Makefile.extra
373 endif
374
375 # this thing can override settings and add components
376 ifneq "$(realpath .repo/Makefile.extra)" ""
377 include .repo/Makefile.extra
378 endif
Something went wrong with that request. Please try again.