Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: before-sapi-sp…
Fetching contributors…

Cannot retrieve contributors at this time

executable file 74 lines (51 sloc) 1.158 kB
#!/bin/sh
extname="$1"
EXTNAME=`echo $1|tr a-z A-Z`
function givup() {
echo $*
exit 1
}
if test "$extname" = ""; then
givup "usage: $0 extension-name"
fi
if test -d "$extname" ; then
givup "Directory $extname already exists."
fi
echo "Creating directory"
mkdir $extname || givup "Cannot create directory $extname"
cd $extname
chmod 755 .
echo -n "Creating basic files:"
echo -n " config.m4"
cat >config.m4 <<eof
dnl \$Id\$
dnl config.m4 for extension $extname
dnl don't forget to call PHP_EXTENSION($extname)
eof
echo -n " setup.stub"
cat >setup.stub <<eof
# \$Source\$
# \$Id\$
define_option with-$extname '$extname support?' yesnodir no \\
' Whether to build the $extname extension.'
eof
echo -n " Makefile.am"
cat >Makefile.am <<eof
# \$Id\$
INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
noinst_LIBRARIES=libphpext_$extname.a
libphpext_${extname}_a_SOURCES=$extname.c
eof
echo -n " .cvsignore"
cat >.cvsignore <<eof
.deps
Makefile.in
Makefile
eof
echo -n " config.h.stub"
cat >config.h.stub<<eof
/* define if you want to use the $extname extension */
/* #undef HAVE_LIB$EXTNAME */
eof
chmod 644 *
echo " [done]."
Jump to Line
Something went wrong with that request. Please try again.