]> git.kaiwu.me - nginx.git/commitdiff
switch Win32 building to modern PCRE versions (starting from 7.1)
authorIgor Sysoev <igor@sysoev.ru>
Wed, 13 May 2009 19:48:21 +0000 (19:48 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 13 May 2009 19:48:21 +0000 (19:48 +0000)
instead of single old 4.4 version

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 [deleted file]
auto/lib/pcre/patch.pcre.c [deleted file]
auto/lib/pcre/patch.pcre.in [deleted file]
auto/lib/pcre/patch.pcre.in.owc [deleted file]

index 021aab9fbe3baa240dd56ba6832166541f15a996..9f2c658bf179256afa7ac5855e7b95c5af738c48 100644 (file)
@@ -28,19 +28,15 @@ 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: $PCRE/pcre.h" | sed -e "s/\//$ngx_regex_dirsep/g"`
+`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.h:" | sed -e "s/\//$ngx_regex_dirsep/g"`
+       \$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre pcre.h
+
 END
 
     ;;
@@ -56,7 +52,6 @@ $PCRE/Makefile:       $NGX_MAKEFILE
        && CC="\$(CC)" CFLAGS="$PCRE_OPT" \\
        ./configure --disable-shared
 
-
 $PCRE/.libs/libpcre.a: $PCRE/Makefile
        cd $PCRE \\
        && \$(MAKE) libpcre.la
index d31a5aa51c87e4f05f542732ca0cd3108d578418..40d579fb59d28a6e593fff95f64a13794309439e 100644 (file)
@@ -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
+       bcc32 -c $(CFLAGS) -I. $(PCREFLAGS) pcre_*.c
 
-       dftables > chartables.c
+       > pcre.lst
+       for %n in (*.obj) do @echo +%n & >> pcre.lst
+       echo + >> pcre.lst
 
-       bcc32 -c $(CFLAGS) $(PCREFLAGS) maketables.c get.c study.c pcre.c
-
-       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
index c62c821340e01115edc5eb43bdb536723ec22cdb..47ae6991aeecc88b5b131d4ad0780915d0365877 100644 (file)
@@ -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
+       cl -nologo -c $(CFLAGS) -I . $(PCREFLAGS) pcre_*.c
 
-       dftables > chartables.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
index 12c62201079b27cdf703da85aee7bed15b87d5f0..b2f1d1297b2e5bc87e9e9fa77fb2c2965ef771e3 100644 (file)
@@ -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
diff --git a/auto/lib/pcre/patch.config.in b/auto/lib/pcre/patch.config.in
deleted file mode 100644 (file)
index d28b6fe..0000000
+++ /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
diff --git a/auto/lib/pcre/patch.pcre.c b/auto/lib/pcre/patch.pcre.c
deleted file mode 100644 (file)
index 8e56b9d..0000000
+++ /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
diff --git a/auto/lib/pcre/patch.pcre.in b/auto/lib/pcre/patch.pcre.in
deleted file mode 100644 (file)
index 7ae32a9..0000000
+++ /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);
diff --git a/auto/lib/pcre/patch.pcre.in.owc b/auto/lib/pcre/patch.pcre.in.owc
deleted file mode 100644 (file)
index 8adbcbc..0000000
+++ /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 */