cvs: php4 / configure.in genif.sh /build print_include.awk
| From: | Sascha Schumann | Date: | Wed, 20 Dec 2000 16:29:08 +0000 |
| Subject: | cvs: php4 / configure.in genif.sh /build print_include.awk | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-3218@lists.php.net to get a copy of this message | ||
sas Wed Dec 20 08:29:08 2000 EDT
Added files:
/php4/build print_include.awk
Modified files:
/php4 configure.in genif.sh
Log:
Speed up the genif.sh script a little bit. Whereas it took three seconds
previously, it takes now about 100ms on a P233.
Index: php4/configure.in
diff -u php4/configure.in:1.201 php4/configure.in:1.202
--- php4/configure.in:1.201 Thu Dec 14 09:29:38 2000
+++ php4/configure.in Wed Dec 20 08:29:07 2000
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.201 2000/12/14 17:29:38 sas Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.202 2000/12/20 16:29:07 sas Exp $ -*- sh -*-
dnl ## Process this file with autoconf to produce a configure script.
divert(1)
@@ -865,7 +865,7 @@
echo "creating main/internal_functions.c"
extensions=\
grep '^s.@EXT_STATIC@' \$0|sed -e 's/^.*@% *//' -e
's/%.*$//'\
dnl mv -f main/internal_functions.c main/internal_functions.c.old 2>/dev/null
- sh $srcdir/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS"
\$extensions > main/internal_functions.c
+ sh $srcdir/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS"
$AWK \$extensions > main/internal_functions.c
dnl if cmp main/internal_functions.c.old main/internal_functions.c > /dev/null 2>&1;
then
dnl echo "main/internal_functions.c is unchanged"
dnl mv main/internal_functions.c.old main/internal_functions.c
Index: php4/genif.sh
diff -u php4/genif.sh:1.9 php4/genif.sh:1.10
--- php4/genif.sh:1.9 Tue Jun 27 09:22:26 2000
+++ php4/genif.sh Wed Dec 20 08:29:07 2000
@@ -1,6 +1,6 @@
#! /bin/sh
-# $Id: genif.sh,v 1.9 2000/06/27 16:22:26 sas Exp $
+# $Id: genif.sh,v 1.10 2000/12/20 16:29:07 sas Exp $
# replacement for genif.pl
infile="$1"
@@ -9,6 +9,8 @@
shift
extra_module_ptrs="$1"
shift
+awk="$1"
+shift
if test "$infile" = "" -o "$srcdir" = ""; then
echo "please supply infile and srcdir"
@@ -16,19 +18,16 @@
fi
module_ptrs="$extra_module_ptrs"
-includes=""
-
+header_list=""
olddir=pwd
cd $srcdir
for ext in ${1+"$@"} ; do
module_ptrs=" phpext_${ext}_ptr,\\\n$module_ptrs"
- for header in ext/$ext/*.h ; do
- if grep phpext_ $header >/dev/null 2>&1 ; then
- includes="#include \"$header\"\\\n$includes"
- fi
- done
+ header_list="$header_list ext/$ext/*.h"
done
+
+includes=$awk -f $srcdir/build/print_include.awk $header_list
cd $olddir
Index: php4/build/print_include.awk
+++ php4/build/print_include.awk
/phpext_/ {
if (old_filename != FILENAME) {
printf "#include \"" FILENAME "\"\\\\n"
old_filename = FILENAME
}
}