From c8641a6de65670b8833992c94c51a586a6434a74 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 7 Nov 2009 08:32:44 -0500 Subject: Added support for Boost.Regex w/ ICU This allows for correct searching of UTF-8 encoded strings, such as lower-case versions of Russian words to find mixed-case words. --- lib/Makefile | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/Makefile b/lib/Makefile index 07cf77ea..3a9c3214 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -2,34 +2,57 @@ # This is only important if you intend to produce a Ledger binary for # installation. -#ARCH_CFLAGS = -g -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk -#ARCH_LDFLAGS = -g -arch i386 -arch ppc -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk - STOW_ROOT = /usr/local/stow BOOST_SOURCE = boost BOOST_VERSION = 1_40_0 -# architecture=combined +icu-release: + -(cd icu/source; make distclean) + (cd icu/source; sh autogen.sh; \ + ./configure CPPFLAGS="" \ + CFLAGS="$(ARCH_CFLAGS)" \ + LDFLAGS="$(ARCH_LDFLAGS)" \ + CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \ + --enable-static \ + --prefix=$(STOW_ROOT)/icu && \ + make install) + +icu-debug: + -(cd icu/source; make distclean) + (cd icu/source; sh autogen.sh; \ + ./configure CPPFLAGS="-D_GLIBCXX_DEBUG=1" \ + CFLAGS="-g $(ARCH_CFLAGS)" \ + LDFLAGS="-g $(ARCH_LDFLAGS)" \ + CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \ + --enable-static --enable-debug \ + --prefix=$(STOW_ROOT)/icu-debug && \ + make install) + +icu-build: icu-release icu-debug + boost-release: (cd $(BOOST_SOURCE) && \ bjam release --prefix=$(STOW_ROOT)/boost_$(BOOST_VERSION) \ --build-dir=$(HOME)/Products/boost_$(BOOST_VERSION) \ - --toolset=darwin --build-type=complete --layout=versioned install) + --toolset=darwin --build-type=complete --layout=versioned \ + -sHAVE_ICU=1 -sICU_PATH=/usr/local/stow/icu install) boost-debug: (cd $(BOOST_SOURCE) && \ bjam debug --prefix=$(STOW_ROOT)/boost_$(BOOST_VERSION) \ --build-dir=$(HOME)/Products/boost_$(BOOST_VERSION) \ --toolset=darwin --build-type=complete --layout=versioned \ - define=_GLIBCXX_DEBUG=1 install) + define=_GLIBCXX_DEBUG=1 \ + -sHAVE_ICU=1 -sICU_PATH=/usr/local/stow/icu-debug install) boost-build: boost-release boost-debug cppunit-release: -(cd cppunit; make distclean) (cd cppunit; sh autogen.sh; \ - ./configure CFLAGS="$(ARCH_CFLAGS)" \ + ./configure CPPFLAGS="" \ + CFLAGS="$(ARCH_CFLAGS)" \ LDFLAGS="$(ARCH_LDFLAGS)" \ CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \ --prefix=$(STOW_ROOT)/cppunit && \ @@ -47,4 +70,4 @@ cppunit-debug: cppunit-build: cppunit-release cppunit-debug -build-all: boost-build cppunit-build +all: boost-build cppunit-build -- cgit v1.2.3 From 188bf10b6c971caf9565b89361d8d82678307653 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 8 Nov 2009 13:36:04 -0500 Subject: Improved lib/Makefile --- lib/Makefile | 54 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 16 deletions(-) (limited to 'lib') diff --git a/lib/Makefile b/lib/Makefile index 3a9c3214..dee9afda 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -3,15 +3,25 @@ # installation. STOW_ROOT = /usr/local/stow +PRODUCTS = $(HOME)/Products + +EXTRA_DEFINES = -D_GLIBCXX_FULLY_DYNAMIC_STRING=1 BOOST_SOURCE = boost BOOST_VERSION = 1_40_0 +BOOST_TOOLSET = darwin +BOOST_DEFINES = define=_GLIBCXX_FULLY_DYNAMIC_STRING=1 +BOOST_FLAGS = --toolset=$(BOOST_TOOLSET) \ + --build-type=complete --layout=versioned \ + $(BOOST_DEFINES) +ICU_FLAGS = -sHAVE_ICU=1 -sICU_PATH=$(STOW_ROOT)/icu +ICU_DBG_FLAGS = -sHAVE_ICU=1 -sICU_PATH=$(STOW_ROOT)/icu-debug icu-release: -(cd icu/source; make distclean) (cd icu/source; sh autogen.sh; \ - ./configure CPPFLAGS="" \ - CFLAGS="$(ARCH_CFLAGS)" \ + ./configure CPPFLAGS="$(EXTRA_DEFINES)" \ + CFLAGS="$(EXTRA_DEFINES) $(ARCH_CFLAGS)" \ LDFLAGS="$(ARCH_LDFLAGS)" \ CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \ --enable-static \ @@ -21,8 +31,8 @@ icu-release: icu-debug: -(cd icu/source; make distclean) (cd icu/source; sh autogen.sh; \ - ./configure CPPFLAGS="-D_GLIBCXX_DEBUG=1" \ - CFLAGS="-g $(ARCH_CFLAGS)" \ + ./configure CPPFLAGS="-D_GLIBCXX_DEBUG=1 $(EXTRA_DEFINES)" \ + CFLAGS="-g $(EXTRA_DEFINES) $(ARCH_CFLAGS)" \ LDFLAGS="-g $(ARCH_LDFLAGS)" \ CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \ --enable-static --enable-debug \ @@ -31,28 +41,40 @@ icu-debug: icu-build: icu-release icu-debug +boost-icu-release: + (cd $(BOOST_SOURCE) && \ + bjam release --prefix=$(STOW_ROOT)/boost_$(BOOST_VERSION)-icu \ + --build-dir=$(PRODUCTS)/boost_$(BOOST_VERSION)-icu \ + $(BOOST_FLAGS) $(ICU_FLAGS) install) + +boost-icu-debug: + (cd $(BOOST_SOURCE) && \ + bjam debug --prefix=$(STOW_ROOT)/boost_$(BOOST_VERSION)-icu \ + --build-dir=$(PRODUCTS)/boost_$(BOOST_VERSION)-icu \ + $(BOOST_FLAGS) define=_GLIBCXX_DEBUG=1 \ + $(ICU_DBG_FLAGS) install) + +boost-icu-build: boost-icu-release boost-icu-debug + boost-release: (cd $(BOOST_SOURCE) && \ bjam release --prefix=$(STOW_ROOT)/boost_$(BOOST_VERSION) \ - --build-dir=$(HOME)/Products/boost_$(BOOST_VERSION) \ - --toolset=darwin --build-type=complete --layout=versioned \ - -sHAVE_ICU=1 -sICU_PATH=/usr/local/stow/icu install) + --build-dir=$(PRODUCTS)/boost_$(BOOST_VERSION) \ + $(BOOST_FLAGS) install) boost-debug: (cd $(BOOST_SOURCE) && \ bjam debug --prefix=$(STOW_ROOT)/boost_$(BOOST_VERSION) \ - --build-dir=$(HOME)/Products/boost_$(BOOST_VERSION) \ - --toolset=darwin --build-type=complete --layout=versioned \ - define=_GLIBCXX_DEBUG=1 \ - -sHAVE_ICU=1 -sICU_PATH=/usr/local/stow/icu-debug install) + --build-dir=$(PRODUCTS)/boost_$(BOOST_VERSION) \ + $(BOOST_FLAGS) define=_GLIBCXX_DEBUG=1 install) boost-build: boost-release boost-debug cppunit-release: -(cd cppunit; make distclean) (cd cppunit; sh autogen.sh; \ - ./configure CPPFLAGS="" \ - CFLAGS="$(ARCH_CFLAGS)" \ + ./configure CPPFLAGS="$(EXTRA_DEFINES)" \ + CFLAGS="$(EXTRA_DEFINES) $(ARCH_CFLAGS)" \ LDFLAGS="$(ARCH_LDFLAGS)" \ CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \ --prefix=$(STOW_ROOT)/cppunit && \ @@ -61,8 +83,8 @@ cppunit-release: cppunit-debug: -(cd cppunit; make distclean) (cd cppunit; sh autogen.sh; \ - ./configure CPPFLAGS="-D_GLIBCXX_DEBUG=1" \ - CFLAGS="-g $(ARCH_CFLAGS)" \ + ./configure CPPFLAGS="-D_GLIBCXX_DEBUG=1 $(EXTRA_DEFINES)" \ + CFLAGS="-g $(EXTRA_DEFINES) $(ARCH_CFLAGS)" \ LDFLAGS="-g $(ARCH_LDFLAGS)" \ CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \ --prefix=$(STOW_ROOT)/cppunit-debug && \ @@ -70,4 +92,4 @@ cppunit-debug: cppunit-build: cppunit-release cppunit-debug -all: boost-build cppunit-build +all: boost-build boost-icu-build cppunit-build -- cgit v1.2.3