1# PLEASE NOTE: This Makefile is provided as a convenience for those
2# who do not wish to interact with CMake. It is NOT SUPPORTED by the
3# Couchbase build team, and the production builds do NOT make use of
4# it, so bugs filed against it will need to be handled by those devs
5# who care to use it.
6
7ROOT:=$(CURDIR)
8PREFIX:=$(ROOT)/install
9MAKEFLAGS=--no-print-directory
10
11PASSTHRU_TARGETS=all analytics-install analyze clean clean-all clean-xfd clean-xfd-hard \
12  e2etest e2eviewtests geocouch-build-for-testing install reset run-mats test build/Makefile
13
14$(PASSTHRU_TARGETS):
15	@$(MAKE) -f Makefile \
16            MAKETYPE="Unix Makefiles" \
17            PREFIX="$(PREFIX)" CHMODCMD="chmod u+w" CP=cp \
18            SEPARATOR=/ RM=rm RMOPTS=-rf $@
19
20DEPS_DIR := $(ROOT)/tlm/deps/packages
21
22# it's a little wasteful to call cmake all the time, but the code path taken
23# there might depend on the presence/absence of downloaded dependencies
24.PHONY: build_deps deps-all
25build_deps:
26	mkdir -p build_deps
27	(cd build_deps && cmake $(DEPS_DIR))
28
29dep-%: build_deps
30	$(MAKE) -C "build_deps" $(@:dep-%=build-and-cache-%)
31
32deps-all: build_deps
33	$(MAKE) -C "build_deps" build-and-cache-all
34