From 8efa42c387b62e668e70502928492ee4ef32d44e Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 11 Dec 2009 14:29:59 +0100 Subject: sb118: Replace (heavily modified) CppUnit 1.8.0 with (unmodified) latest 1.12.1. - Old modifications were necessary for testshl2, which has simply been excluded from the build for now. - Tests in basebmp, basegfx, o3tl (that are executed during build) have been converted from using modified CppUnit/testshl2 to using unmodified CppUnit. - CppUnit's DllPlugInTester has problems with OOo tests on Windows, see #i107562#, so for now a new cppunittester from sal is used instead. --- cppunit/makefile.mk | 226 ++++++++++++++++++++++++++++------------------------ 1 file changed, 121 insertions(+), 105 deletions(-) (limited to 'cppunit/makefile.mk') diff --git a/cppunit/makefile.mk b/cppunit/makefile.mk index 8f636569d8b2..3f653ecff733 100644 --- a/cppunit/makefile.mk +++ b/cppunit/makefile.mk @@ -1,14 +1,13 @@ #************************************************************************* -# # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ +# $RCSfile: makefile,v $ # -# $Revision: 1.1.2.3 $ +# $Revision: 1.4 $ # # This file is part of OpenOffice.org. # @@ -26,106 +25,123 @@ # version 3 along with OpenOffice.org. If not, see # # for a copy of the LGPLv3 License. -# -#************************************************************************* +#***********************************************************************/ + +PRJ = . +PRJNAME = cppunit +TARGET = cppunit + +.INCLUDE: settings.mk + +TARFILE_NAME = cppunit-1.12.1 + # from + +PATCH_FILES = solarisfinite.patch warnings.patch + # solarisfinite.patch: see + # warnings.patch: see + +.IF "$(OS)" == "WNT" && "$(COM)" == "MSC" + +# On Windows, CppUnit appears to support either the Unix-style configure/make +# approach with cygwin and gcc (and libtool fails miserably if gcc is replaced +# by MSVC cl), or a Visual Studio project (CppUnitLibraries.dsw). However, the +# latter is too old to work with vcbuild from a wntmsci12 tool chain. So, the +# easiest way appears to inject hand-crafted dmake makefiles to build the +# relevant parts. (Another approach would be to manually use the Visual Studio +# IDE to convert CppUnitLibraries.dsw to modern format, inject the resulting +# cppunit_dll.vcproj and DllPlugInTester.vcproj and build those with vcbuild.) + +CONFIGURE_ACTION = $(SED) -e s:@BACKPATH@:../$(BACK_PATH): \ + < ../$(BACK_PATH)$(PATH_IN_MODULE)/ooo-cppunit_dll.mk \ + > src/cppunit/ooo-cppunit_dll.mk && \ + $(SED) -e s:@BACKPATH@:../$(BACK_PATH): \ + < ../$(BACK_PATH)$(PATH_IN_MODULE)/ooo-DllPlugInTester.mk \ + > src/DllPlugInTester/ooo-DllPlugInTester.mk + +BUILD_ACTION = cd src/cppunit && dmake -f ooo-cppunit_dll.mk && \ + cd ../DllPlugInTester && dmake -f ooo-DllPlugInTester.mk + +OUTDIR2INC = include/cppunit + +.INCLUDE: set_ext.mk +.INCLUDE: target.mk +.INCLUDE: tg_ext.mk + +$(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE): ooo-cppunit_dll.mk ooo-DllPlugInTester.mk + +.ELSE + +.IF "$(USE_SYSTEM_STL)" != "YES" + +OOO_STLPORT_CXXFLAGS = -I$(SOLARINCDIR)/stl +.IF "$(COM)" == "GCC" +OOO_STLPORT_CXXFLAGS += -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) +.ENDIF + +OOO_STLPORT_LDFLAGS = -L$(SOLARLIBDIR) +OOO_STLPORT_LIBS = $(LIBSTLPORT) + +# When "checking for C compiler default output file name" configure +# unfortunately uses "$CC $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS" to build +# a C program that links against $(LIBSTLPORT); at least on one unxlngi6 +# machine, this has been observed to fail with "/lib/libm.so.6: undefined +# reference to `_rtld_global_ro@GLIBC_PRIVATE'" unless -lm is also specified: +.IF "$(OS)" == "LINUX" && "$(COM)" == "GCC" && "$(CPU)" == "I" +OOO_STLPORT_LIBS += -lm +.ENDIF + +# And later, when "checking whether the C compiler works" configure tries to +# execute that program; however, the program would fail to locate the STLport +# library (another work-around might be to add something like --as-needed around +# $(LIBSTLPORT)): +.IF "$(OS)" == "LINUX" || "$(OS)" == "SOLARIS" +.IF "$(LD_LIBRARY_PATH)" == "" +LD_LIBRARY_PATH := $(SOLARLIBDIR) + # strictly speaking, this is incorrect if the LD_LIBRARY_PATH environment + # variable is set to the empty string +.ELSE +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(SOLARLIBDIR) +.ENDIF +.EXPORT: LD_LIBRARY_PATH +.END + +.END + +# At least on Solaris with Sun CC, linking the cppunit dynamic library fails as +# TestAssert.o uses fabs but -lm is missing from the command line (cppunit's +# aclocal.m4 contains an unused AC_CHECK_LIBM, maybe using that would be a +# better fix): +.IF "$(OS)" == "SOLARIS" && "$(COM)" == "C52" +MY_LIBS = -lm +.ENDIF + +CONFIGURE_ACTION = ./configure +CONFIGURE_FLAGS = --prefix=$(shell cd $(PACKAGE_DIR) && \ + pwd $(PWDFLAGS))/$(TARFILE_ROOTDIR)/ooo-install \ + --disable-dependency-tracking --disable-static --disable-doxygen \ + --disable-html-docs --disable-latex-docs CC='$(CC)' CXX='$(CXX)' \ + CXXFLAGS='$(OOO_STLPORT_CXXFLAGS)' \ + LDFLAGS='$(LDFLAGS) $(OOO_STLPORT_LDFLAGS)' \ + LIBS='$(OOO_STLPORT_LIBS) $(MY_LIBS)' + +BUILD_ACTION = $(GNUMAKE) +BUILD_FLAGS = install + +OUTDIR2INC = ooo-install/include/cppunit + +.IF "$(OS)" == "MACOSX" +OUT2LIB = ooo-install/lib/libcppunit-1.12.1.dylib +.ELSE +OUT2LIB = ooo-install/lib/libcppunit-1.12.so.1 +.ENDIF + +OUT2BIN = ooo-install/bin/DllPlugInTester -PRJ=. - -PRJNAME=so_cppunit -TARGET=so_cppunit - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -TARFILE_NAME=cppunit-1.8.0 - -MOVED_FILES=\ - include$/cppunit$/result$/SynchronizedObject.h \ - include$/cppunit$/result$/TestListener.h \ - include$/cppunit$/result$/TestResultCollector.h \ - include$/cppunit$/result$/TestResult.h \ - include$/cppunit$/result$/TestSucessListener.h \ - include$/cppunit$/result$/TextTestResult.h \ - include$/cppunit$/portability$/config-bcb5.h \ - include$/cppunit$/portability$/config-msvc6.h \ - src$/result$/SynchronizedObject.cpp \ - src$/result$/TestResultCollector.cpp \ - src$/result$/TestResult.cpp \ - src$/result$/TestSucessListener.cpp \ - src$/result$/TextTestResult.cpp - -ADDITIONAL_FILES=\ - $(MOVED_FILES) \ - include$/cppunit$/additionalfunc.hxx \ - include$/cppunit$/autoregister$/callbackfunc_fktptr.h \ - include$/cppunit$/autoregister$/callbackstructure.h \ - include$/cppunit$/autoregister$/htestresult.h \ - include$/cppunit$/autoregister$/registerfunc.h \ - include$/cppunit$/autoregister$/registertestfunction.h \ - include$/cppunit$/autoregister$/testfunc.h \ - include$/cppunit$/checkboom.hxx \ - include$/cppunit$/cmdlinebits.hxx \ - include$/cppunit$/externcallbackfunc.hxx \ - include$/cppunit$/joblist.hxx \ - include$/cppunit$/nocopy.hxx \ - include$/cppunit$/portability$/config-auto.h \ - include$/cppunit$/result$/callbackfunc.h \ - include$/cppunit$/result$/emacsTestResult.hxx \ - include$/cppunit$/result$/log.hxx \ - include$/cppunit$/result$/optionhelper.hxx \ - include$/cppunit$/result$/outputter.hxx \ - include$/cppunit$/result$/testshlTestResult.h \ - include$/cppunit$/signaltest.h \ - include$/cppunit$/simpleheader.hxx \ - include$/cppunit$/stringhelper.hxx \ - include$/cppunit$/taghelper.hxx \ - include$/cppunit$/tagvalues.hxx \ - include$/testshl$/autoregisterhelper.hxx \ - include$/testshl$/dynamicregister.hxx \ - include$/testshl$/filehelper.hxx \ - include$/testshl$/getopt.hxx \ - include$/testshl$/log.hxx \ - include$/testshl$/tresstatewrapper.h \ - include$/testshl$/tresstatewrapper.hxx \ - include$/testshl$/versionhelper.hxx \ - include$/testshl$/winstuff.hxx \ - include$/makefile.mk \ - makefile.mk \ - src$/makefile.mk \ - src$/cppunit$/cmdlinebits.cxx \ - src$/cppunit$/joblist.cxx \ - src$/cppunit$/makefile.mk \ - src$/cppunit$/registertestfunction.cxx \ - src$/cppunit$/signaltest.cxx \ - src$/cppunit$/t_print.cxx \ - src$/cppunit$/tresregister.cxx \ - src$/cppunit$/tresstatewrapper.cxx \ - src$/result$/emacsTestResult.cxx \ - src$/result$/log.cxx \ - src$/result$/makefile.mk \ - src$/result$/optionhelper.cxx \ - src$/result$/outputter.cxx \ - src$/result$/signal.cxx \ - src$/result$/signal.hxx \ - src$/result$/testshlTestResult.cxx \ - src$/result$/treswrapper.cxx \ - src$/win32$/makefile.mk \ - src$/win32$/winstuff.cxx - -PATCH_FILES=cppunit-1.8.0-r1.patch - -# CONFIGURE_DIR= -# CONFIGURE_ACTION= -# -# BUILD_DIR= -BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : set_ext.mk -.INCLUDE : target.mk -.INCLUDE : tg_ext.mk +.INCLUDE: set_ext.mk +.INCLUDE: target.mk +.INCLUDE: tg_ext.mk +.ENDIF -- cgit From 68e460ebd20d641b03f8e09b509388e942409e33 Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 16 Dec 2009 14:31:25 +0100 Subject: sb118: adaptions of using CppUnit 1.12.1 for wntgcci platform and for --enable-dbgutil configuration --- cppunit/makefile.mk | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'cppunit/makefile.mk') diff --git a/cppunit/makefile.mk b/cppunit/makefile.mk index 3f653ecff733..9bfbd1f1e119 100644 --- a/cppunit/makefile.mk +++ b/cppunit/makefile.mk @@ -77,9 +77,12 @@ $(PACKAGE_DIR)/$(CONFIGURE_FLAG_FILE): ooo-cppunit_dll.mk ooo-DllPlugInTester.mk .IF "$(USE_SYSTEM_STL)" != "YES" OOO_STLPORT_CXXFLAGS = -I$(SOLARINCDIR)/stl +.IF "$(USE_STLP_DEBUG)" == "TRUE" +OOO_STLPORT_CXXFLAGS += -D_STLP_DEBUG +.END .IF "$(COM)" == "GCC" OOO_STLPORT_CXXFLAGS += -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) -.ENDIF +.END OOO_STLPORT_LDFLAGS = -L$(SOLARLIBDIR) OOO_STLPORT_LIBS = $(LIBSTLPORT) @@ -91,7 +94,7 @@ OOO_STLPORT_LIBS = $(LIBSTLPORT) # reference to `_rtld_global_ro@GLIBC_PRIVATE'" unless -lm is also specified: .IF "$(OS)" == "LINUX" && "$(COM)" == "GCC" && "$(CPU)" == "I" OOO_STLPORT_LIBS += -lm -.ENDIF +.END # And later, when "checking whether the C compiler works" configure tries to # execute that program; however, the program would fail to locate the STLport @@ -104,7 +107,7 @@ LD_LIBRARY_PATH := $(SOLARLIBDIR) # variable is set to the empty string .ELSE LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(SOLARLIBDIR) -.ENDIF +.END .EXPORT: LD_LIBRARY_PATH .END @@ -116,7 +119,7 @@ LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(SOLARLIBDIR) # better fix): .IF "$(OS)" == "SOLARIS" && "$(COM)" == "C52" MY_LIBS = -lm -.ENDIF +.END CONFIGURE_ACTION = ./configure CONFIGURE_FLAGS = --prefix=$(shell cd $(PACKAGE_DIR) && \ @@ -132,16 +135,20 @@ BUILD_FLAGS = install OUTDIR2INC = ooo-install/include/cppunit +.IF "$(OS)" == "WNT" +OUT2BIN = ooo-install/bin/DllPlugInTester.exe \ + ooo-install/bin/cygcppunit-1-12-1.dll +.ELSE +OUT2BIN = ooo-install/bin/DllPlugInTester .IF "$(OS)" == "MACOSX" OUT2LIB = ooo-install/lib/libcppunit-1.12.1.dylib .ELSE OUT2LIB = ooo-install/lib/libcppunit-1.12.so.1 -.ENDIF - -OUT2BIN = ooo-install/bin/DllPlugInTester +.END +.END .INCLUDE: set_ext.mk .INCLUDE: target.mk .INCLUDE: tg_ext.mk -.ENDIF +.END -- cgit From a1290f07ebfc0a164eff651c51c65d8ec21cd758 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 18 Dec 2009 15:56:13 +0100 Subject: sb118: build cppunit as RPATH=NONE (as it will only be used while building, not go into installation sets) --- cppunit/makefile.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'cppunit/makefile.mk') diff --git a/cppunit/makefile.mk b/cppunit/makefile.mk index 9bfbd1f1e119..43cef0c4f606 100644 --- a/cppunit/makefile.mk +++ b/cppunit/makefile.mk @@ -142,6 +142,7 @@ OUT2BIN = ooo-install/bin/DllPlugInTester.exe \ OUT2BIN = ooo-install/bin/DllPlugInTester .IF "$(OS)" == "MACOSX" OUT2LIB = ooo-install/lib/libcppunit-1.12.1.dylib +EXTRPATH = NONE .ELSE OUT2LIB = ooo-install/lib/libcppunit-1.12.so.1 .END -- cgit From cd55f83c52e8e1de1d954998e83adc31b706c08b Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 11 Jan 2010 17:39:05 +0100 Subject: sb118: work around problem that defines OPTIONAL (clashing e.g. with com::sun::star::beans::PropertyAttribute::OPTIONAL) --- cppunit/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cppunit/makefile.mk') diff --git a/cppunit/makefile.mk b/cppunit/makefile.mk index 43cef0c4f606..040120da060e 100644 --- a/cppunit/makefile.mk +++ b/cppunit/makefile.mk @@ -37,7 +37,7 @@ TARFILE_NAME = cppunit-1.12.1 # from -PATCH_FILES = solarisfinite.patch warnings.patch +PATCH_FILES = solarisfinite.patch warnings.patch windows.patch # solarisfinite.patch: see # warnings.patch: see