[Libreoffice-commits] core.git: cppunit/ExternalProject_cppunit.mk

Tor Lillqvist tml at iki.fi
Tue Apr 16 03:33:37 PDT 2013


 cppunit/ExternalProject_cppunit.mk |   26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

New commits:
commit bc88e110dd6908588d01c6ecad01fd3ecd8e0076
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue Apr 16 13:31:15 2013 +0300

    Probably a good idea to use -D_GLIBCXX_FULLY_DYNAMIC_STRING here, too
    
    While at it, do the CXXFLAGS dance on separate lines as appends to a variable
    for clarity, instead of in-line on the configure command line.
    
    Change-Id: I61843ae82efdf341c7e33d3f08d5715a14fa2f40

diff --git a/cppunit/ExternalProject_cppunit.mk b/cppunit/ExternalProject_cppunit.mk
index 1617ecd..7aba4f0 100644
--- a/cppunit/ExternalProject_cppunit.mk
+++ b/cppunit/ExternalProject_cppunit.mk
@@ -35,6 +35,29 @@ $(call gb_ExternalProject_get_state_target,cppunit,build) :
 	,src/cppunit)
 endif
 else
+
+cppunit_CXXFLAGS=$(CXXFLAGS)
+
+ifneq (,$(filter ANDROID DRAGONFLY FREEBSD IOS LINUX MACOSX NETBSD OPENBSD,$(OS)))
+ifneq (,$(gb_ENABLE_DBGUTIL))
+cppunit_CXXFLAGS+=-D_GLIBCXX_DEBUG
+endif
+endif
+
+ifeq ($(OS),MACOSX)
+ifneq (,$(gb_ENABLE_DBGUTIL))
+cppunit_CXXFLAGS+=-D_GLIBCXX_FULLY_DYNAMIC_STRING
+endif
+endif
+
+ifeq ($(OS)-$(COM),WNT-GCC)
+cppunit_CXXFLAGS+=-mthreads
+endif
+
+ifneq (,$(debug))
+cppunit_CXXFLAGS+=-g
+endif
+
 $(call gb_ExternalProject_get_state_target,cppunit,build) :
 	$(call gb_ExternalProject_run,build,\
 		./configure \
@@ -48,8 +71,7 @@ $(call gb_ExternalProject_get_state_target,cppunit,build) :
 			$(if $(filter WNT,$(OS)),LDFLAGS="-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2") \
 			$(if $(filter SOLARIS,$(OS)),LIBS="-lm") \
 			$(if $(filter ANDROID,$(OS)),LIBS="-lgnustl_shared -lm") \
-			CXXFLAGS="$(if $(filter GCC,$(COM)),$(if $(filter LINUX FREEBSD OPENBSD NETBSD DRAGONFLY ANDROID MACOSX,$(OS)),$(if $(filter TRUE,$(ENABLE_DBGUTIL)),-D_GLIBCXX_DEBUG),$(if $(filter WNT,$(OS)),-mthreads))) \
-			$(if $(debug),-g)" \
+			CXXFLAGS="$(cppunit_CXXFLAGS)" \
 		&& cd src \
 		&& $(MAKE) \
 	)


More information about the Libreoffice-commits mailing list