mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
8d5af8cb46
Fixes the build on Darwin 1.2
42 lines
675 B
Bash
42 lines
675 B
Bash
#! /bin/sh
|
|
|
|
# $Id: genif.sh,v 1.2 2001-03-30 14:02:20 sas Exp $
|
|
# replacement for genif.pl
|
|
|
|
infile="$1"
|
|
shift
|
|
srcdir="$1"
|
|
shift
|
|
extra_module_ptrs="$1"
|
|
shift
|
|
awk="$1"
|
|
shift
|
|
|
|
if test "$infile" = "" -o "$srcdir" = ""; then
|
|
echo "please supply infile and srcdir"
|
|
exit 1
|
|
fi
|
|
|
|
module_ptrs="$extra_module_ptrs"
|
|
header_list=""
|
|
olddir=`pwd`
|
|
cd $srcdir
|
|
|
|
for ext in ${1+"$@"} ; do
|
|
module_ptrs=" phpext_${ext}_ptr,@NEWLINE@$module_ptrs"
|
|
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'
|
|
|
|
|