summaryrefslogtreecommitdiff
path: root/genif.sh
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-12-20 16:29:07 +0000
committerSascha Schumann <sas@php.net>2000-12-20 16:29:07 +0000
commit060e647e5e420dbb9654314d4d1e3f503acce28a (patch)
tree29421664d4a28d84cacee82a902913b6d23076e0 /genif.sh
parent73c0f4b4c2dc1f47932890c4e4a574d68c1f1c24 (diff)
downloadphp-git-060e647e5e420dbb9654314d4d1e3f503acce28a.tar.gz
Speed up the genif.sh script a little bit. Whereas it took three seconds
previously, it takes now about 100ms on a P233.
Diffstat (limited to 'genif.sh')
-rw-r--r--genif.sh15
1 files changed, 7 insertions, 8 deletions
diff --git a/genif.sh b/genif.sh
index 968250f439..9f9dcd6ada 100644
--- a/genif.sh
+++ b/genif.sh
@@ -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 @@ srcdir="$1"
shift
extra_module_ptrs="$1"
shift
+awk="$1"
+shift
if test "$infile" = "" -o "$srcdir" = ""; then
echo "please supply infile and srcdir"
@@ -16,20 +18,17 @@ if test "$infile" = "" -o "$srcdir" = ""; then
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
cat $infile | \