summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite/publish.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_sqlite/sqlite/publish.sh')
-rw-r--r--ext/pdo_sqlite/sqlite/publish.sh69
1 files changed, 42 insertions, 27 deletions
diff --git a/ext/pdo_sqlite/sqlite/publish.sh b/ext/pdo_sqlite/sqlite/publish.sh
index 043c89a039..138f3d901a 100644
--- a/ext/pdo_sqlite/sqlite/publish.sh
+++ b/ext/pdo_sqlite/sqlite/publish.sh
@@ -1,9 +1,7 @@
#!/bin/sh
#
-# This script is used to compile SQLite and all its documentation and
-# ship everything up to the SQLite website. This script will only work
-# on the system "zadok" at the Hwaci offices. But others might find
-# the script useful as an example.
+# This script is used to compile SQLite and package everything up
+# so that it is ready to move to the SQLite website.
#
# Set srcdir to the name of the directory that contains the publish.sh
@@ -20,63 +18,80 @@ chmod +x $srcdir/install-sh
#
VERS=`cat $srcdir/VERSION`
VERSW=`sed 's/\./_/g' $srcdir/VERSION`
+echo "VERSIONS: $VERS $VERSW"
# Start by building an sqlite shell for linux.
#
make clean
-make sqlite3
+make sqlite3.c
+CFLAGS="-Os -DSQLITE_ENABLE_FTS3=1 -DSQLITE_THREADSAFE=0"
+echo '***** '"COMPILING sqlite3-$VERS.bin..."
+gcc $CFLAGS -Itsrc sqlite3.c tsrc/shell.c -o sqlite3 -ldl
strip sqlite3
mv sqlite3 sqlite3-$VERS.bin
gzip sqlite3-$VERS.bin
+chmod 644 sqlite3-$VERS.bin.gz
mv sqlite3-$VERS.bin.gz doc
# Build a source archive useful for windows.
#
make target_source
cd tsrc
+echo '***** BUILDING preprocessed source archives'
+rm fts[12]* icu*
+rm -f ../doc/sqlite-source-$VERSW.zip
zip ../doc/sqlite-source-$VERSW.zip *
cd ..
+cp tsrc/sqlite3.h tsrc/sqlite3ext.h .
+pwd
+zip doc/sqlite-amalgamation-$VERSW.zip sqlite3.c sqlite3.h sqlite3ext.h
# Build the sqlite.so and tclsqlite.so shared libraries
# under Linux
#
-. $srcdir/mkso.sh
-cd tsrc
+TCLDIR=/home/drh/tcltk/846/linux/846linux
+TCLSTUBLIB=$TCLDIR/libtclstub8.4g.a
+CFLAGS="-Os -DSQLITE_ENABLE_FTS3=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1"
+echo '***** BUILDING shared libraries for linux'
+gcc $CFLAGS -shared tclsqlite3.c $TCLSTUBLIB -o tclsqlite3.so -lpthread
+strip tclsqlite3.so
+chmod 644 tclsqlite3.so
mv tclsqlite3.so tclsqlite-$VERS.so
gzip tclsqlite-$VERS.so
-mv tclsqlite-$VERS.so.gz ../doc
+mv tclsqlite-$VERS.so.gz doc
+gcc $CFLAGS -shared sqlite3.c -o sqlite3.so -lpthread
+strip sqlite3.so
+chmod 644 sqlite3.so
mv sqlite3.so sqlite-$VERS.so
gzip sqlite-$VERS.so
-mv sqlite-$VERS.so.gz ../doc
-cd ..
+mv sqlite-$VERS.so.gz doc
+
# Build the tclsqlite3.dll and sqlite3.dll shared libraries.
#
. $srcdir/mkdll.sh
-cd tsrc
-echo zip ../doc/tclsqlite-$VERSW.zip tclsqlite3.dll
-zip ../doc/tclsqlite-$VERSW.zip tclsqlite3.dll
-echo zip ../doc/sqlitedll-$VERSW.zip sqlite3.dll sqlite3.def
-zip ../doc/sqlitedll-$VERSW.zip sqlite3.dll sqlite3.def
-cd ..
+echo '***** PACKAGING shared libraries for windows'
+echo zip doc/tclsqlite-$VERSW.zip tclsqlite3.dll
+zip doc/tclsqlite-$VERSW.zip tclsqlite3.dll
+echo zip doc/sqlitedll-$VERSW.zip sqlite3.dll sqlite3.def
+zip doc/sqlitedll-$VERSW.zip sqlite3.dll sqlite3.def
# Build the sqlite.exe executable for windows.
#
-make target_source
-cd tsrc
-rm tclsqlite.c
-OPTS='-DSTATIC_BUILD=1 -DNDEBUG=1'
-i386-mingw32msvc-gcc -O2 $OPTS -I. -I$TCLDIR *.c -o sqlite3.exe
-zip ../doc/sqlite-$VERSW.zip sqlite3.exe
-cd ..
+OPTS='-DSTATIC_BUILD=1 -DNDEBUG=1 -DSQLITE_THREADSAFE=0'
+OPTS="$OPTS -DSQLITE_ENABLE_FTS3=1"
+i386-mingw32msvc-gcc -Os $OPTS -Itsrc -I$TCLDIR sqlite3.c tsrc/shell.c \
+ -o sqlite3.exe
+zip doc/sqlite-$VERSW.zip sqlite3.exe
# Construct a tarball of the source tree
#
+echo '***** BUILDING source archive'
ORIGIN=`pwd`
cd $srcdir
cd ..
mv sqlite sqlite-$VERS
-EXCLUDE=`find sqlite-$VERS -print | grep CVS | sed 's,^, --exclude ,'`
+EXCLUDE=`find sqlite-$VERS -print | egrep (CVS|www/|art/|doc/|contrib/) | sed 's,^, --exclude ,'`
tar czf $ORIGIN/doc/sqlite-$VERS.tar.gz $EXCLUDE sqlite-$VERS
mv sqlite-$VERS sqlite
cd $ORIGIN
@@ -112,6 +127,6 @@ mv $HOME/rpm/SRPMS/sqlite-$vers*.rpm doc
# Build the website
#
#cp $srcdir/../historical/* doc
-make doc
-cd doc
-chmod 644 *.gz
+#make doc
+#cd doc
+#chmod 644 *.gz