1 2ACLOCAL_AMFLAGS = -I m4 3 4CPPUTEST_TESTS = CppUTestTests 5CPPUTESTEXT_TESTS = CppUTestExtTests 6 7EXTRA_LIBRARIES = lib/libCppUTestExt.a 8EXTRA_PROGRAMS = CppUTestExtTests 9 10lib_LIBRARIES = lib/libCppUTest.a 11check_PROGRAMS = $(CPPUTEST_TESTS) 12 13if INCLUDE_CPPUTEST_EXT 14lib_LIBRARIES+= lib/libCppUTestExt.a 15check_PROGRAMS += $(CPPUTESTEXT_TESTS) 16endif 17 18if INCLUDE_GMOCKTESTS 19# check_PROGRAMS += GTestTests 20endif 21 22TESTS = $(check_PROGRAMS) 23 24pkgconfigdir = $(prefix)/libdata/pkgconfig 25pkgconfig_DATA = cpputest.pc 26 27cmakemodulesdir = $(libdir)/CppUTest/cmake/Modules 28cmakemodules_DATA = \ 29 cmake/Modules/CppUTestBuildTimeDiscoverTests.cmake 30 31cmakescriptsdir = $(libdir)/CppUTest/cmake/Scripts 32cmakescripts_DATA = \ 33 cmake/Scripts/CppUTestBuildTimeDiscoverTests.cmake 34 35cmakedir = $(libdir)/CppUTest/cmake 36cmake_DATA = \ 37 build/cmake_package_files/CppUTestConfig.cmake \ 38 build/cmake_package_files/CppUTestConfigVersion.cmake \ 39 build/cmake_package_files/CppUTestTargets-relwithdebinfo.cmake \ 40 build/cmake_package_files/CppUTestTargets.cmake 41 42EXTRA_DIST = \ 43 cpputest.pc.in \ 44 $(ALL_FILES_IN_GIT) 45 46lib_libCppUTest_a_CPPFLAGS = $(AM_CPPFLAGS) $(CPPUTEST_CPPFLAGS) $(CPPUTEST_ADDITIONAL_CPPFLAGS) 47lib_libCppUTest_a_CFLAGS = $(AM_CFLAGS) $(CPPUTEST_CFLAGS) $(CPPUTEST_ADDITIONAL_CFLAGS) 48lib_libCppUTest_a_CXXFLAGS = $(AM_CXXFLAGS) $(CPPUTEST_CXXFLAGS) $(CPPUTEST_ADDITIONAL_CXXFLAGS) 49 50lib_libCppUTest_a_SOURCES = \ 51 src/CppUTest/CommandLineArguments.cpp \ 52 src/CppUTest/CommandLineTestRunner.cpp \ 53 src/CppUTest/JUnitTestOutput.cpp \ 54 src/CppUTest/MemoryLeakDetector.cpp \ 55 src/CppUTest/MemoryLeakWarningPlugin.cpp \ 56 src/CppUTest/SimpleString.cpp \ 57 src/CppUTest/SimpleStringInternalCache.cpp \ 58 src/CppUTest/SimpleMutex.cpp \ 59 src/CppUTest/TeamCityTestOutput.cpp \ 60 src/CppUTest/TestFailure.cpp \ 61 src/CppUTest/TestFilter.cpp \ 62 src/CppUTest/TestHarness_c.cpp \ 63 src/CppUTest/TestMemoryAllocator.cpp \ 64 src/CppUTest/TestOutput.cpp \ 65 src/CppUTest/TestPlugin.cpp \ 66 src/CppUTest/TestRegistry.cpp \ 67 src/CppUTest/TestResult.cpp \ 68 src/CppUTest/TestTestingFixture.cpp \ 69 src/CppUTest/Utest.cpp \ 70 src/Platforms/@CPP_PLATFORM@/UtestPlatform.cpp 71 72include_cpputestdir = $(includedir)/CppUTest 73 74include_cpputest_HEADERS = \ 75 include/CppUTest/CommandLineArguments.h \ 76 include/CppUTest/CommandLineTestRunner.h \ 77 include/CppUTest/CppUTestConfig.h \ 78 include/CppUTest/JUnitTestOutput.h \ 79 include/CppUTest/MemoryLeakDetector.h \ 80 include/CppUTest/MemoryLeakDetectorMallocMacros.h \ 81 include/CppUTest/MemoryLeakDetectorNewMacros.h \ 82 include/CppUTest/MemoryLeakWarningPlugin.h \ 83 include/CppUTest/PlatformSpecificFunctions.h \ 84 include/CppUTest/PlatformSpecificFunctions_c.h \ 85 include/CppUTest/SimpleString.h \ 86 include/CppUTest/SimpleStringInternalCache.h \ 87 include/CppUTest/SimpleMutex.h \ 88 include/CppUTest/StandardCLibrary.h \ 89 include/CppUTest/TeamCityTestOutput.h \ 90 include/CppUTest/TestFailure.h \ 91 include/CppUTest/TestFilter.h \ 92 include/CppUTest/TestHarness.h \ 93 include/CppUTest/TestHarness_c.h \ 94 include/CppUTest/TestMemoryAllocator.h \ 95 include/CppUTest/TestOutput.h \ 96 include/CppUTest/TestPlugin.h \ 97 include/CppUTest/TestRegistry.h \ 98 include/CppUTest/TestResult.h \ 99 include/CppUTest/TestTestingFixture.h \ 100 include/CppUTest/Utest.h \ 101 include/CppUTest/UtestMacros.h \ 102 generated/CppUTestGeneratedConfig.h 103 104lib_libCppUTestExt_a_CPPFLAGS = $(lib_libCppUTest_a_CPPFLAGS) 105lib_libCppUTestExt_a_CFLAGS = $(lib_libCppUTest_a_CFLAGS) 106lib_libCppUTestExt_a_CXXFLAGS = $(lib_libCppUTest_a_CXXFLAGS) 107 108lib_libCppUTestExt_a_SOURCES = \ 109 src/CppUTestExt/CodeMemoryReportFormatter.cpp \ 110 src/CppUTestExt/GTest.cpp \ 111 src/CppUTestExt/IEEE754ExceptionsPlugin.cpp \ 112 src/CppUTestExt/MemoryReportAllocator.cpp \ 113 src/CppUTestExt/MemoryReporterPlugin.cpp \ 114 src/CppUTestExt/MemoryReportFormatter.cpp \ 115 src/CppUTestExt/MockActualCall.cpp \ 116 src/CppUTestExt/MockExpectedCall.cpp \ 117 src/CppUTestExt/MockExpectedCallsList.cpp \ 118 src/CppUTestExt/MockFailure.cpp \ 119 src/CppUTestExt/MockNamedValue.cpp \ 120 src/CppUTestExt/MockSupport.cpp \ 121 src/CppUTestExt/MockSupportPlugin.cpp \ 122 src/CppUTestExt/MockSupport_c.cpp \ 123 src/CppUTestExt/OrderedTest.cpp 124 125if INCLUDE_CPPUTEST_EXT 126include_cpputestextdir = $(includedir)/CppUTestExt 127 128include_cpputestext_HEADERS = \ 129 include/CppUTestExt/CodeMemoryReportFormatter.h \ 130 include/CppUTestExt/GMock.h \ 131 include/CppUTestExt/GTest.h \ 132 include/CppUTestExt/GTestSupport.h \ 133 include/CppUTestExt/GTestConvertor.h \ 134 include/CppUTestExt/IEEE754ExceptionsPlugin.h \ 135 include/CppUTestExt/MemoryReportAllocator.h \ 136 include/CppUTestExt/MemoryReporterPlugin.h \ 137 include/CppUTestExt/MemoryReportFormatter.h \ 138 include/CppUTestExt/MockActualCall.h \ 139 include/CppUTestExt/MockCheckedActualCall.h \ 140 include/CppUTestExt/MockCheckedExpectedCall.h \ 141 include/CppUTestExt/MockExpectedCall.h \ 142 include/CppUTestExt/MockExpectedCallsList.h \ 143 include/CppUTestExt/MockFailure.h \ 144 include/CppUTestExt/MockNamedValue.h \ 145 include/CppUTestExt/MockSupport.h \ 146 include/CppUTestExt/MockSupportPlugin.h \ 147 include/CppUTestExt/MockSupport_c.h \ 148 include/CppUTestExt/OrderedTest.h 149 150endif 151 152CppUTestTests_CPPFLAGS = $(lib_libCppUTest_a_CPPFLAGS) 153CppUTestTests_CFLAGS = $(lib_libCppUTest_a_CFLAGS) 154CppUTestTests_CXXFLAGS = $(lib_libCppUTest_a_CXXFLAGS) 155CppUTestTests_LDADD = lib/libCppUTest.a $(CPPUTEST_LDADD) 156CppUTestTests_LDFLAGS = $(AM_LDFLAGS) $(CPPUTEST_LDFLAGS) $(CPPUTEST_ADDITIONAL_LDFLAGS) 157 158CppUTestTests_SOURCES = \ 159 tests/CppUTest/AllocationInCFile.c \ 160 tests/CppUTest/AllocationInCppFile.cpp \ 161 tests/CppUTest/AllocLetTestFree.c \ 162 tests/CppUTest/AllocLetTestFreeTest.cpp \ 163 tests/CppUTest/AllTests.cpp \ 164 tests/CppUTest/CheatSheetTest.cpp \ 165 tests/CppUTest/CompatabilityTests.cpp \ 166 tests/CppUTest/CommandLineArgumentsTest.cpp \ 167 tests/CppUTest/CommandLineTestRunnerTest.cpp \ 168 tests/CppUTest/DummyMemoryLeakDetector.cpp \ 169 tests/CppUTest/JUnitOutputTest.cpp \ 170 tests/CppUTest/MemoryLeakDetectorTest.cpp \ 171 tests/CppUTest/MemoryOperatorOverloadTest.cpp \ 172 tests/CppUTest/MemoryLeakWarningTest.cpp \ 173 tests/CppUTest/PluginTest.cpp \ 174 tests/CppUTest/PreprocessorTest.cpp \ 175 tests/CppUTest/SetPluginTest.cpp \ 176 tests/CppUTest/SimpleStringTest.cpp \ 177 tests/CppUTest/SimpleStringCacheTest.cpp \ 178 tests/CppUTest/SimpleMutexTest.cpp \ 179 tests/CppUTest/TeamCityOutputTest.cpp \ 180 tests/CppUTest/TestFailureNaNTest.cpp \ 181 tests/CppUTest/TestFailureTest.cpp \ 182 tests/CppUTest/TestFilterTest.cpp \ 183 tests/CppUTest/TestHarness_cTest.cpp \ 184 tests/CppUTest/TestHarness_cTestCFile.c \ 185 tests/CppUTest/TestInstallerTest.cpp \ 186 tests/CppUTest/TestMemoryAllocatorTest.cpp \ 187 tests/CppUTest/TestOutputTest.cpp \ 188 tests/CppUTest/TestRegistryTest.cpp \ 189 tests/CppUTest/TestResultTest.cpp \ 190 tests/CppUTest/TestUTestMacro.cpp \ 191 tests/CppUTest/TestUTestStringMacro.cpp \ 192 tests/CppUTest/UtestTest.cpp \ 193 tests/CppUTest/UtestPlatformTest.cpp 194 195CppUTestExtTests_CPPFLAGS = $(lib_libCppUTestExt_a_CPPFLAGS) 196CppUTestExtTests_CFLAGS = $(lib_libCppUTestExt_a_CFLAGS) 197CppUTestExtTests_CXXFLAGS = $(lib_libCppUTestExt_a_CXXFLAGS) 198CppUTestExtTests_LDADD = lib/libCppUTestExt.a lib/libCppUTest.a $(CPPUTEST_LDADD) 199CppUTestExtTests_LDFLAGS = $(CppUTestTests_LDFLAGS) 200 201CppUTestExtTests_SOURCES = \ 202 tests/CppUTestExt/AllTests.cpp \ 203 tests/CppUTestExt/CodeMemoryReporterTest.cpp \ 204 tests/CppUTestExt/GMockTest.cpp \ 205 tests/CppUTestExt/GTest1Test.cpp \ 206 tests/CppUTestExt/GTest2ConvertorTest.cpp \ 207 tests/CppUTestExt/IEEE754PluginTest.cpp \ 208 tests/CppUTestExt/IEEE754PluginTest_c.c \ 209 tests/CppUTestExt/MemoryReportAllocatorTest.cpp \ 210 tests/CppUTestExt/MemoryReporterPluginTest.cpp \ 211 tests/CppUTestExt/MemoryReportFormatterTest.cpp \ 212 tests/CppUTestExt/MockActualCallTest.cpp \ 213 tests/CppUTestExt/MockCheatSheetTest.cpp \ 214 tests/CppUTestExt/MockCallTest.cpp \ 215 tests/CppUTestExt/MockComparatorCopierTest.cpp \ 216 tests/CppUTestExt/MockExpectedCallTest.cpp \ 217 tests/CppUTestExt/ExpectedFunctionsListTest.cpp \ 218 tests/CppUTestExt/MockFailureReporterForTest.cpp \ 219 tests/CppUTestExt/MockFailureTest.cpp \ 220 tests/CppUTestExt/MockHierarchyTest.cpp \ 221 tests/CppUTestExt/MockNamedValueTest.cpp \ 222 tests/CppUTestExt/MockParameterTest.cpp \ 223 tests/CppUTestExt/MockPluginTest.cpp \ 224 tests/CppUTestExt/MockSupportTest.cpp \ 225 tests/CppUTestExt/MockSupport_cTest.cpp \ 226 tests/CppUTestExt/MockSupport_cTestCFile.c \ 227 tests/CppUTestExt/MockStrictOrderTest.cpp \ 228 tests/CppUTestExt/MockReturnValueTest.cpp \ 229 tests/CppUTestExt/OrderedTestTest.cpp \ 230 tests/CppUTestExt/OrderedTestTest_c.c \ 231 tests/CppUTestExt/MockFakeLongLong.cpp 232 233DISTCLEANFILES = \ 234 filename.map.txt \ 235 generated/CppUTestGeneratedConfig.h 236 237if INCLUDE_GMOCKTESTS 238 239#GTestTests_CPPFLAGS = $(lib_libCppUTestExt_a_CPPFLAGS) 240#GTestTests_CFLAGS = $(lib_libCppUTestExt_a_CFLAGS) 241#GTestTests_CXXFLAGS = $(lib_libCppUTestExt_a_CXXFLAGS) -DCPPUTEST_USE_MEM_LEAK_DETECTION=0 -DGMOCK_RENAME_MAIN=1 -D_THREAD_SAFE -DGTEST_HAS_PTHREAD=1 242#GTestTests_LDADD = lib/libCppUTestExt.a lib/libCppUTest.a $(CPPUTEST_LDADD) 243#GTestTests_LDFLAGS = $(CppUTestTests_LDFLAGS) 244 245#GTestTests_SOURCES = \ 246 $(GMOCK_HOME)/test/gmock-spec-builders_test.cc \ 247 tests/CppUTestExt/AllTests.cpp 248endif 249 250RUN_CPPUTEST_TESTS = ./$(CPPUTEST_TESTS) 251RUN_CPPUTESTEXT_TESTS = ./$(CPPUTESTEXT_TESTS) 252 253valgrind: check 254 @if test "x$(CPPUTEST_HAS_VALGRIND)" = xno; then echo "Running the valgrind target without having valgrind. Perhaps install it first?"; exit 1; fi 255 valgrind --dsymutil=yes --suppressions=$(srcdir)/valgrind.suppressions --gen-suppressions=all --error-exitcode=1 ./$(CPPUTEST_TESTS) 256 257tdd: $(CPPUTEST_TESTS)$(EXEEXT) $(CPPUTESTEXT_TESTS)$(EXEEXT) 258 ./$(CPPUTEST_TESTS) 259if INCLUDE_CPPUTEST_EXT 260 ./$(CPPUTESTEXT_TESTS) 261endif 262 263cpputest_build_gtest18: 264 mkdir -p cpputest_build_gtest18 265 cd cpputest_build_gtest18; \ 266 wget https://github.com/google/googletest/archive/release-1.8.0.zip -O gtest-1.8.0.zip && unzip gtest-1.8.0.zip; \ 267 cd googletest-release-1.8.0; cmake .; make 268 269cpputest_build_gtest17: 270 mkdir -p cpputest_build_gtest17 271 cd cpputest_build_gtest17; \ 272 wget https://github.com/google/googletest/archive/release-1.7.0.zip -O gtest-1.7.0.zip && unzip gtest-1.7.0.zip; \ 273 wget https://github.com/google/googlemock/archive/release-1.7.0.zip -O gmock-1.7.0.zip && unzip gmock-1.7.0.zip; \ 274 mv googletest-release-1.7.0 googlemock-release-1.7.0/gtest; \ 275 cd googlemock-release-1.7.0; autoreconf -i; ./configure && make 276 277cpputest_build_gtest16: 278 mkdir -p cpputest_build_gtest16 279 cd cpputest_build_gtest16; \ 280 wget https://github.com/google/googletest/archive/release-1.6.0.zip -O gtest-1.6.0.zip && unzip gtest-1.6.0.zip; \ 281 wget https://github.com/google/googlemock/archive/release-1.6.0.zip -O gmock-1.6.0.zip && unzip gmock-1.6.0.zip; \ 282 mv googletest-release-1.6.0 googlemock-release-1.6.0/gtest; \ 283 cd googlemock-release-1.6.0; autoreconf -i; ./configure CXXFLAGS=-DGTEST_USE_OWN_TR1_TUPLE=1 && make 284 285cpputest_build_gtest15: 286 mkdir -p cpputest_build_gtest15 287 cd cpputest_build_gtest15; \ 288 wget https://github.com/google/googletest/archive/release-1.5.0.zip -O gtest-1.5.0.zip && unzip gtest-1.5.0.zip; \ 289 wget https://github.com/google/googlemock/archive/release-1.5.0.zip -O gmock-1.5.0.zip && unzip gmock-1.5.0.zip; \ 290 mv googletest-release-1.5.0 googlemock-release-1.5.0/gtest; \ 291 cd googlemock-release-1.5.0; autoreconf -i; ./configure CXXFLAGS=-DGTEST_USE_OWN_TR1_TUPLE=1 && make 292 293check_gtest15: cpputest_build_gtest15 294 @echo "Build using gmock 1.5"; 295 export GMOCK_HOME=`pwd`/cpputest_build_gtest15/googlemock-release-1.5.0; \ 296 make distclean; $(srcdir)/configure --enable-std-cpp98; make check 297 298check_gtest16: cpputest_build_gtest16 299 @echo "Build using gmock 1.6"; 300 export GMOCK_HOME=`pwd`/cpputest_build_gtest16/googlemock-release-1.6.0; \ 301 make distclean; $(srcdir)/configure --enable-std-cpp98; make check 302 303check_gtest17: cpputest_build_gtest17 304 @echo "Build using gmock 1.7" 305 export GMOCK_HOME=`pwd`/cpputest_build_gtest17/googlemock-release-1.7.0; \ 306 make distclean; $(srcdir)/configure --enable-std-cpp98; make check 307 308check_gtest18: cpputest_build_gtest18 309 @echo "Build using gmock 1.8" 310 export GMOCK_HOME=`pwd`/cpputest_build_gtest18/googletest-release-1.8.0/googlemock; \ 311 export GTEST_HOME=`pwd`/cpputest_build_gtest18/googletest-release-1.8.0/googletest; \ 312 make distclean; $(srcdir)/configure --enable-std-cpp98; make check 313 314remove_gtest_directories: 315 rm -rf cpputest_build_gtest15 316 rm -rf cpputest_build_gtest16 317 rm -rf cpputest_build_gtest17 318 rm -rf cpputest_build_gtest18 319 320check_gtest: remove_gtest_directories check_gtest15 check_gtest16 check_gtest17 check_gtest18 321 322check_basic: 323 @echo "If dash is available, run the configure with dash to find bash-isms and increase portability" 324 make distclean; if test "x$(CPPUTEST_HAS_DASH)" = xyes; then CONFIG_SHELL=dash $(srcdir)/configure; fi 325 326 @echo "Building and valgrinding (skipping this on MacOS due to buggy Valgrind" 327 if test "x$(CPPUTEST_ON_MACOSX)" = xno; then \ 328 make distclean; $(srcdir)/configure; make valgrind; \ 329 fi 330 331 @echo "Building without extensions" 332 make distclean; $(srcdir)/configure --disable-extensions; make check 333 334 @echo "Building with the Std C++ 98 turned on. Compiler acts differently then." 335 make distclean; $(srcdir)/configure --enable-std-cpp98; make 336 337 @echo "Building with the Std C++ 11 turned on. Compiler acts differently then." 338 make distclean; $(srcdir)/configure --enable-std-cpp11; make 339 340 @echo "Building with the Std C++ 14 turned on. Compiler acts differently then." 341 make distclean; $(srcdir)/configure --enable-std-cpp14; make 342 343 @echo "Building with the Std C++ 17 turned on. Compiler acts differently then." 344 make distclean; $(srcdir)/configure --enable-std-cpp17; make 345 346 @echo "Building with the Std C++ 20 turned on. Compiler acts differently then." 347 make distclean; $(srcdir)/configure --enable-std-cpp20; make 348 349 @echo "Building without the Standard C library" 350 make distclean; $(srcdir)/configure --disable-std-c; make 351 352 @echo "Building without the Standard C++ library and without long long" 353 make distclean; $(srcdir)/configure --disable-std-cpp --disable-long-long; make check 354 355 @echo "Building without memory leak detection" 356 make distclean; $(srcdir)/configure --disable-memory-leak-detection; make check 357 358 @echo "Building with address sanitizer" 359 make distclean; $(srcdir)/configure --enable-sanitize-address; make check 360 361 @echo "Building without memory leak detection and without Standard C++" 362 make distclean; $(srcdir)/configure --disable-memory-leak-detection --disable-std-cpp; make check 363 364 @echo "Generate a map file while building" 365 make distclean; $(srcdir)/configure -enable-generate-map-file; make check 366 if [ -s CppUTest.o.map.txt ]; then echo "Generating map file failed. Build failed!"; exit 1; fi 367 368check_special_situations: 369 @echo "Does the system have gcc? $(CPPUTEST_HAS_GCC)" 370 if test "x$(CPPUTEST_HAS_GCC)" = xyes; then echo "Compiling with gcc"; make distclean; $(srcdir)/configure CC="gcc" CXX="g++"; make check; fi 371 372 @echo "Does the system have clang and is a Mac? $(CPPUTEST_HAS_CLANG)" 373 if test "x$(CPPUTEST_HAS_CLANG)" = xyes && test "x$(CPPUTEST_ON_MACOSX)" = xyes; then \ 374 echo "Compiling with clang"; make distclean; $(srcdir)/configure CC="clang" CXX="clang++"; make check; \ 375 fi 376 377 @echo Testing JUnit output 378 make distclean; $(srcdir)/configure; make check 379 ./$(CPPUTEST_TESTS) -ojunit > junit_run_output 380 if [ -s junit_run_output ]; then echo "JUnit run has output. Build failed!"; exit 1; fi 381 rm junit_run_output; rm cpputest_*.xml 382 383 @echo "Building with all flags turned off" 384 make distclean; $(srcdir)/configure --disable-cpputest-flags CFLAGS="" CXXFLAGS="" CPPFLAGS="-I $(srcdir)/include -I$(srcdir)/include/CppUTestExt/CppUTestGTest -I$(srcdir)/include/CppUTestExt/CppUTestGMock" --disable-dependency-tracking; make check 385 386check_coverage: 387 @echo "Compile with coverage (switch to clang for Mac OSX)" 388 if test "x$(CPPUTEST_HAS_CLANG)" = xyes && test "x$(CPPUTEST_ON_MACOSX)" = xyes; then \ 389 echo "Compiling with clang"; make distclean; $(srcdir)/configure CC="clang" CXX="clang++" --enable-coverage CFLAGS="-O0" CXXFLAGS="-O0"; \ 390 else \ 391 make distclean; $(srcdir)/configure -enable-coverage CFLAGS="-O0" CXXFLAGS="-O0"; \ 392 fi 393 394 make check 395 396 ./$(CPPUTEST_TESTS) >> test_output.txt; ./$(CPPUTESTEXT_TESTS) >> test_output.txt 397 $(SILENCE)for f in `ls *.gcno` ; do \ 398 gcov $(CppUTestExtTests_SOURCES) $(CppUTestTests_SOURCES) $(lib_libCppUTest_a_SOURCES) $(lib_libCppUTestExt_a_SOURCES) -o $$f 1>>gcov_output.txt 2>>gcov_error.txt; \ 399 done 400 $(srcdir)/scripts/filterGcov.sh gcov_output.txt gcov_error.txt gcov_report.txt test_output.txt 401 cat gcov_report.txt 402 if test "x$(CPPUTEST_HAS_LCOV)" = xyes; then lcov -c -d . -o temp.info; lcov -r temp.info /usr\* -o coverage.info; genhtml -o test_coverage coverage.info; fi 403 404remove_coverage_output: 405 rm -f gcov_output.txt gcov_error.txt gcov_report.txt test_output.txt gcov_report.txt.html temp.info coverage.info 406 rm -rf test_coverage 407 408check_examples: 409 @echo "Using the old Makefile and examples" 410 make distclean 411 $(MAKE) -C $(srcdir) -f Makefile_using_MakefileWorker extensions 412 $(MAKE) -C $(srcdir)/examples all clean 413 414 @echo "Compiling and running the examples. This will use the old Makefile" 415 make distclean; $(srcdir)/configure; make; $(MAKE) -C $(srcdir)/examples all clean CPPUTEST_LIB_LINK_DIR="`pwd`/lib" 416 417check_all: check_basic check_special_situations check_coverage remove_coverage_output check_examples check_gtest 418 @echo "Last... one normal build and test" 419 make distclean; $(srcdir)/configure; make check; 420 @echo "Check running tests repeatedly" 421 $(RUN_CPPUTEST_TESTS) - r; $(RUN_CPPUTESTEXT_TESTS) -r 422 @echo "Check running tests in separate process (CppUTestExtTests TEST_GROUP(TestOrderedTestMacro) would have to fail)" 423 $(RUN_CPPUTEST_TESTS) -p; 424 425# Mac OSX adds an annoying directory when packaging. This can be prevented by setting COPYFILE_DISABLE=1 426# However, I've not figured out how to set it automatically and neither google nor stackoverflow knew the answer. 427# The automake mailing list is still thinking about it, and thus, I've added this check so that I don't forget to do it :) 428# More info: http://superuser.com/questions/61185/why-do-i-get-files-like-foo-in-my-tarball-on-os-x 429dist-hook: 430 if test "x$(CPPUTEST_ON_MACOSX)" = "xyes"; then \ 431 if test ! "x$(COPYFILE_DISABLE)" = "x1"; then \ 432 echo ""; \ 433 echo 'ERROR: When packaging on MacOSX, please run "COPYFILE_DISABLE=1 make dist"'; \ 434 echo ""; \ 435 exit 1; \ 436 fi \ 437 fi 438 439distclean-local: 440 test -z "generated" || rmdir generated 441 442