forked from couchbase/tlm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·99 lines (77 loc) · 2.9 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# -*- Mode: makefile -*-
# PLEASE NOTE: This Makefile is provided as a convenience for those
# who do not wish to interact with CMake. It is NOT SUPPORTED by the
# Couchbase build team, and the production builds do NOT make use of
# it, so bugs filed against it will need to be handled by those devs
# who care to use it.
# The default destination for installing. CMake will also search for
# dependencies in this directory, so you may pre-build dependencies
# that you wish to ship with your compiled Couchbase into this
# directory.
PREFIX=$(MAKEDIR)\\install
# The makefile type to generate
MAKETYPE=NMake Makefiles
# The command used to delete directories
RM=rmdir
# Options passed to the command to nuke directories
RMOPTS=/Q /S
# The kind of build type: Debug, Release, RelWithDebInfo or MinSizeRel
BUILD_TYPE=RelWithDebInfo
# Other options you would like to pass to cmake
EXTRA_CMAKE_OPTIONS=
# Command used to remove read only flag for files
CHMODCMD=attrib -r
# Command used for copying files
CP=copy
# path separator
SEPARATOR=\\
CMAKE=cmake
CMAKE_ARGS=-G "$(MAKETYPE)" -D CMAKE_INSTALL_PREFIX="$(PREFIX)" \
-D CMAKE_PREFIX_PATH="$(CMAKE_PREFIX_PATH);$(PREFIX)" \
-D PRODUCT_VERSION=$(PRODUCT_VERSION) \
-D BUILD_ENTERPRISE=$(BUILD_ENTERPRISE) \
-D CMAKE_BUILD_TYPE=$(BUILD_TYPE) \
$(EXTRA_CMAKE_OPTIONS)
all: CMakeLists.txt Makefile GNUmakefile build/Makefile compile
compile: build/Makefile
(cd build && $(MAKE) all install)
test: all
(cd build && $(MAKE) test)
build/Makefile: CMakeLists.txt
@-mkdir build
(cd build && $(CMAKE) $(CMAKE_ARGS) ..)
CMakeLists.txt: tlm/CMakeLists.txt
$(CHMODCMD) CMakeLists.txt
$(CP) tlm$(SEPARATOR)CMakeLists.txt CMakeLists.txt
GNUmakefile: tlm/GNUmakefile
$(CHMODCMD) GNUmakefile
$(CP) tlm$(SEPARATOR)GNUmakefile GNUmakefile
Makefile: tlm/Makefile
$(CHMODCMD) Makefile
$(CP) tlm$(SEPARATOR)Makefile Makefile
# Invoke static analyser. Requires Clang Static Analyser
# (http://clang-analyzer.llvm.org). See tlm/README.markdown for more
# information.
analyze:
@-mkdir build-analyzer
(cd build-analyzer && \
scan-build --use-analyzer=Xcode $(CMAKE) $(CMAKE_ARGS) .. && \
scan-build --use-analyzer=Xcode -o analyser-results/ $(MAKE) all)
# geocouch needs a special build for running the unit tests
geocouch-build-for-testing: compile
@-mkdir build/geocouch-for-tests
(cd build/geocouch-for-tests && \
$(CMAKE) $(CMAKE_ARGS) -D GEOCOUCH_BUILD_FOR_UNIT_TESTS=1 ../../geocouch && \
$(MAKE))
run-mats:
cd testrunner && $(MAKE) simple-test
e2etest:
cd testrunner && $(MAKE) test
e2eviewtests:
cd testrunner && $(MAKE) test-views
clean:
-$(RM) $(RMOPTS) build $(PREFIX) godeps$(SEPARATOR)pkg goproj$(SEPARATOR)bin goproj$(SEPARATOR)pkg
clean-xfd: clean
cd ns_server && git clean -dfxq
clean-xfd-hard: clean-xfd
clean-all: clean-xfd-hard