<commit_before># Uncomment these if you are on OS X and want to build universal libraries.
# This is only important if you intend to produce a Ledger binary for
# installation.

STOW_ROOT	= /usr/local/stow
PRODUCTS	= $(HOME)/Products

GCC_VERSION     = 4.6
BOOST_VERSION	= 1_45_0

CC		= gcc-mp-$(GCC_VERSION)
ifeq ($(CC),clang)
CXX		= clang++
LD		= llvm-ld
DIR_SUFFIX	= clang
OPTJ            =
else
CXX		= g++-mp-$(GCC_VERSION)
LD		= gcc-mp-$(GCC_VERSION)
DIR_SUFFIX	= gcc$(subst .,,$(GCC_VERSION))
OPTJ            = #-j16
endif
CPPFLAGS	= -D_GLIBCXX_FULLY_DYNAMIC_STRING=1
ifneq ($(CC),clang)
CPPFLAGS       += -D_GLIBCXX_DEBUG=1
endif
CFLAGS		= $(CPPFLAGS) -g
LDFLAGS		= -g

BOOST_SOURCE	= boost-release
BOOST_DEFINES	= define=_GLIBCXX_FULLY_DYNAMIC_STRING=1
ifeq ($(CC),clang)
BOOST_TOOLSET	= clang
else
BOOST_TOOLSET	= darwin
BOOST_DEFINES	= define=_GLIBCXX_DEBUG=1
endif
#BOOST_FLAGS	= --architecture=x86 --address_model=32_64
BOOST_FLAGS	= --toolset=$(BOOST_TOOLSET) \
		  --build-type=complete --layout=versioned \
		  $(BOOST_DEFINES)
BOOST_DIR	= boost_$(BOOST_VERSION)-$(DIR_SUFFIX)
BOOST_STOW	= $(STOW_ROOT)/$(BOOST_DIR)
BOOST_BUILD	= $(PRODUCTS)/$(BOOST_DIR)
ICU_FLAGS	= -sHAVE_ICU=1 -sICU_PATH=$(STOW_ROOT)/icu-$(DIR_SUFFIX)
BOOST_ICU_DIR	= boost_$(BOOST_VERSION)-icu-$(DIR_SUFFIX)
BOOST_ICU_STOW	= $(STOW_ROOT)/$(BOOST_ICU_DIR)
BOOST_ICU_BUILD = $(PRODUCTS)/$(BOOST_ICU_DIR)

all: boost-build icu-build boost-icu-build

prepare-boost:
	perl -i -pe 's/local command = \[ common\.get-invocation-command darwin : g\+\+ : .*/local command = [ common.get-invocation-command darwin : g++ : $(CXX) ] ;/;' $(BOOST_SOURCE)/tools/build/v2/tools/darwin.jam
	perl -i -pe 's/flags darwin\.compile OPTIONS : -no-cpp-precomp -gdwarf-2 ;/flags darwin\.compile OPTIONS : -gdwarf-2 ;/;' $(BOOST_SOURCE)/tools/build/v2/tools/darwin.jam

boost-build: prepare-boost
	(cd $(BOOST_SOURCE) && \
	 sh bootstrap.sh && \
	 ./bjam $(OPTJ) debug --prefix=$(BOOST_STOW) \
	    --build-dir=$(BOOST_BUILD) \<commit_msg>Don't build Boost/ICU by default in lib/Makefile<commit_after># Uncomment these if you are on OS X and want to build universal libraries.
# This is only important if you intend to produce a Ledger binary for
# installation.

STOW_ROOT	= /usr/local/stow
PRODUCTS	= $(HOME)/Products

GCC_VERSION     = 4.6
BOOST_VERSION	= 1_45_0

CC		= gcc-mp-$(GCC_VERSION)
ifeq ($(CC),clang)
CXX		= clang++
LD		= llvm-ld
DIR_SUFFIX	= clang
OPTJ            =
else
CXX		= g++-mp-$(GCC_VERSION)
LD		= gcc-mp-$(GCC_VERSION)
DIR_SUFFIX	= gcc$(subst .,,$(GCC_VERSION))
OPTJ            = #-j8
endif
CPPFLAGS	= -D_GLIBCXX_FULLY_DYNAMIC_STRING=1
ifneq ($(CC),clang)
CPPFLAGS       += -D_GLIBCXX_DEBUG=1
endif
CFLAGS		= $(CPPFLAGS) -g
LDFLAGS		= -g

BOOST_SOURCE	= boost-release
BOOST_DEFINES	= define=_GLIBCXX_FULLY_DYNAMIC_STRING=1
ifeq ($(CC),clang)
BOOST_TOOLSET	= clang
else
BOOST_TOOLSET	= darwin
BOOST_DEFINES	= define=_GLIBCXX_DEBUG=1
endif
#BOOST_FLAGS	= --architecture=x86 --address_model=32_64
BOOST_FLAGS	= --toolset=$(BOOST_TOOLSET) \
		  --build-type=complete --layout=versioned \
		  $(BOOST_DEFINES)
BOOST_DIR	= boost_$(BOOST_VERSION)-$(DIR_SUFFIX)
BOOST_STOW	= $(STOW_ROOT)/$(BOOST_DIR)
BOOST_BUILD	= $(PRODUCTS)/$(BOOST_DIR)
ICU_FLAGS	= -sHAVE_ICU=1 -sICU_PATH=$(STOW_ROOT)/icu-$(DIR_SUFFIX)
BOOST_ICU_DIR	= boost_$(BOOST_VERSION)-icu-$(DIR_SUFFIX)
BOOST_ICU_STOW	= $(STOW_ROOT)/$(BOOST_ICU_DIR)
BOOST_ICU_BUILD = $(PRODUCTS)/$(BOOST_ICU_DIR)

all: boost-build #icu-build boost-icu-build

prepare-boost:
	perl -i -pe 's/local command = \[ common\.get-invocation-command darwin : g\+\+ : .*/local command = [ common.get-invocation-command darwin : g++ : $(CXX) ] ;/;' $(BOOST_SOURCE)/tools/build/v2/tools/darwin.jam
	perl -i -pe 's/flags darwin\.compile OPTIONS : -no-cpp-precomp -gdwarf-2 ;/flags darwin\.compile OPTIONS : -gdwarf-2 ;/;' $(BOOST_SOURCE)/tools/build/v2/tools/darwin.jam

boost-build: prepare-boost
	(cd $(BOOST_SOURCE) && \
	 sh bootstrap.sh && \
	 ./bjam $(OPTJ) debug --prefix=$(BOOST_STOW) \
	    --build-dir=$(BOOST_BUILD) \
{'fraction_non_alphanumeric': 0.1546468401486989, 'fraction_numerical': 0.011152416356877323, 'mean_word_length': 4.262059973924381, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5746151', 'n_tokens_mistral': 1776, 'n_tokens_neox': 1610, 'n_words': 310}