Makefile.am 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. # Automake file
  2. # Nonstandard package files for distribution
  3. EXTRA_DIST = \
  4. CHANGES \
  5. CONTRIBUTORS \
  6. include/gtest/gtest-param-test.h.pump \
  7. include/gtest/internal/gtest-tuple.h.pump \
  8. include/gtest/internal/gtest-type-util.h.pump \
  9. include/gtest/internal/gtest-param-util-generated.h.pump \
  10. make/Makefile \
  11. scripts/fuse_gtest_files.py \
  12. scripts/gen_gtest_pred_impl.py \
  13. scripts/pump.py \
  14. scripts/test/Makefile
  15. # gtest source files that we don't compile directly. They are
  16. # #included by gtest-all.cc.
  17. GTEST_SRC = \
  18. src/gtest.cc \
  19. src/gtest-death-test.cc \
  20. src/gtest-filepath.cc \
  21. src/gtest-internal-inl.h \
  22. src/gtest-port.cc \
  23. src/gtest-test-part.cc \
  24. src/gtest-typed-test.cc
  25. EXTRA_DIST += $(GTEST_SRC)
  26. # Sample files that we don't compile.
  27. EXTRA_DIST += \
  28. samples/prime_tables.h \
  29. samples/sample2_unittest.cc \
  30. samples/sample3_unittest.cc \
  31. samples/sample4_unittest.cc \
  32. samples/sample5_unittest.cc \
  33. samples/sample6_unittest.cc \
  34. samples/sample7_unittest.cc \
  35. samples/sample8_unittest.cc \
  36. samples/sample9_unittest.cc
  37. # C++ test files that we don't compile directly.
  38. EXTRA_DIST += \
  39. test/gtest-death-test_test.cc \
  40. test/gtest_environment_test.cc \
  41. test/gtest-filepath_test.cc \
  42. test/gtest-linked_ptr_test.cc \
  43. test/gtest-message_test.cc \
  44. test/gtest_no_test_unittest.cc \
  45. test/gtest-options_test.cc \
  46. test/gtest-param-test_test.cc \
  47. test/gtest-param-test2_test.cc \
  48. test/gtest-param-test_test.h \
  49. test/gtest-port_test.cc \
  50. test/gtest_pred_impl_unittest.cc \
  51. test/gtest_prod_test.cc \
  52. test/production.cc \
  53. test/production.h \
  54. test/gtest_repeat_test.cc \
  55. test/gtest_sole_header_test.cc \
  56. test/gtest_stress_test.cc \
  57. test/gtest-test-part_test.cc \
  58. test/gtest_throw_on_failure_ex_test.cc \
  59. test/gtest-typed-test_test.cc \
  60. test/gtest-typed-test2_test.cc \
  61. test/gtest-typed-test_test.h \
  62. test/gtest_unittest.cc \
  63. test/gtest-unittest-api_test.cc \
  64. test/gtest-listener_test.cc \
  65. test/gtest_main_unittest.cc \
  66. test/gtest_unittest.cc \
  67. test/gtest-tuple_test.cc \
  68. test/gtest-param-test_test.cc \
  69. test/gtest-param-test2_test.cc \
  70. test/gtest_break_on_failure_unittest_.cc \
  71. test/gtest_color_test_.cc \
  72. test/gtest_env_var_test_.cc \
  73. test/gtest_filter_unittest_.cc \
  74. test/gtest_help_test_.cc \
  75. test/gtest_list_tests_unittest_.cc \
  76. test/gtest_output_test_.cc \
  77. test/gtest_shuffle_test_.cc \
  78. test/gtest_throw_on_failure_test_.cc \
  79. test/gtest_uninitialized_test_.cc \
  80. test/gtest_xml_outfile1_test_.cc \
  81. test/gtest_xml_outfile2_test_.cc \
  82. test/gtest_xml_output_unittest_.cc
  83. # Python tests that we don't run.
  84. EXTRA_DIST += \
  85. test/gtest_test_utils.py \
  86. test/gtest_xml_test_utils.py \
  87. test/gtest_break_on_failure_unittest.py \
  88. test/gtest_color_test.py \
  89. test/gtest_env_var_test.py \
  90. test/gtest_filter_unittest.py \
  91. test/gtest_help_test.py \
  92. test/gtest_list_tests_unittest.py \
  93. test/gtest_output_test.py \
  94. test/gtest_output_test_golden_lin.txt \
  95. test/gtest_output_test_golden_win.txt \
  96. test/gtest_shuffle_test.py \
  97. test/gtest_throw_on_failure_test.py \
  98. test/gtest_uninitialized_test.py \
  99. test/gtest_xml_outfiles_test.py \
  100. test/gtest_xml_output_unittest.py \
  101. test/run_tests_util.py \
  102. test/run_tests_util_test.py
  103. # CMake script
  104. EXTRA_DIST += \
  105. CMakeLists.txt
  106. # MSVC project files
  107. EXTRA_DIST += \
  108. msvc/gtest-md.sln \
  109. msvc/gtest.sln \
  110. msvc/gtest-md.vcproj \
  111. msvc/gtest.vcproj \
  112. msvc/gtest_main-md.vcproj \
  113. msvc/gtest_main.vcproj \
  114. msvc/gtest_prod_test-md.vcproj \
  115. msvc/gtest_prod_test.vcproj \
  116. msvc/gtest_unittest-md.vcproj \
  117. msvc/gtest_unittest.vcproj
  118. # xcode project files
  119. EXTRA_DIST += \
  120. xcode/Config/DebugProject.xcconfig \
  121. xcode/Config/FrameworkTarget.xcconfig \
  122. xcode/Config/General.xcconfig \
  123. xcode/Config/ReleaseProject.xcconfig \
  124. xcode/Config/StaticLibraryTarget.xcconfig \
  125. xcode/Config/TestTarget.xcconfig \
  126. xcode/Resources/Info.plist \
  127. xcode/Scripts/versiongenerate.py \
  128. xcode/Scripts/runtests.sh \
  129. xcode/gtest.xcodeproj/project.pbxproj
  130. # xcode sample files
  131. EXTRA_DIST += \
  132. xcode/Samples/FrameworkSample/Info.plist \
  133. xcode/Samples/FrameworkSample/runtests.sh \
  134. xcode/Samples/FrameworkSample/widget_test.cc \
  135. xcode/Samples/FrameworkSample/widget.cc \
  136. xcode/Samples/FrameworkSample/widget.h \
  137. xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj
  138. # C++Builder project files
  139. EXTRA_DIST += \
  140. codegear/gtest_all.cc \
  141. codegear/gtest_link.cc \
  142. codegear/gtest.cbproj \
  143. codegear/gtest_main.cbproj \
  144. codegear/gtest_unittest.cbproj \
  145. codegear/gtest.groupproj
  146. # Scripts and utilities
  147. bin_SCRIPTS = scripts/gtest-config
  148. CLEANFILES = $(bin_SCRIPTS)
  149. # Distribute and install M4 macro
  150. m4datadir = $(datadir)/aclocal
  151. m4data_DATA = m4/gtest.m4
  152. EXTRA_DIST += $(m4data_DATA)
  153. # We define the global AM_CPPFLAGS as everything we compile includes from these
  154. # directories.
  155. AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include
  156. # Modifies compiler and linker flags for pthreads compatibility.
  157. if HAVE_PTHREADS
  158. AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1
  159. AM_LIBS = @PTHREAD_LIBS@
  160. else
  161. AM_CXXFLAGS = -DGTEST_HAS_PTHREAD=0
  162. endif
  163. # Build rules for libraries.
  164. lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la
  165. lib_libgtest_la_SOURCES = src/gtest-all.cc
  166. pkginclude_HEADERS = include/gtest/gtest.h \
  167. include/gtest/gtest-death-test.h \
  168. include/gtest/gtest-message.h \
  169. include/gtest/gtest-param-test.h \
  170. include/gtest/gtest_pred_impl.h \
  171. include/gtest/gtest_prod.h \
  172. include/gtest/gtest-spi.h \
  173. include/gtest/gtest-test-part.h \
  174. include/gtest/gtest-typed-test.h
  175. pkginclude_internaldir = $(pkgincludedir)/internal
  176. pkginclude_internal_HEADERS = \
  177. include/gtest/internal/gtest-death-test-internal.h \
  178. include/gtest/internal/gtest-filepath.h \
  179. include/gtest/internal/gtest-internal.h \
  180. include/gtest/internal/gtest-linked_ptr.h \
  181. include/gtest/internal/gtest-param-util-generated.h \
  182. include/gtest/internal/gtest-param-util.h \
  183. include/gtest/internal/gtest-port.h \
  184. include/gtest/internal/gtest-string.h \
  185. include/gtest/internal/gtest-tuple.h \
  186. include/gtest/internal/gtest-type-util.h
  187. lib_libgtest_main_la_SOURCES = src/gtest_main.cc
  188. lib_libgtest_main_la_LIBADD = lib/libgtest.la
  189. # Bulid rules for samples and tests. Automake's naming for some of
  190. # these variables isn't terribly obvious, so this is a brief
  191. # reference:
  192. #
  193. # TESTS -- Programs run automatically by "make check"
  194. # check_PROGRAMS -- Programs built by "make check" but not necessarily run
  195. noinst_LTLIBRARIES = samples/libsamples.la
  196. samples_libsamples_la_SOURCES = samples/sample1.cc \
  197. samples/sample1.h \
  198. samples/sample2.cc \
  199. samples/sample2.h \
  200. samples/sample3-inl.h \
  201. samples/sample4.cc \
  202. samples/sample4.h
  203. TESTS=
  204. TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \
  205. GTEST_BUILD_DIR="$(top_builddir)/test"
  206. check_PROGRAMS=
  207. # A simple sample on using gtest.
  208. TESTS += samples/sample1_unittest
  209. check_PROGRAMS += samples/sample1_unittest
  210. samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc
  211. samples_sample1_unittest_LDADD = lib/libgtest_main.la \
  212. samples/libsamples.la
  213. # Another sample. It also verifies that libgtest works.
  214. TESTS += samples/sample10_unittest
  215. check_PROGRAMS += samples/sample10_unittest
  216. samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc
  217. samples_sample10_unittest_LDADD = lib/libgtest.la
  218. # This tests most constructs of gtest and verifies that libgtest_main
  219. # works.
  220. TESTS += test/gtest_all_test
  221. check_PROGRAMS += test/gtest_all_test
  222. test_gtest_all_test_SOURCES = test/gtest_all_test.cc
  223. test_gtest_all_test_LDADD = lib/libgtest_main.la
  224. # Tests that fused gtest files compile and work.
  225. FUSED_GTEST_SRC = \
  226. fused-src/gtest/gtest-all.cc \
  227. fused-src/gtest/gtest_main.cc \
  228. fused-src/gtest/gtest.h
  229. TESTS += test/fused_gtest_test
  230. check_PROGRAMS += test/fused_gtest_test
  231. test_fused_gtest_test_SOURCES = $(FUSED_GTEST_SRC) \
  232. samples/sample1.cc samples/sample1_unittest.cc
  233. test_fused_gtest_test_CPPFLAGS = -I"$(srcdir)/fused-src"
  234. # Build rules for putting fused Google Test files into the distribution
  235. # package. The user can also create those files by manually running
  236. # scripts/fuse_gtest_files.py.
  237. $(test_fused_gtest_test_SOURCES): fused-gtest
  238. fused-gtest: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
  239. $(GTEST_SRC) src/gtest-all.cc src/gtest_main.cc \
  240. scripts/fuse_gtest_files.py
  241. mkdir -p "$(srcdir)/fused-src"
  242. chmod -R u+w "$(srcdir)/fused-src"
  243. rm -f "$(srcdir)/fused-src/gtest/gtest-all.cc"
  244. rm -f "$(srcdir)/fused-src/gtest/gtest.h"
  245. "$(srcdir)/scripts/fuse_gtest_files.py" "$(srcdir)/fused-src"
  246. cp -f "$(srcdir)/src/gtest_main.cc" "$(srcdir)/fused-src/gtest/"
  247. maintainer-clean-local:
  248. rm -rf "$(srcdir)/fused-src"
  249. # Death tests may produce core dumps in the build directory. In case
  250. # this happens, clean them to keep distcleancheck happy.
  251. CLEANFILES += core