Skip to content

Commit

Permalink
merged changes in regex5 branch
Browse files Browse the repository at this point in the history
[SVN r26692]
  • Loading branch information
jzmaddock committed Jan 13, 2005
1 parent de0ab90 commit 71a0e02
Show file tree
Hide file tree
Showing 275 changed files with 37,091 additions and 26,940 deletions.
143 changes: 138 additions & 5 deletions build/Jamfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,117 @@
# copyright John Maddock 2003

subproject libs/regex/build ;
# bring in the rules for testing
import testing ;

#
# ICU configuration:
#
rule check-icu-config ( )
{
if ! $(gICU_CONFIG_CHECKED)
{
if $(ICU_PATH)
{
dir += $(ICU_PATH) ;
}

if [ GLOB $(dir)$(SLASH)include$(SLASH)unicode : utypes.h ]
{
ECHO Building Boost.Regex with Unicode/ICU support enabled ;
ECHO Using ICU in $(ICU_PATH:J=" ")$(SLASH)include ;
gHAS_ICU = true ;

# try and find ICU libraries, look for NT versions first:
if $(ICU_LINK)
{
gICU_LIBS += <linkflags>$(ICU_LINK) ;
}
else if [ GLOB $(dir)$(SLASH)lib : icuuc.* ]
{
gICU_LIBS += <find-library>icuuc ;
}
else if [ GLOB $(dir)$(SLASH)lib : libicuuc.* ]
{
gICU_LIBS += <find-library>icuuc ;
}
else if [ GLOB $(ICU_PATH)/lib : cygicuuc.dll ]
{
gICU_LIBS += <library-file>$(ICU_PATH)/lib/cygicuuc.dll ;
}
else if [ GLOB /usr/local/lib : cygicuuc.dll ]
{
gICU_LIBS += <library-file>/usr/local/lib/cygicuuc.dll ;
}
else
{
ECHO ICU shared common library not found. ;
ECHO HINT: Set the environment variable ICU_LINK to contain ;
ECHO the linker options required to link to ICU. ;
}

if $(ICU_LINK)
{
# gICU_LIBS += <linkflags>$(ICU_LINK) ;
}
else if [ GLOB $(dir)$(SLASH)lib : icuin.* ]
{
gICU_LIBS += <find-library>icuin ;
}
else if [ GLOB $(dir)$(SLASH)lib : libicui18n.* ]
{
gICU_LIBS += <find-library>icui18n ;
}
else if [ GLOB $(ICU_PATH)/lib : cygicuin.dll ]
{
gICU_LIBS += <library-file>$(ICU_PATH)/lib/cygicuin.dll ;
}
else if [ GLOB /usr/local/lib : cygicuin.dll ]
{
gICU_LIBS += <library-file>/usr/local/lib/cygicuin.dll ;
}
else
{
ECHO ICU shared i18n library not found. ;
ECHO HINT: Set the environment variable ICU_LINK to contain ;
ECHO the linker options required to link to ICU. ;
}
}
else
{
ECHO ****************************************************** ;
ECHO ;
ECHO Building Boost.Regex with Unicode/ICU support disabled. ;
ECHO HINT: define the environment variable ICU_PATH to point to the ;
ECHO root directy of your ICU installation if you have one. ;
ECHO Couldn't find utypes.h in $(ICU_PATH:J=" ")$(SLASH)include$(SLASH)unicode ;
ECHO ;
ECHO ****************************************************** ;
}
gICU_CONFIG_CHECKED = true ;
}
if $(gHAS_ICU)
{
return true ;
}
}

if [ check-icu-config ]
{
BOOST_REGEX_ICU_OPTS = "<define>BOOST_HAS_ICU=1" ;
if $(gICU_LIBS)
{
BOOST_REGEX_ICU_OPTS += $(gICU_LIBS) ;
# this one is required for VC++ :
BOOST_REGEX_ICU_TEST_OPTS = "<native-wchar_t>off" ;
}
if $(ICU_PATH)
{
BOOST_REGEX_ICU_OPTS += "<sysinclude>$(ICU_PATH)/include" ;
BOOST_REGEX_ICU_OPTS += "<library-path>$(ICU_PATH)/lib" ;
}
# ECHO "BOOST_REGEX_ICU_OPTS =" $(BOOST_REGEX_ICU_OPTS) ;
}

#
# this template defines the options common to
Expand All @@ -14,6 +125,12 @@ template regex-options
# <native-wchar_t>on
# como requires this:
<como-win32><*><define>BOOST_REGEX_NO_W32=1
$(BOOST_REGEX_ICU_OPTS)
;
template regex-test-options
: # sources
: # requirements
$(BOOST_REGEX_ICU_TEST_OPTS)
;

#
Expand All @@ -37,19 +154,35 @@ template msvc-stlport-tricky
<define>BOOST_ALL_NO_LIB=1
;

