changeset 2840:22c4c012c8c9

switch Win32 building to modern PCRE versions (starting from 7.1) instead of single old 4.4 version
author Igor Sysoev <igor@sysoev.ru>
date Wed, 13 May 2009 19:48:21 +0000
parents cb7739c822c6
children faafc084a7a4
files auto/lib/pcre/make auto/lib/pcre/makefile.bcc auto/lib/pcre/makefile.msvc auto/lib/pcre/makefile.owc auto/lib/pcre/patch.config.in auto/lib/pcre/patch.pcre.c auto/lib/pcre/patch.pcre.in auto/lib/pcre/patch.pcre.in.owc
diffstat 8 files changed, 29 insertions(+), 102 deletions(-) [+]
line wrap: on
line diff
--- a/auto/lib/pcre/make
+++ b/auto/lib/pcre/make
@@ -28,18 +28,14 @@ esac
 case "$NGX_PLATFORM" in
 
     win32)
-        cp auto/lib/pcre/patch.pcre.in $PCRE
-        cp auto/lib/pcre/patch.pcre.in.owc $PCRE
-        cp auto/lib/pcre/patch.config.in $PCRE
-        cp auto/lib/pcre/patch.pcre.c $PCRE
 
         cat << END                                            >> $NGX_MAKEFILE
 
-`echo "$PCRE/pcre.h:	$NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
-	\$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre pcre.h
+`echo "$PCRE/pcre.lib:	$NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
+	\$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre $ngx_opt
 
-`echo "$PCRE/pcre.lib:	$PCRE/pcre.h" | sed -e "s/\//$ngx_regex_dirsep/g"`
-	\$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre $ngx_opt
+`echo "$PCRE/pcre.h:" | sed -e "s/\//$ngx_regex_dirsep/g"`
+	\$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre pcre.h
 
 END
 
@@ -56,7 +52,6 @@ END
 	&& CC="\$(CC)" CFLAGS="$PCRE_OPT" \\
 	./configure --disable-shared
 
-
 $PCRE/.libs/libpcre.a:	$PCRE/Makefile
 	cd $PCRE \\
 	&& \$(MAKE) libpcre.la
--- a/auto/lib/pcre/makefile.bcc
+++ b/auto/lib/pcre/makefile.bcc
@@ -3,22 +3,23 @@
 
 
 CFLAGS =	-q -O2 -tWM -w-8004 $(CPU_OPT)
-PCREFLAGS =	-DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
+PCREFLAGS =	-DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
 
 
 pcre.lib:
 	cd $(PCRE)
 
-	bcc32 -q -edftables dftables.c
-
-	dftables > chartables.c
+	bcc32 -c $(CFLAGS) -I. $(PCREFLAGS) pcre_*.c
 
-	bcc32 -c $(CFLAGS) $(PCREFLAGS) maketables.c get.c study.c pcre.c
+	> pcre.lst
+	for %n in (*.obj) do @echo +%n & >> pcre.lst
+	echo + >> pcre.lst
 
-	tlib pcre.lib +maketables.obj +get.obj +study.obj +pcre.obj
+	tlib pcre.lib @pcre.lst
 
 pcre.h:
 	cd $(PCRE)
-	patch -o pcre.h pcre.in patch.pcre.in
-	patch -o config.h config.in patch.config.in
-	patch < patch.pcre.c
+
+	copy /y pcre.h.generic pcre.h
+	copy /y config.h.generic config.h
+	copy /y pcre_chartables.c.dist pcre_chartables.c
--- a/auto/lib/pcre/makefile.msvc
+++ b/auto/lib/pcre/makefile.msvc
@@ -3,24 +3,19 @@
 
 
 CFLAGS =	-O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT)
-PCREFLAGS =	-DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
+PCREFLAGS =	-DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
 
 
 pcre.lib:
 	cd $(PCRE)
 
-	cl -Fedftables dftables.c
-
-	dftables > chartables.c
+	cl -nologo -c $(CFLAGS) -I . $(PCREFLAGS) pcre_*.c
 
-	cl -nologo -c $(CFLAGS) $(PCREFLAGS)				\
-		maketables.c get.c study.c pcre.c
-
-	link -lib -out:pcre.lib -verbose:lib				\
-		maketables.obj get.obj study.obj pcre.obj
+	link -lib -out:pcre.lib -verbose:lib pcre_*.obj
 
 pcre.h:
 	cd $(PCRE)
-	patch -o pcre.h pcre.in patch.pcre.in
-	patch -o config.h config.in patch.config.in
-	patch < patch.pcre.c
+
+	copy /y pcre.h.generic pcre.h
+	copy /y config.h.generic config.h
+	copy /y pcre_chartables.c.dist pcre_chartables.c
--- a/auto/lib/pcre/makefile.owc
+++ b/auto/lib/pcre/makefile.owc
@@ -3,20 +3,21 @@
 
 
 CFLAGS =	-c -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT)
