This repository has been archived by the owner on Nov 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile.am
295 lines (259 loc) · 8.95 KB
/
Makefile.am
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# -- Boilerplate --
#
# Enable non-recursive builds and register m4 macros.
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
# Install location for pkg-config manifest
pkgconfigdir = $(libdir)/pkgconfig
# -- Initialize used variables --
#
# Since different components must share these, all are required to append (+=) to these instead of
# assigning. Therefore each needs an empty initialization.
check_LIBRARIES =
check_PROGRAMS =
CLEANFILES =
DISTCLEANFILES =
dist_doc_DATA =
EXTRA_DIST =
install_data_hooks =
MAINTAINERCLEANFILES =
MOSTLYCLEANFILES =
nobase_include_HEADERS =
nodist_pkgconfig_DATA = sauce/sauce.pc
SUBDIRS =
TESTS =
TESTS_ENVIRONMENT =
uninstall_hooks =
# Instead of (over)writing local rule definitions, components are required to wrap their work in a
# new rule and append its name to one of these. The actual local rules are at the bottom.
check_locals =
clean_locals =
distclean_locals =
maintainerclean_locals =
mostlyclean_locals =
# Clean up base auto* output
MAINTAINERCLEANFILES += \
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
aclocal.m4 \
build-aux/config.guess \
build-aux/config.rpath \
build-aux/config.rpath~ \
build-aux/config.sub \
build-aux/depcomp \
build-aux/install-sh \
build-aux/ltmain.sh \
build-aux/missing \
config.h.in~ \
configure \
configure.ac~ \
Makefile.in
# -- Source and Tests --
#
nobase_include_HEADERS += \
sauce/binder.h \
sauce/exceptions.h \
sauce/injector.h \
sauce/internal/apply_variadic.h \
sauce/internal/apply_variadic.h.pump \
sauce/internal/base_injector.h \
sauce/internal/binding.h \
sauce/internal/bindings.h \
sauce/internal/clause.h \
sauce/internal/disposal_deleter.h \
sauce/internal/implicit_bindings.h \
sauce/internal/implicit_provider_binding.h \
sauce/internal/injector_binding.h \
sauce/internal/instance_binding.h \
sauce/internal/key.h \
sauce/internal/locker_factory.h \
sauce/internal/memory/boost.h \
sauce/internal/memory/std.h \
sauce/internal/memory/tr1.h \
sauce/internal/method_binding.h \
sauce/internal/new_binding.h \
sauce/internal/opaque_binding.h \
sauce/internal/pending_thrower.h \
sauce/internal/provider_binding.h \
sauce/internal/resolved_binding.h \
sauce/internal/scope_cache.h \
sauce/internal/self_injector.h \
sauce/internal/type_id.h \
sauce/memory.h \
sauce/modules.h \
sauce/named.h \
sauce/provider.h \
sauce/sauce.h \
sauce/scopes.h
EXTRA_DIST += \
sauce/binder.h \
sauce/exceptions.h \
sauce/injector.h \
sauce/internal/apply_variadic.h \
sauce/internal/apply_variadic.h.pump \
sauce/internal/base_injector.h \
sauce/internal/binding.h \
sauce/internal/bindings.h \
sauce/internal/clause.h \
sauce/internal/disposal_deleter.h \
sauce/internal/implicit_bindings.h \
sauce/internal/implicit_provider_binding.h \
sauce/internal/injector_binding.h \
sauce/internal/instance_binding.h \
sauce/internal/key.h \
sauce/internal/locker_factory.h \
sauce/internal/memory/boost.h \
sauce/internal/memory/std.h \
sauce/internal/memory/tr1.h \
sauce/internal/method_binding.h \
sauce/internal/new_binding.h \
sauce/internal/opaque_binding.h \
sauce/internal/pending_thrower.h \
sauce/internal/provider_binding.h \
sauce/internal/resolved_binding.h \
sauce/internal/scope_cache.h \
sauce/internal/self_injector.h \
sauce/internal/type_id.h \
sauce/memory.h \
sauce/modules.h \
sauce/named.h \
sauce/provider.h \
sauce/sauce.h \
sauce/scopes.h \
test/allocate_with.h \
test/allocation_test.cc \
test/apply_variadic_test.cc \
test/binding_test.cc \
test/scope_test.cc \
test/tutorial_test.cc \
test/type_id_test.cc
TESTS += unittests
check_PROGRAMS += unittests
unittests_CPPFLAGS = \
-D$(SAUCE_UNIT_TEST_SHARED_PTR) \
-I$(srcdir) \
-I$(gtest)/include \
-I$(gmock)/include
# Drop -ansi as gtest/gmock break it (as caught by cygwin)
unittests_CXXFLAGS = -Wall -Wextra -Werror $(PTHREAD_CFLAGS)
unittests_SOURCES = \
test/allocation_test.cc \
test/apply_variadic_test.cc \
test/binding_test.cc \
test/scope_test.cc \
test/tutorial_test.cc \
test/type_id_test.cc
unittests_LDADD = \
$(builddir)/libunittest.a
gmock = $(srcdir)/vendor/gmock-1.7.0
gtest = $(gmock)/gtest
check_LIBRARIES += libunittest.a
libunittest_a_CPPFLAGS = \
-I$(gtest)/include \
-I$(gmock)/include \
-I$(gtest) \
-I$(gmock)
# Override default compiler and linker flags
# Forgive gtest/gmock's warnings
libunittest_a_CXXFLAGS = -w
# You can't extract these paths without breaking distcheck.
libunittest_a_SOURCES = \
vendor/gmock-1.7.0/gtest/include/gtest/gtest-death-test.h \
vendor/gmock-1.7.0/gtest/include/gtest/gtest-message.h \
vendor/gmock-1.7.0/gtest/include/gtest/gtest-param-test.h \
vendor/gmock-1.7.0/gtest/include/gtest/gtest-printers.h \
vendor/gmock-1.7.0/gtest/include/gtest/gtest-spi.h \
vendor/gmock-1.7.0/gtest/include/gtest/gtest-test-part.h \
vendor/gmock-1.7.0/gtest/include/gtest/gtest-typed-test.h \
vendor/gmock-1.7.0/gtest/include/gtest/gtest.h \
vendor/gmock-1.7.0/gtest/include/gtest/gtest_pred_impl.h \
vendor/gmock-1.7.0/gtest/include/gtest/gtest_prod.h \
vendor/gmock-1.7.0/gtest/include/gtest/internal/gtest-death-test-internal.h \
vendor/gmock-1.7.0/gtest/include/gtest/internal/gtest-filepath.h \
vendor/gmock-1.7.0/gtest/include/gtest/internal/gtest-internal.h \
vendor/gmock-1.7.0/gtest/include/gtest/internal/gtest-linked_ptr.h \
vendor/gmock-1.7.0/gtest/include/gtest/internal/gtest-param-util-generated.h \
vendor/gmock-1.7.0/gtest/include/gtest/internal/gtest-param-util.h \
vendor/gmock-1.7.0/gtest/include/gtest/internal/gtest-port.h \
vendor/gmock-1.7.0/gtest/include/gtest/internal/gtest-string.h \
vendor/gmock-1.7.0/gtest/include/gtest/internal/gtest-tuple.h \
vendor/gmock-1.7.0/gtest/include/gtest/internal/gtest-type-util.h \
vendor/gmock-1.7.0/gtest/src/gtest-all.cc \
vendor/gmock-1.7.0/gtest/src/gtest-internal-inl.h \
vendor/gmock-1.7.0/include/gmock/gmock-actions.h \
vendor/gmock-1.7.0/include/gmock/gmock-cardinalities.h \
vendor/gmock-1.7.0/include/gmock/gmock-generated-actions.h \
vendor/gmock-1.7.0/include/gmock/gmock-generated-function-mockers.h \
vendor/gmock-1.7.0/include/gmock/gmock-generated-matchers.h \
vendor/gmock-1.7.0/include/gmock/gmock-generated-nice-strict.h \
vendor/gmock-1.7.0/include/gmock/gmock-matchers.h \
vendor/gmock-1.7.0/include/gmock/gmock-more-actions.h \
vendor/gmock-1.7.0/include/gmock/gmock-spec-builders.h \
vendor/gmock-1.7.0/include/gmock/gmock.h \
vendor/gmock-1.7.0/include/gmock/internal/gmock-generated-internal-utils.h \
vendor/gmock-1.7.0/include/gmock/internal/gmock-internal-utils.h \
vendor/gmock-1.7.0/include/gmock/internal/gmock-port.h \
vendor/gmock-1.7.0/src/gmock-all.cc \
vendor/gmock-1.7.0/src/gmock_main.cc
EXTRA_libunittest_a_SOURCES = \
vendor/gmock-1.7.0/gtest/src/gtest.cc \
vendor/gmock-1.7.0/gtest/src/gtest-death-test.cc \
vendor/gmock-1.7.0/gtest/src/gtest-filepath.cc \
vendor/gmock-1.7.0/gtest/src/gtest-port.cc \
vendor/gmock-1.7.0/gtest/src/gtest-printers.cc \
vendor/gmock-1.7.0/gtest/src/gtest-test-part.cc \
vendor/gmock-1.7.0/gtest/src/gtest-typed-test.cc \
vendor/gmock-1.7.0/src/gmock-cardinalities.cc \
vendor/gmock-1.7.0/src/gmock-internal-utils.cc \
vendor/gmock-1.7.0/src/gmock-matchers.cc \
vendor/gmock-1.7.0/src/gmock-spec-builders.cc \
vendor/gmock-1.7.0/src/gmock.cc
# Prove we're strictly standards compatible, even if gmock/gtest is not.
TESTS += cxx98_pedantic_compilation_test
check_PROGRAMS += cxx98_pedantic_compilation_test
cxx98_pedantic_compilation_test_CPPFLAGS = \
-D$(SAUCE_UNIT_TEST_SHARED_PTR) \
-I$(builddir) \
-I$(srcdir)
cxx98_pedantic_compilation_test_CXXFLAGS = \
-Wall \
-Wextra \
-Werror \
-pedantic-errors \
-std=c++98
cxx98_pedantic_compilation_test_SOURCES = \
test/pedantic_compilation_test.cc
# -- Doxygen --
#
include m4/doxygen.am
EXTRA_DIST += Doxyfile
# Only if Doxygen is configured..
if DX_COND_doc
docpkg = $(PACKAGE_TARNAME)-doxy-$(PACKAGE_VERSION).tar.gz
dist_doc_DATA += $(docpkg)
$(docpkg): doxygen-doc
tar czf - doxygen-doc > $@
install_data_hooks += doxygen-install-data-hook
doxygen-install-data-hook:
cd $(DESTDIR)$(docdir) && tar xzf $(docpkg)
uninstall_hooks += doxygen-uninstall-hook
doxygen-uninstall-hook:
cd $(DESTDIR)$(docdir) && rm -rf doxygen-doc
DISTCLEANFILES += $(docpkg)
# Remove it on distclean
distclean_locals += clean-doxygen-doc
clean-doxygen-doc:
rm -rf doxygen-doc
endif DX_COND_doc
# -- Local rules --
#
# Generate templated headers from their "pump" sources
sauce/internal/apply_variadic.h: sauce/internal/apply_variadic.h.pump
vendor/pump.py $+
# This must be the last section so that the corrosponding variables have their final values.
check-local: $(check_locals)
clean-local: $(clean_locals)
distclean-local: $(distclean_locals)
install-data-hook: $(install_data_hooks)
maintainer-clean-local: $(maintainerclean_locals)
mostlyclean-local: $(mostlyclean_locals)
uninstall-hook: $(uninstall_hooks)