SOURCES = c_regex_traits c_regex_traits_common cpp_regex_traits
cregex fileiter posix_api regex regex_debug
regex_synch w32_regex_traits wide_posix_api instances winstances ;
SOURCES =
c_regex_traits.cpp
cpp_regex_traits.cpp
cregex.cpp
fileiter.cpp
icu.cpp
instances.cpp
posix_api.cpp
regex.cpp
regex_debug.cpp
regex_raw_buffer.cpp
regex_traits_defaults.cpp
static_mutex.cpp
w32_regex_traits.cpp
wc_regex_traits.cpp
wide_posix_api.cpp
winstances.cpp
usinstances.cpp ;


lib boost_regex : ../src/$(SOURCES).cpp <template>regex-options
lib boost_regex : ../src/$(SOURCES) <template>regex-options
:
common-variant-tag
:
debug release
;


dll boost_regex : ../src/$(SOURCES).cpp <template>regex-dll-options
dll boost_regex : ../src/$(SOURCES) <template>regex-dll-options
:
common-variant-tag
:
Expand Down
124 changes: 118 additions & 6 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,125 @@
project boost/regex
: source-location ../src
;
SOURCES = c_regex_traits c_regex_traits_common cpp_regex_traits
cregex fileiter posix_api regex regex_debug
regex_synch w32_regex_traits wide_posix_api instances winstances ;

#
# ICU configuration:
#
local ICU_PATH = [ modules.peek : ICU_PATH ] ;
rule check-icu-config ( )
{
local ICU_PATH = [ modules.peek : ICU_PATH ] ;
if ! $(gICU_CONFIG_CHECKED)
{
if $(ICU_PATH)
{
dir = $(ICU_PATH) ;
}

if [ GLOB $(dir)/include/unicode : utypes.h ]
{
ECHO Building Boost.Regex with Unicode/ICU support enabled ;
ECHO Using ICU in $(ICU_PATH:J=" ")/include ;
gHAS_ICU = true ;

# try and find ICU libraries, look for NT versions first:
if [ GLOB $(dir)/lib : icuuc.* ]
{
gICU_CORE_LIB = icuuc ;
}
else if [ GLOB $(dir)/lib : libicuuc.* ]
{
gICU_CORE_LIB = icuuc ;
}
else if [ GLOB $(ICU_PATH)/lib : cygicuuc.dll ]
{
gICU_CORE_LIB = cygicuuc.dll ;
}
else
{
ECHO ICU shared common library not found. ;
}

if [ GLOB $(dir)/lib : icuin.* ]
{
gICU_IN_LIB = icuin ;
}
else if [ GLOB $(dir)/lib : libicui18n.* ]
{
gICU_IN_LIB = icuin ;
}
else if [ GLOB $(ICU_PATH)/lib : cygicuin.dll ]
{
gICU_IN_LIB = cygicuin.dll ;
}
else
{
ECHO ICU shared i18n library not found. ;
}
}
else
{
ECHO ****************************************************** ;
ECHO ;
ECHO Building Boost.Regex with Unicode/ICU support disabled. ;
ECHO HINT: define the environment variable ICU_PATH to point to the ;
ECHO root directy of your ICU installation if you have one. ;
ECHO Couldn't find utypes.h in \"$(ICU_PATH:J=" ")/include/unicode\" ;
ECHO ;
ECHO ****************************************************** ;
}
gICU_CONFIG_CHECKED = true ;
}
if $(gHAS_ICU)
{
return true ;
}
}

lib boost_regex : $(SOURCES).cpp
if [ check-icu-config ]
{
BOOST_REGEX_ICU_OPTS = "<define>BOOST_HAS_ICU=1" ;
if $(gICU_CORE_LIB)
{
lib icucore : : <name>$(gICU_CORE_LIB) <search>/$(ICU_PATH)/lib ;
ICU_EXTRA_SOURCE = icucore ;
}
if $(gICU_IN_LIB)
{
lib icuin : : <name>$(gICU_IN_LIB) <search>/$(ICU_PATH)/lib ;
ICU_EXTRA_SOURCE += icuin ;
}
if $(ICU_PATH)
{
BOOST_REGEX_ICU_OPTS += "<include>$(ICU_PATH)/include" ;
#BOOST_REGEX_ICU_OPTS += "<library-path>$(ICU_PATH)/lib" ;
}
}

SOURCES =
c_regex_traits.cpp
cpp_regex_traits.cpp
cregex.cpp
fileiter.cpp
icu.cpp
instances.cpp
posix_api.cpp
regex.cpp
regex_debug.cpp
regex_raw_buffer.cpp
regex_traits_defaults.cpp
static_mutex.cpp
w32_regex_traits.cpp
wc_regex_traits.cpp
wide_posix_api.cpp
winstances.cpp
usinstances.cpp ;


lib boost_regex : ../src/$(SOURCES) $(ICU_EXTRA_SOURCE)
:
<variant>debug:<define>BOOST_REGEX_CONFIG_INFO=1
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
#<link>static:<define>BOOST_REGEX_NO_LIB=1
#<link>static:<define>BOOST_REGEX_STATIC_LINK=1
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
$(BOOST_REGEX_ICU_OPTS)
;

0 comments on commit 71a0e02

Please sign in to comment.