blob: 08a6b2bc75a8b80c0faa245a15d1f0ff0534a124 [file] [log] [blame]
shiqiane35fdd92008-12-10 05:08:54 +00001# Nonstandard package files for distribution.
2EXTRA_DIST =
3
shiqiana92e4962008-12-10 18:34:33 +00004# We may need to build our internally packaged gtest. If so, it will be
5# included in the 'subdirs' variable.
6SUBDIRS = $(subdirs)
7
shiqiane35fdd92008-12-10 05:08:54 +00008# Scripts and utilities to be installed by 'make install'.
9dist_bin_SCRIPTS = scripts/gmock_doctor.py
shiqian281b1d22008-12-11 00:13:55 +000010bin_SCRIPTS = scripts/gmock-config
11
12# This is generated by the configure script, so clean it for distribution.
13DISTCLEANFILES = scripts/gmock-config
shiqiane35fdd92008-12-10 05:08:54 +000014
15# We define the global AM_CPPFLAGS as everything we compile includes from these
16# directories.
17AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I$(srcdir)/include
18
19# Build rules for libraries.
20lib_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
21
22lib_libgmock_la_SOURCES = src/gmock.cc \
23 src/gmock-cardinalities.cc \
24 src/gmock-internal-utils.cc \
25 src/gmock-matchers.cc \
26 src/gmock-printers.cc \
27 src/gmock-spec-builders.cc
28
29pkginclude_HEADERS = include/gmock/gmock.h \
30 include/gmock/gmock-actions.h \
31 include/gmock/gmock-cardinalities.h \
32 include/gmock/gmock-generated-actions.h \
33 include/gmock/gmock-generated-function-mockers.h \
34 include/gmock/gmock-generated-matchers.h \
35 include/gmock/gmock-generated-nice-strict.h \
36 include/gmock/gmock-matchers.h \
37 include/gmock/gmock-printers.h \
38 include/gmock/gmock-spec-builders.h
39
40pkginclude_internaldir = $(pkgincludedir)/internal
41pkginclude_internal_HEADERS = \
42 include/gmock/internal/gmock-generated-internal-utils.h \
43 include/gmock/internal/gmock-internal-utils.h \
44 include/gmock/internal/gmock-port.h
45
46lib_libgmock_main_la_SOURCES = src/gmock_main.cc
47lib_libgmock_main_la_LIBADD = lib/libgmock.la
48
49# Build rules for tests. Automake's naming for some of these variables isn't
50# terribly obvious, so this is a brief reference:
51#
52# TESTS -- Programs run automatically by "make check"
53# check_PROGRAMS -- Programs built by "make check" but not necessarily run
54
55TESTS=
56TESTS_ENVIRONMENT = GMOCK_SOURCE_DIR="$(srcdir)/test" \
57 GMOCK_BUILD_DIR="$(top_builddir)/test"
58check_PROGRAMS=
59AM_LDFLAGS = $(GTEST_LDFLAGS)
60
61TESTS += test/gmock-actions_test
62check_PROGRAMS += test/gmock-actions_test
63test_gmock_actions_test_SOURCES = test/gmock-actions_test.cc
64test_gmock_actions_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la
65
66TESTS += test/gmock-cardinalities_test
67check_PROGRAMS += test/gmock-cardinalities_test
68test_gmock_cardinalities_test_SOURCES = test/gmock-cardinalities_test.cc
69test_gmock_cardinalities_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la
70
71TESTS += test/gmock-generated-actions_test
72check_PROGRAMS += test/gmock-generated-actions_test
73test_gmock_generated_actions_test_SOURCES = test/gmock-generated-actions_test.cc
74test_gmock_generated_actions_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la
75
76TESTS += test/gmock-generated-function-mockers_test
77check_PROGRAMS += test/gmock-generated-function-mockers_test
78test_gmock_generated_function_mockers_test_SOURCES = \
79 test/gmock-generated-function-mockers_test.cc
80test_gmock_generated_function_mockers_test_LDADD = $(GTEST_LIBS) \
81 lib/libgmock_main.la
82
83TESTS += test/gmock-generated-internal-utils_test
84check_PROGRAMS += test/gmock-generated-internal-utils_test
85test_gmock_generated_internal_utils_test_SOURCES = \
86 test/gmock-generated-internal-utils_test.cc
87test_gmock_generated_internal_utils_test_LDADD = $(GTEST_LIBS) \
88 lib/libgmock_main.la
89
90TESTS += test/gmock-generated-matchers_test
91check_PROGRAMS += test/gmock-generated-matchers_test
92test_gmock_generated_matchers_test_SOURCES = \
93 test/gmock-generated-matchers_test.cc
94test_gmock_generated_matchers_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la
95
96TESTS += test/gmock-internal-utils_test
97check_PROGRAMS += test/gmock-internal-utils_test
98test_gmock_internal_utils_test_SOURCES = test/gmock-internal-utils_test.cc
99test_gmock_internal_utils_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la
100
101TESTS += test/gmock_link_test
102check_PROGRAMS += test/gmock_link_test
103test_gmock_link_test_SOURCES = test/gmock_link_test.cc \
zhanyong.wan38ca64d2009-02-19 22:30:22 +0000104 test/gmock_link2_test.cc \
105 test/gmock_link_test.h
shiqiane35fdd92008-12-10 05:08:54 +0000106test_gmock_link_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la
107
108TESTS += test/gmock-matchers_test
109check_PROGRAMS += test/gmock-matchers_test
110test_gmock_matchers_test_SOURCES = test/gmock-matchers_test.cc
111test_gmock_matchers_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la
112
113TESTS += test/gmock-nice-strict_test
114check_PROGRAMS += test/gmock-nice-strict_test
115test_gmock_nice_strict_test_SOURCES = test/gmock-nice-strict_test.cc
116test_gmock_nice_strict_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la
117
118TESTS += test/gmock-port_test
119check_PROGRAMS += test/gmock-port_test
120test_gmock_port_test_SOURCES = test/gmock-port_test.cc
121test_gmock_port_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la
122
123TESTS += test/gmock-printers_test
124check_PROGRAMS += test/gmock-printers_test
125test_gmock_printers_test_SOURCES = test/gmock-printers_test.cc
126test_gmock_printers_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la
127
128TESTS += test/gmock-spec-builders_test
129check_PROGRAMS += test/gmock-spec-builders_test
130test_gmock_spec_builders_test_SOURCES = test/gmock-spec-builders_test.cc
131test_gmock_spec_builders_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la
132
133TESTS += test/gmock_test
134check_PROGRAMS += test/gmock_test
135test_gmock_test_SOURCES = test/gmock_test.cc
136test_gmock_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la
137
138# The following tests depend on the presence of a Python installation and are
139# keyed off of it. We only add them to the TESTS variable when a Python
140# interpreter is available. TODO(chandlerc@google.com): While we currently only
141# attempt to build and execute these tests if Autoconf has found Python v2.3 on
142# the system, we don't use the PYTHON variable it specified as the valid
143# interpreter. The problem is that TESTS_ENVIRONMENT is a global variable, and
144# thus we cannot distinguish between C++ unit tests and Python unit tests.
145dist_check_SCRIPTS =
146
147# Python modules used by multiple Python tests below.
148dist_check_SCRIPTS += test/gmock_test_utils.py
149
150check_PROGRAMS += test/gmock_output_test_
151test_gmock_output_test__SOURCES = test/gmock_output_test_.cc
152test_gmock_output_test__LDADD = $(GTEST_LIBS) lib/libgmock_main.la
153dist_check_SCRIPTS += test/gmock_output_test.py
154EXTRA_DIST += test/gmock_output_test_golden.txt
155
156# Enable all the python driven tests when we can run them.
157if HAVE_PYTHON
158TESTS += test/gmock_output_test.py
159endif
160
161# Nonstandard package files for distribution.
162EXTRA_DIST += \
163 CHANGES \
164 CONTRIBUTORS \
165 make/Makefile \
166 src/gmock-all.cc
167
168# Pump scripts for generating Google Mock headers.
169# TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump.
170EXTRA_DIST += include/gmock/gmock-generated-actions.h.pump \
171 include/gmock/gmock-generated-function-mockers.h.pump \
172 include/gmock/gmock-generated-matchers.h.pump \
173 include/gmock/gmock-generated-nice-strict.h.pump \
174 include/gmock/internal/gmock-generated-internal-utils.h.pump
175
176# The Google Mock Generator tool from the cppclean project.
177EXTRA_DIST += \
178 scripts/generator/COPYING \
179 scripts/generator/README \
180 scripts/generator/README.cppclean \
181 scripts/generator/cpp/__init__.py \
182 scripts/generator/cpp/ast.py \
183 scripts/generator/cpp/gmock_class.py \
184 scripts/generator/cpp/keywords.py \
185 scripts/generator/cpp/tokenize.py \
186 scripts/generator/cpp/utils.py \
187 scripts/generator/gmock_gen.py
188
shiqianc6cece72008-12-10 07:50:41 +0000189# Microsoft Visual Studio 2005 projects.
190EXTRA_DIST += \
191 msvc/gmock.sln \
192 msvc/gmock.vcproj \
193 msvc/gmock_config.vsprops \
194 msvc/gmock_link_test.vcproj \
195 msvc/gmock_main.vcproj \
196 msvc/gmock_output_test_.vcproj \
197 msvc/gmock_test.vcproj