Annotation of embedaddon/php/build/genif.sh, revision 1.1

1.1     ! misho       1: #! /bin/sh
        !             2: 
        !             3: # $Id: genif.sh,v 1.6 2005-06-21 13:47:38 sniper Exp $
        !             4: # replacement for genif.pl
        !             5: 
        !             6: infile=$1
        !             7: shift
        !             8: srcdir=$1
        !             9: shift
        !            10: extra_module_ptrs=$1
        !            11: shift
        !            12: awk=$1
        !            13: shift
        !            14: 
        !            15: if test -z "$infile" || test -z "$srcdir"; then
        !            16:        echo "please supply infile and srcdir"
        !            17:        exit 1
        !            18: fi
        !            19: 
        !            20: header_list=
        !            21: olddir=`pwd`
        !            22: cd $srcdir
        !            23: 
        !            24: module_ptrs="$extra_module_ptrs`echo $@ | $awk -f ./build/order_by_dep.awk`"
        !            25: 
        !            26: for ext in ${1+"$@"} ; do
        !            27:        header_list="$header_list ext/$ext/*.h*"
        !            28: done
        !            29: 
        !            30: includes=`$awk -f ./build/print_include.awk $header_list`
        !            31: 
        !            32: cd $olddir
        !            33: 
        !            34: cat $infile | \
        !            35:        sed \
        !            36:        -e "s'@EXT_INCLUDE_CODE@'$includes'" \
        !            37:        -e "s'@EXT_MODULE_PTRS@'$module_ptrs'" \
        !            38:        -e 's/@NEWLINE@/\
        !            39: /g'
        !            40: 
        !            41: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>