-PCREFLAGS =	-DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
+PCREFLAGS =	-DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
 
 
 pcre.lib:
 	cd $(PCRE)
 
-	wcl386 -zq -bt=nt -l=nt -fe=dftables dftables.c
-	dftables > chartables.c
+	wcl386 $(CFLAGS) -i=. $(PCREFLAGS) pcre_*.c
 
-	wcl386 $(CFLAGS) $(PCREFLAGS) maketables.c get.c study.c pcre.c
-	wlib -n pcre.lib maketables.obj get.obj study.obj pcre.obj
+	dir /b *.obj > pcre.lst
 
+	wlib -n pcre.lib @pcre.lst
 
 pcre.h:
 	cd $(PCRE)
-	patch -o pcre.h pcre.in patch.pcre.in.owc
-	patch -o config.h config.in patch.config.in
+
+	copy /y pcre.h.generic pcre.h
+	copy /y config.h.generic config.h
+	copy /y pcre_chartables.c.dist pcre_chartables.c
deleted file mode 100644
--- a/auto/lib/pcre/patch.config.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- config.in	Thu Aug 21 14:43:07 2003
-+++ config.in	Sun Mar  7 02:37:24 2004
-@@ -28,7 +28,7 @@
- found. */
- 
- #define HAVE_STRERROR 0
--#define HAVE_MEMMOVE  0
-+#define HAVE_MEMMOVE 1
- 
- /* There are some non-Unix systems that don't even have bcopy(). If this macro
- is false, an emulation is used. If HAVE_MEMMOVE is set to 1, the value of
deleted file mode 100644
--- a/auto/lib/pcre/patch.pcre.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- pcre.c	Thu Aug 21 14:43:07 2003
-+++ pcre.c	Tue Mar 22 12:56:59 2005
-@@ -246,8 +246,8 @@
- extern "C" void  (*pcre_free)(void *) = free;
- extern "C" int   (*pcre_callout)(pcre_callout_block *) = NULL;
- #else
--void *(*pcre_malloc)(size_t) = malloc;
--void  (*pcre_free)(void *) = free;
-+void *(__cdecl *pcre_malloc)(size_t) = malloc;
-+void  (__cdecl *pcre_free)(void *) = free;
- int   (*pcre_callout)(pcre_callout_block *) = NULL;
- #endif
- #endif
deleted file mode 100644
--- a/auto/lib/pcre/patch.pcre.in
+++ /dev/null
@@ -1,26 +0,0 @@
---- pcre.in	Thu Aug 21 14:43:07 2003
-+++ pcre.h	Tue Mar 22 12:56:59 2005
-@@ -10,9 +10,9 @@
- /* The file pcre.h is build by "configure". Do not edit it; instead
- make changes to pcre.in. */
- 
--#define PCRE_MAJOR          @PCRE_MAJOR@
--#define PCRE_MINOR          @PCRE_MINOR@
--#define PCRE_DATE           @PCRE_DATE@
-+#define PCRE_MAJOR          4
-+#define PCRE_MINOR          4
-+#define PCRE_DATE           21-August-2003
- 
- /* Win32 uses DLL by default */
- 
-@@ -143,8 +143,8 @@
- have to be different again. */
- 
- #ifndef VPCOMPAT
--PCRE_DATA_SCOPE void *(*pcre_malloc)(size_t);
--PCRE_DATA_SCOPE void  (*pcre_free)(void *);
-+PCRE_DATA_SCOPE void *(__cdecl *pcre_malloc)(size_t);
-+PCRE_DATA_SCOPE void  (__cdecl *pcre_free)(void *);
- PCRE_DATA_SCOPE int   (*pcre_callout)(pcre_callout_block *);
- #else   /* VPCOMPAT */
- extern void *pcre_malloc(size_t);
deleted file mode 100644
--- a/auto/lib/pcre/patch.pcre.in.owc
+++ /dev/null
@@ -1,15 +0,0 @@
---- pcre.in	Thu Aug 21 14:43:07 2003
-+++ pcre.h	Tue Mar 22 12:56:59 2005
-@@ -10,9 +10,9 @@
- /* The file pcre.h is build by "configure". Do not edit it; instead
- make changes to pcre.in. */
- 
--#define PCRE_MAJOR          @PCRE_MAJOR@
--#define PCRE_MINOR          @PCRE_MINOR@
--#define PCRE_DATE           @PCRE_DATE@
-+#define PCRE_MAJOR          4
-+#define PCRE_MINOR          4
-+#define PCRE_DATE           21-August-2003
- 
- /* Win32 uses DLL by default */
-