Moved some key template instances into the lib and out of user code.

Updated makefiles:
	renamed lib files with new more systematic naming convention.
	Added bcb6 support.
	Rewritten automatic lib selection.
Updated copyright declarations.


[SVN r13557]
This commit is contained in:
John Maddock
2002-04-24 10:50:23 +00:00
parent d67a843d5a
commit 976fb02a1b
83 changed files with 4992 additions and 2932 deletions

View File

@ -1,6 +1,6 @@
/*
*
* Copyright (c) 1998-2000
* Copyright (c) 1998-2002
* Dr John Maddock
*
* Permission to use, copy, modify, distribute and sell this software
@ -64,3 +64,4 @@ int main()
return 0;
}

View File

@ -1,6 +1,6 @@
/*
*
* Copyright (c) 1998-2000
* Copyright (c) 1998-2002
* Dr John Maddock
*
* Permission to use, copy, modify, distribute and sell this software
@ -64,3 +64,4 @@ int main()
return 0;
}

View File

@ -1,6 +1,6 @@
/*
*
* Copyright (c) 1998-2000
* Copyright (c) 1998-2002
* Dr John Maddock
*
* Permission to use, copy, modify, distribute and sell this software
@ -28,6 +28,8 @@
#define UNICODE
#include <boost/regex.h>
#ifndef BOOST_NO_WREGEX
const wchar_t* expression = L"^";
const wchar_t* text = L"\n ";
regmatch_t matches[1];
@ -66,4 +68,7 @@ int main()
return 0;
}
#else
# error "This library has not been configured for wide character support"
#endif

View File

@ -1,6 +1,6 @@
/*
*
* Copyright (c) 1998-2000
* Copyright (c) 1998-2002
* Dr John Maddock
*
* Permission to use, copy, modify, distribute and sell this software
@ -28,6 +28,8 @@
#define UNICODE
#include <boost/regex.h>
#ifndef BOOST_NO_WREGEX
const wchar_t* expression = L"^";
const wchar_t* text = L"\n ";
regmatch_t matches[1];
@ -66,4 +68,8 @@ int main()
return 0;
}
#else
# error "This library has not been configured for wide character support"
#endif

194
test/regress/bcb6.mak Normal file
View File

@ -0,0 +1,194 @@
# very basic makefile for regress
#
# Borland C++ tools
#
# BCROOT defines the root directory of your bcb install
#
!ifndef BCROOT
BCROOT=$(MAKEDIR)\..
!endif
BCC32 = $(BCROOT)\bin\Bcc32.exe
TLINK32 = $(BCROOT)\bin\ILink32.exe
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
LINKOPTS= -ap -Tpe -x
CFLAGS= -O2 -tWC -DSTRICT; -w-inl -w-aus -w-csu -w-eff -w-rch -I$(BCROOT)\include;..\..\..\..\; -L$(BCROOT)\lib\obj -L$(BCROOT)\lib\release -L..\..\build\bcb5 $(CXXFLAGS)
BPI= vcl.bpi rtl.bpi vclx.bpi vcle.lib
BPL= vcl.lib rtl.lib vcle.lib
all :: r1.exe r2.exe r3.exe r4.exe r5.exe r6.exe r1m.exe r2m.exe r3m.exe r4m.exe r5m.exe r6m.exe r1v.exe r2v.exe r3v.exe r4v.exe r5v.exe r6v.exe r1l.exe r2l.exe r3l.exe r4l.exe r5l.exe r6l.exe r1lm.exe r2lm.exe r3lm.exe r4lm.exe r5lm.exe r6lm.exe r1lv.exe r2lv.exe r3lv.exe r4lv.exe r5lv.exe r6lv.exe
echo testing static single threaded version....
r1 tests.txt test1252.txt
r2 tests.txt
r3 tests.txt
r4 tests.txt test1252.txt
r5 tests.txt
r6 tests.txt
echo testing static multi-threaded version....
r1m tests.txt test1252.txt
r2m tests.txt
r3m tests.txt
r4m tests.txt test1252.txt
r5m tests.txt
r6m tests.txt
echo testing static VCL version....
r1v tests.txt test1252.txt
r2v tests.txt
r3v tests.txt
r4v tests.txt test1252.txt
r5v tests.txt
r6v tests.txt
echo testing dll single threaded version....
r1l tests.txt test1252.txt
r2l tests.txt
r3l tests.txt
r4l tests.txt test1252.txt
r5l tests.txt
r6l tests.txt
echo testing dll multi-threaded version....
r1lm tests.txt test1252.txt
r2lm tests.txt
r3lm tests.txt
r4lm tests.txt test1252.txt
r5lm tests.txt
r6lm tests.txt
echo testing dll VCL version....
r1lv tests.txt test1252.txt
r2lv tests.txt
r3lv tests.txt
r4lv tests.txt test1252.txt
r5lv tests.txt
r6lv tests.txt
r1.exe : tests.cpp regress.cpp parse.cpp
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er1.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp
r2.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er2.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
r3.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er3.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
r4.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er4.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
r5.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er5.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
r6.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er6.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
r1m.exe : tests.cpp regress.cpp parse.cpp
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er1m.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp
r2m.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er2m.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
r3m.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er3m.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
r4m.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er4m.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
r5m.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er5m.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
r6m.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er6m.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
r1v.exe : tests.cpp regress.cpp parse.cpp
$(BCC32) -tWM -tWV $(CFLAGS) -er1v.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp $(BPL)
r2v.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWV $(CFLAGS) -er2v.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(BPL)
r3v.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWV $(CFLAGS) -er3v.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(BPL)
r4v.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWV $(CFLAGS) -er4v.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(BPL)
r5v.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWV $(CFLAGS) -er5v.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(BPL)
r6v.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWV $(CFLAGS) -er6v.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(BPL)
r1l.exe : tests.cpp regress.cpp parse.cpp
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er1l.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp
r2l.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er2l.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
r3l.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er3l.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
r4l.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er4l.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
r5l.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er5l.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
r6l.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er6l.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
r1lm.exe : tests.cpp regress.cpp parse.cpp
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er1lm.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp
r2lm.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er2lm.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
r3lm.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er3lm.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
r4lm.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er4lm.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
r5lm.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er5lm.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
r6lm.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er6lm.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
r1lv.exe : tests.cpp regress.cpp parse.cpp
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er1lv.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp $(BPI)
r2lv.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er2lv.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(BPI)
r3lv.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er3lv.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(BPI)
r4lv.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er4lv.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(BPI)
r5lv.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er5lv.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(BPI)
r6lv.exe : tests.cpp parse.cpp regress.cpp
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er6lv.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(BPI)

View File

@ -3,16 +3,18 @@
#
# g++ 2.95 and greater
#
CXX= g++ $(INCLUDES) -pedantic -Wall -I../../../../ -I./ $(CXXFLAGS) -L../../build/gcc $(LDFLAGS)
CXX= g++ $(INCLUDES) -I../../../../ -I./ $(CXXFLAGS) -L../../build/gcc $(LDFLAGS)
total : r2
./r2 tests.txt
total : gcc_regress
./gcc_regress tests.txt
r2 : tests.cpp parse.cpp regress.cpp
$(CXX) -O2 -o r2 tests.cpp parse.cpp regress.cpp -lboost_regex $(LIBS)
gcc_regress : tests.cpp parse.cpp regress.cpp
$(CXX) -O2 -o gcc_regress tests.cpp parse.cpp regress.cpp -lboost_regex $(LIBS)
debug : tests.cpp parse.cpp regress.cpp
$(CXX) -g -o r2 tests.cpp parse.cpp regress.cpp -lboost_regex_debug $(LIBS)
$(CXX) -g -o gcc_regress tests.cpp parse.cpp regress.cpp -lboost_regex_debug $(LIBS)

View File

@ -1,6 +1,6 @@
/*
*
* Copyright (c) 1998-2000
* Copyright (c) 1998-2002
* Dr John Maddock
*
* Permission to use, copy, modify, distribute and sell this software
@ -331,3 +331,4 @@ void expand_escapes(string_type& s)

View File

@ -1,6 +1,6 @@
/*
*
* Copyright (c) 1998-2000
* Copyright (c) 1998-2002
* Dr John Maddock
*
* Permission to use, copy, modify, distribute and sell this software
@ -193,3 +193,4 @@ template test_string_type regex_merge(const test_string_type&,
#endif

View File

@ -1,6 +1,6 @@
/*
*
* Copyright (c) 1998-2000
* Copyright (c) 1998-2002
* Dr John Maddock
*
* Permission to use, copy, modify, distribute and sell this software
@ -285,3 +285,4 @@ void jm_debug_alloc::deallocate(void* pv, size_type n)
}

View File

@ -1,6 +1,6 @@
/*
*
* Copyright (c) 1998-2000
* Copyright (c) 1998-2002
* Dr John Maddock
*
* Permission to use, copy, modify, distribute and sell this software
@ -444,3 +444,4 @@ typedef boost::reg_expression<char_t, boost::c_regex_traits<char_t>, jm_debug_al

View File

@ -1,6 +1,6 @@
/*
*
* Copyright (c) 1998-2000
* Copyright (c) 1998-2002
* Dr John Maddock
*
* Permission to use, copy, modify, distribute and sell this software
@ -792,3 +792,4 @@ void reset_error()

View File

@ -18,11 +18,20 @@ INCLUDES=
#
XLFLAGS=
CFLAGS= $(INCLUDES) /Oityb1 /GF /Gy -GX -GR -I..\..\..\..\ $(CXXFLAGS)
!IF "$(MSVCDIR)" == ""
!ERROR Variable MSVCDIR not set.
!ENDIF
LFLAGS= -link /LIBPATH:..\..\build\vc6-stlport user32.lib $(XLFLAGS)
!IF "$(STLPORT_PATH)" == ""
!ERROR Variable STLPORT_PATH not set.
!ENDIF
all :: r1m.exe r2m.exe r4m.exe r5m.exe r1l.exe r2l.exe r4l.exe r5l.exe r1ls.exe r2ls.exe r4ls.exe r5ls.exe r1md.exe r2md.exe r4md.exe r5md.exe r1lmd.exe r2lmd.exe r4lmd.exe r5lmd.exe r1mdd.exe r2mdd.exe r4mdd.exe r5mdd.exe r1lmdd.exe r2lmdd.exe
CFLAGS= $(INCLUDES) /I$(STLPORT_PATH)\stlport /O2 /GF /Gy -GX -GR -I..\..\..\..\ $(CXXFLAGS)
LFLAGS= -link /LIBPATH:..\..\build\vc6-stlport /LIBPATH:$(STLPORT_PATH)\lib user32.lib $(XLFLAGS)
all : $(STLPORT_PATH)\stlport\string r1m.exe r2m.exe r4m.exe r5m.exe r1l.exe r2l.exe r4l.exe r5l.exe r1ls.exe r2ls.exe r4ls.exe r5ls.exe r1md.exe r2md.exe r4md.exe r5md.exe r1lmd.exe r2lmd.exe r4lmd.exe r5lmd.exe r1mdd.exe r2mdd.exe r4mdd.exe r5mdd.exe r1lmdd.exe r2lmdd.exe
echo testing static multi-threaded version....
r1m tests.txt test1252.txt
r2m tests.txt
@ -193,3 +202,5 @@ r6mdd.exe : tests.cpp parse.cpp regress.cpp

View File

@ -1,6 +1,6 @@
/*
*
* Copyright (c) 1998-2000
* Copyright (c) 1998-2002
* Dr John Maddock
*
* Permission to use, copy, modify, distribute and sell this software
@ -200,3 +200,4 @@ template test_string_type regex_merge(const test_string_type&,
#error "Comeau in VC6 mode goes into an infinite loop trying to link this program!!!"
#endif