@@ -119,13 +119,13 @@ include_cpputestext_HEADERS = \
119119 include/CppUTestExt/MockSupport.h \
120120 include/CppUTestExt/MockSupportPlugin.h \
121121 include/CppUTestExt/MockSupport_c.h \
122- include/CppUTestExt/OrderedTest.h
123-
122+ include/CppUTestExt/OrderedTest.h
123+
124124endif
125125
126126CppUTestTests_CPPFLAGS = $(lib_libCppUTest_a_CPPFLAGS )
127127CppUTestTests_CFLAGS = $(lib_libCppUTest_a_CFLAGS )
128- CppUTestTests_CXXFLAGS = $(lib_libCppUTest_a_CXXFLAGS )
128+ CppUTestTests_CXXFLAGS = $(lib_libCppUTest_a_CXXFLAGS )
129129CppUTestTests_LDADD = lib/libCppUTest.a $(CPPUTEST_LDADD )
130130CppUTestTests_LDFLAGS = $(AM_LDFLAGS ) $(CPPUTEST_LDFLAGS ) $(CPPUTEST_ADDITIONAL_LDFLAGS )
131131
@@ -163,7 +163,7 @@ CppUTestTests_SOURCES = \
163163
164164CppUTestExtTests_CPPFLAGS = $(lib_libCppUTestExt_a_CPPFLAGS )
165165CppUTestExtTests_CFLAGS = $(lib_libCppUTestExt_a_CFLAGS )
166- CppUTestExtTests_CXXFLAGS = $(lib_libCppUTestExt_a_CXXFLAGS )
166+ CppUTestExtTests_CXXFLAGS = $(lib_libCppUTestExt_a_CXXFLAGS )
167167CppUTestExtTests_LDADD = lib/libCppUTestExt.a lib/libCppUTest.a $(CPPUTEST_LDADD )
168168CppUTestExtTests_LDFLAGS = $(CppUTestTests_LDFLAGS )
169169
@@ -197,7 +197,7 @@ if INCLUDE_GMOCKTESTS
197197
198198# GTestTests_SOURCES = \
199199 $(GMOCK_HOME)/test/gmock-spec-builders_test.cc \
200- tests/CppUTestExt/AllTests.cpp
200+ tests/CppUTestExt/AllTests.cpp
201201endif
202202
203203RUN_CPPUTEST_TESTS = ./$(CPPUTEST_TESTS )
@@ -216,19 +216,19 @@ endif
216216cpputest_build_gtest17 :
217217 mkdir -p cpputest_build_gtest17
218218 cd cpputest_build_gtest17; \
219- wget https://googlemock.googlecode.com/files/gmock-1.7.0.zip && unzip gmock-1.7.0.zip
219+ wget https://googlemock.googlecode.com/files/gmock-1.7.0.zip && unzip gmock-1.7.0.zip
220220 cd cpputest_build_gtest17/gmock-1.7.0; ./configure && make check
221221
222222cpputest_build_gtest16 :
223223 mkdir -p cpputest_build_gtest16
224224 cd cpputest_build_gtest16; \
225- wget https://googlemock.googlecode.com/files/gmock-1.6.0.zip && unzip gmock-1.6.0.zip
225+ wget https://googlemock.googlecode.com/files/gmock-1.6.0.zip && unzip gmock-1.6.0.zip
226226 cd cpputest_build_gtest16/gmock-1.6.0; ./configure CXXFLAGS=-DGTEST_USE_OWN_TR1_TUPLE=1 && make check
227227
228228cpputest_build_gtest15 :
229229 mkdir -p cpputest_build_gtest15
230230 cd cpputest_build_gtest15; \
231- wget https://googlemock.googlecode.com/files/gmock-1.5.0.zip && unzip gmock-1.5.0.zip
231+ wget https://googlemock.googlecode.com/files/gmock-1.5.0.zip && unzip gmock-1.5.0.zip
232232 cd cpputest_build_gtest15/gmock-1.5.0; ./configure CXXFLAGS=-DGTEST_USE_OWN_TR1_TUPLE=1 && make
233233
234234check_gtest15 : cpputest_build_gtest15
@@ -245,7 +245,7 @@ check_gtest17: cpputest_build_gtest17
245245 @echo " Build using gmock 1.7"
246246 export GMOCK_HOME=` pwd` /cpputest_build_gtest17/gmock-1.7.0; \
247247 make distclean; $(srcdir ) /configure; make check
248-
248+
249249remove_gtest_directories :
250250 rm -rf cpputest_build_gtest15
251251 rm -rf cpputest_build_gtest16
@@ -255,13 +255,13 @@ check_gtest: remove_gtest_directories check_gtest15 check_gtest16 check_gtest17
255255
256256check_basic :
257257 @echo " If dash is available, run the configure with dash to find bash-isms and increase portability"
258- make distclean; if test " x$( CPPUTEST_HAS_DASH) " = xyes; then CONFIG_SHELL=dash $( srcdir) /configure; fi
258+ make distclean; if test " x$( CPPUTEST_HAS_DASH) " = xyes; then CONFIG_SHELL=dash $( srcdir) /configure; fi
259259
260260 @echo "Building and valgrinding (skipping this on MacOS due to buggy Valgrind"
261261 if test "x$(CPPUTEST_ON_MACOSX)" = xno; then \
262262 make distclean; $(srcdir)/configure; make valgrind; \
263263 fi
264-
264+
265265 @echo "Building without extensions"
266266 make distclean; $(srcdir)/configure --disable-extensions; make check
267267
@@ -309,36 +309,49 @@ check_coverage:
309309 else \
310310 make distclean; $(srcdir ) /configure -enable-coverage CFLAGS=" -O0" CXXFLAGS=" -O0" ; \
311311 fi
312-
312+
313313 make check
314314
315- ./$(CPPUTEST_TESTS) >> test_output.txt; ./$(CPPUTESTEXT_TESTS) >> test_output.txt
315+ ./$(CPPUTEST_TESTS) >> test_output.txt; ./$(CPPUTESTEXT_TESTS) >> test_output.txt
316316 $(SILENCE)for f in `ls *.gcno` ; do \
317317 gcov $(CppUTestExtTests_SOURCES) $(CppUTestTests_SOURCES) $(lib_libCppUTest_a_SOURCES) $(lib_libCppUTestExt_a_SOURCES) -o $$f 1>>gcov_output.txt 2>>gcov_error.txt; \
318318 done
319319 $(srcdir)/scripts/filterGcov.sh gcov_output.txt gcov_error.txt gcov_report.txt test_output.txt
320320 cat gcov_report.txt
321321 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
322-
322+
323323remove_coverage_output :
324324 rm -f gcov_output.txt gcov_error.txt gcov_report.txt test_output.txt gcov_report.txt.html temp.info coverage.info
325325 rm -rf test_coverage
326326
327327check_examples :
328328 @echo " Using the old Makefile and examples"
329329 make distclean
330- $(MAKE ) -C $(srcdir ) -f Makefile_using_MakefileWorker extensions
330+ $(MAKE ) -C $(srcdir ) -f Makefile_using_MakefileWorker extensions
331331 $(MAKE ) -C $(srcdir ) /examples all clean
332-
332+
333333 @echo "Compiling and running the examples. This will use the old Makefile"
334334 make distclean; $(srcdir)/configure; make; $(MAKE) -C $(srcdir)/examples all clean CPPUTEST_LIB_LINK_DIR="`pwd`/lib"
335335
336336check_all : check_basic check_special_situations check_coverage remove_coverage_output check_examples check_gtest
337337 @echo " Last... one normal build and test"
338- make distclean; $(srcdir ) /configure; make check;
338+ make distclean; $(srcdir ) /configure; make check;
339339 @echo " Check running tests repeatedly"
340340 $(RUN_CPPUTEST_TESTS ) - r; $(RUN_CPPUTESTEXT_TESTS ) -r
341341 @echo " Check running tests in separate process (CppUTestExtTests TEST_GROUP(TestOrderedTestMacro) would have to fail)"
342342 $(RUN_CPPUTEST_TESTS ) -p;
343343
344+ # Mac OSX adds an annoying directory when packaging. This can be prevented by setting COPYFILE_DISABLE=1
345+ # However, I've not figured out how to set it automatically and neither google nor stackoverflow knew the answer.
346+ # 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 :)
347+ # More info: http://superuser.com/questions/61185/why-do-i-get-files-like-foo-in-my-tarball-on-os-x
348+ dist-hook :
349+ if test " x$( CPPUTEST_ON_MACOSX) " = " xyes" ; then \
350+ if test ! " x$( COPYFILE_DISABLE) " = " x1" ; then \
351+ echo " " ; \
352+ echo ' ERROR: When packaging on MacOSX, please run "COPYFILE_DISABLE=1 make dist"' ; \
353+ echo " " ; \
354+ exit 1; \
355+ fi \
356+ fi
344357
0 commit comments