165de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich:: AH 20-12-06 modified for new PCRE-7.0 and VP/BCC
265de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich:: PH 19-03-07 renamed !compile.txt and !linklib.txt as makevp-compile.txt and
365de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich::             makevp-linklib.txt
465de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich:: PH 26-03-07 re-renamed !compile.txt and !linklib.txt as makevp-c.txt and
565de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich::             makevp-l.txt
665de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich:: PH 29-03-07 hopefully the final rename to makevp_c and makevp_l
765de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich:: AH 27.08.08 updated for new PCRE-7.7
865de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich::             required PCRE.H and CONFIG.H will be generated if not existing
965de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
1065de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich@echo off
1165de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichecho.
1265de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichecho Compiling PCRE with BORLAND C++ for VIRTUAL PASCAL
1365de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichecho.
1465de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
1565de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichREM This file was contributed by Alexander Tokarev for building PCRE for use
1665de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichREM with Virtual Pascal. It has not been tested with the latest PCRE release.
1765de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
1865de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichREM This file has been modified and extended to compile with newer PCRE releases
1965de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichREM by Stefan Weber (Angels Holocaust).
2065de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
2165de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichREM CHANGE THIS FOR YOUR BORLAND C++ COMPILER PATH
2265de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichSET BORLAND=f:\bcc
2365de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichREM location of the TASM binaries, if compiling with the -B BCC switch
2465de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichSET TASM=f:\tasm
2565de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
2665de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichSET PATH=%PATH%;%BORLAND%\bin;%TASM%\bin
2765de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichSET PCRE_VER=77
2865de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichSET COMPILE_DEFAULTS=-DHAVE_CONFIG_H -DPCRE_STATIC -I%BORLAND%\include
2965de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
3065de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichdel pcre%PCRE_VER%.lib >nul 2>nul
3165de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
3265de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich:: sh configure
3365de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
3465de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich:: check for needed header files
3565de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichif not exist pcre.h copy pcre.h.generic pcre.h
3665de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichif not exist config.h copy config.h.generic config.h
3765de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
3865de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichbcc32 -DDFTABLES %COMPILE_DEFAULTS% -L%BORLAND%\lib dftables.c
3965de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichIF ERRORLEVEL 1 GOTO ERROR
4065de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
4165de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich:: dftables > chartables.c
4265de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichdftables pcre_chartables.c
4365de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
4465de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichREM compile and link the PCRE library into lib: option -B for ASM compile works too
4565de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichbcc32 -a4 -c -RT- -y- -v- -u- -R- -Q- -X -d -fp -ff -P- -O2 -Oc -Ov -3 -w-8004 -w-8064 -w-8065 -w-8012 -UDFTABLES -DVPCOMPAT %COMPILE_DEFAULTS% @makevp_c.txt
4665de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichIF ERRORLEVEL 1 GOTO ERROR
4765de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
4865de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichtlib %BORLAND%\lib\cw32.lib *calloc *del *strncmp *memcpy *memmove *memset *memcmp *strlen
4965de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichIF ERRORLEVEL 1 GOTO ERROR
5065de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichtlib pcre%PCRE_VER%.lib @makevp_l.txt +calloc.obj +del.obj +strncmp.obj +memcpy.obj +memmove.obj +memset.obj +memcmp.obj +strlen.obj
5165de34233da93a3d65c00b8aad3ff9aad44c57deNick KralevichIF ERRORLEVEL 1 GOTO ERROR
5265de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
5365de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichdel *.obj *.tds *.bak >nul 2>nul
5465de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
5565de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichecho ---
5665de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichecho Now the library should be complete. Please check all messages above.
5765de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichecho Don't care for warnings, it's OK.
5865de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichgoto END
5965de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
6065de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich:ERROR
6165de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichecho ---
6265de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichecho Error while compiling PCRE. Aborting...
6365de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichpause
6465de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevichgoto END
6565de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich
6665de34233da93a3d65c00b8aad3ff9aad44c57deNick Kralevich:END
67