From: foobar Date: Mon, 14 Mar 2005 01:09:49 +0000 (+0000) Subject: - Move stuff that belongs in Makefile into Makefile.frag X-Git-Tag: php-5.0.1b1~807 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bde0661ef6bf5b79ce11a0bcdd25c8f51de91ebe;p=php - Move stuff that belongs in Makefile into Makefile.frag --- diff --git a/ext/pdo_sqlite/Makefile.frag b/ext/pdo_sqlite/Makefile.frag new file mode 100644 index 0000000000..237fe8ea65 --- /dev/null +++ b/ext/pdo_sqlite/Makefile.frag @@ -0,0 +1,21 @@ + +$(builddir)/sqlite/tool/lemon: $(srcdir)/sqlite/tool/lemon.c + $(CC) $(srcdir)/sqlite/tool/lemon.c -o $@ + cp $(srcdir)/sqlite/tool/lempar.c $(builddir)/sqlite/tool/ + +$(builddir)/sqlite/tool/mkkeywordhash: $(srcdir)/sqlite/tool/mkkeywordhash.c + $(CC) $(srcdir)/sqlite/tool/mkkeywordhash.c -o $@ + +$(srcdir)/sqlite/src/parse.c: $(srcdir)/sqlite/src/parse.y $(builddir)/sqlite/tool/lemon + $(builddir)/sqlite/tool/lemon $(srcdir)/sqlite/src/parse.y + +$(srcdir)/sqlite/src/parse.h: $(srcdir)/sqlite/src/parse.c + +$(srcdir)/sqlite/src/opcodes.h: $(srcdir)/sqlite/src/parse.h + cat $(srcdir)/sqlite/src/parse.h $(srcdir)/sqlite/src/vdbe.c | $(AWK) -f $(srcdir)/sqlite/mkopcodeh.awk > $@ + +$(srcdir)/sqlite/src/opcodes.c: $(srcdir)/sqlite/src/opcodes.h + sort -n +2 $(srcdir)/sqlite/src/opcodes.h | $(AWK) -f $(srcdir)/sqlite/mkopcodec.awk > $@ + +$(srcdir)/sqlite/src/keywordhash.h: $(builddir)/sqlite/tool/mkkeywordhash + $(srcdir)/sqlite/tool/mkkeywordhash > $(srcdir)/sqlite/src/keywordhash.h diff --git a/ext/pdo_sqlite/config.m4 b/ext/pdo_sqlite/config.m4 index aba8cf12db..2d616d649c 100644 --- a/ext/pdo_sqlite/config.m4 +++ b/ext/pdo_sqlite/config.m4 @@ -5,7 +5,7 @@ dnl vim:et:sw=2:ts=2: if test "$PHP_PDO" != "no"; then PHP_ARG_WITH(pdo-sqlite, for sqlite 3 driver for PDO, -[ --with-pdo-sqlite Include PDO sqlite 3 support],yes) +[ --with-pdo-sqlite[=DIR] Include PDO sqlite 3 support.],yes) if test "$PHP_PDO_SQLITE" != "no"; then @@ -83,21 +83,14 @@ if test "$PHP_PDO_SQLITE" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/sqlite) PHP_ADD_BUILD_DIR($ext_builddir/sqlite/src) + PHP_ADD_BUILD_DIR($ext_builddir/sqlite/tool) + PHP_ADD_MAKEFILE_FRAGMENT + AC_CHECK_SIZEOF(char *,4) AC_DEFINE(SQLITE_PTR_SZ, SIZEOF_CHAR_P, [Size of a pointer]) PDO_SQLITE_VERSION=`cat $ext_srcdir/sqlite/VERSION` PDO_SQLITE_VERSION_NUMBER=`echo $PDO_SQLITE_VERSION | awk -F. '{printf("%d%03d%03d", $1, $2, $3)}'` sed -e s/--VERS--/$PDO_SQLITE_VERSION/ -e s/--VERSION-NUMBER--/$PDO_SQLITE_VERSION_NUMBER/ $ext_srcdir/sqlite/src/sqlite.h.in > $ext_srcdir/sqlite3.h - if ! test -f $ext_srcdir/sqlite/src/parse.h ; then - $CC -o $ext_srcdir/sqlite/tool/lemon $ext_srcdir/sqlite/tool/lemon.c - $ext_srcdir/sqlite/tool/lemon $ext_srcdir/sqlite/src/parse.y - cat $ext_srcdir/sqlite/src/parse.h $ext_srcdir/sqlite/src/vdbe.c | awk -f $ext_srcdir/sqlite/mkopcodeh.awk > $ext_srcdir/sqlite/src/opcodes.h - sort -n +2 $ext_srcdir/sqlite/src/opcodes.h | awk -f $ext_srcdir/sqlite/mkopcodec.awk > $ext_srcdir/sqlite/src/opcodes.c - $CC -o $ext_srcdir/sqlite/tool/mkkeywordhash $ext_srcdir/sqlite/tool/mkkeywordhash.c - $ext_srcdir/sqlite/tool/mkkeywordhash > $ext_srcdir/sqlite/src/keywordhash.h - else - touch $ext_srcdir/sqlite/src/parse.c $ext_srcdir/sqlite/src/parse.y - fi if test "$ext_shared" = "no" -o "$ext_srcdir" != "$abs_srcdir"; then echo '#include "php_config.h"' > $ext_srcdir/sqlite/src/config.h