diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
---|---|---|
committer | <> | 2013-04-03 16:25:08 +0000 |
commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /build/genif.sh | |
download | php2-master.tar.gz |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'build/genif.sh')
-rw-r--r-- | build/genif.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/build/genif.sh b/build/genif.sh new file mode 100644 index 0000000..14e19b7 --- /dev/null +++ b/build/genif.sh @@ -0,0 +1,41 @@ +#! /bin/sh + +# $Id: genif.sh,v 1.6 2005-06-21 13:47:38 sniper Exp $ +# replacement for genif.pl + +infile=$1 +shift +srcdir=$1 +shift +extra_module_ptrs=$1 +shift +awk=$1 +shift + +if test -z "$infile" || test -z "$srcdir"; then + echo "please supply infile and srcdir" + exit 1 +fi + +header_list= +olddir=`pwd` +cd $srcdir + +module_ptrs="$extra_module_ptrs`echo $@ | $awk -f ./build/order_by_dep.awk`" + +for ext in ${1+"$@"} ; do + header_list="$header_list ext/$ext/*.h*" +done + +includes=`$awk -f ./build/print_include.awk $header_list` + +cd $olddir + +cat $infile | \ + sed \ + -e "s'@EXT_INCLUDE_CODE@'$includes'" \ + -e "s'@EXT_MODULE_PTRS@'$module_ptrs'" \ + -e 's/@NEWLINE@/\ +/g' + + |