summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/export.build4
-rw-r--r--buildfile70
-rw-r--r--sqlite3/buildfile67
-rw-r--r--sqlite3/sqlite3.c (renamed from sqlite3.c)0
-rw-r--r--sqlite3/sqlite3.h (renamed from sqlite3.h)0
-rw-r--r--sqlite3/sqlite3ext.h (renamed from sqlite3ext.h)0
6 files changed, 72 insertions, 69 deletions
diff --git a/build/export.build b/build/export.build
index dc450a5..22b2e66 100644
--- a/build/export.build
+++ b/build/export.build
@@ -3,7 +3,7 @@
$out_root/:
{
- include ./
+ include sqlite3/
}
-export $out_root/lib{sqlite3}
+export $out_root/sqlite3/lib{sqlite3}
diff --git a/buildfile b/buildfile
index 0a9fb43..ceb02a4 100644
--- a/buildfile
+++ b/buildfile
@@ -1,70 +1,6 @@
# file : buildfile
# copyright : not copyrighted - public domain
-./: lib{sqlite3} test/ doc{README} file{manifest}
-include test/
-
-lib{sqlite3}: {h c}{sqlite3} h{sqlite3ext}
-
-# The set of features we enable by default is inspired by Debian, Fedora, and
-# the official documentation.
-#
-# Note that we "prefix" them to what might have been specified by the user so
-# that it is possible to override the defaults by specifying them as =0 (it's
-# also the reason we use cc.* instead of c.*, the former comes first).
-#
-# PREUPDATE_HOOK is required by SESSION
-#
-# -DSQLITE_ENABLE_SESSION=1 removed due to bug in 3.14.1.
-#
-cc.poptions =+ \
--DSQLITE_THREADSAFE=1 \
--DSQLITE_ENABLE_FTS4=1 \
--DSQLITE_ENABLE_FTS5=1 \
--DSQLITE_ENABLE_RTREE=1 \
--DSQLITE_ENABLE_JSON1=1 \
--DSQLITE_SECURE_DELETE=1 \
--DSQLITE_ENABLE_DBSTAT_VTAB=1 \
--DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
--DSQLITE_ENABLE_LOAD_EXTENSION=1 \
--DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
--DSQLITE_ENABLE_COLUMN_METADATA=1 \
--DSQLITE_ENABLE_FTS3_PARENTHESIS=1
-
-if ($c.target.class != "windows")
-{
- cc.poptions =+ -DHAVE_USLEEP=1
-
- # SQLITE_THREADSAFE requres -lpthread
- # SQLITE_ENABLE_LOAD_EXTENSION requires -ldl
- # SQLITE_ENABLE_FTS5 requires -lm (calls log(1))
- #
- # You may be wondering why we didn't import them instead. While it would be
- # almost equivalent, there is a subtle difference: if we import them, then
- # build2 will start selecting static/shared libraries and we probably don't
- # want that here. These libraries are in a sense an extension of -lc and we
- # want them to be linked in the same way as -lc (e.g., the user will have to
- # specify -static to force static linking and so on).
- #
- # We also assume these are implementation dependencies (so there is no
- # c.export.libs listing them).
- #
- c.libs += -lpthread -ldl -lm
-}
-
-# Both Debian and Fedora add this so gotta be important.
-#
-if ($c.id != "msvc")
- c.coptions += -fno-strict-aliasing
-
-# It would have been cleaner to handle this in a header but that will require
-# modifying sqlite3.h. Note that this is also sub-optimal if we are not using
-# an export stub (no dllimport).
-#
-lib{sqlite3}: cc.export.poptions = -I$src_root
-
-if ($c.target.class == "windows")
-{
- objs{*}: c.poptions += '-DSQLITE_API=__declspec(dllexport)'
- libs{sqlite3}: cc.export.poptions += '-DSQLITE_API=__declspec(dllimport)'
-}
+d = sqlite3/ test/
+./: $d doc{README} file{manifest}
+include $d
diff --git a/sqlite3/buildfile b/sqlite3/buildfile
new file mode 100644
index 0000000..948c32d
--- /dev/null
+++ b/sqlite3/buildfile
@@ -0,0 +1,67 @@
+# file : sqlite3/buildfile
+# copyright : not copyrighted - public domain
+
+lib{sqlite3}: {h c}{sqlite3} h{sqlite3ext}
+
+# The set of features we enable by default is inspired by Debian, Fedora, and
+# the official documentation.
+#
+# Note that we "prefix" them to what might have been specified by the user so
+# that it is possible to override the defaults by specifying them as =0 (it's
+# also the reason we use cc.* instead of c.*, the former comes first).
+#
+# PREUPDATE_HOOK is required by SESSION
+#
+# -DSQLITE_ENABLE_SESSION=1 removed due to bug in 3.14.1.
+#
+cc.poptions =+ \
+-DSQLITE_THREADSAFE=1 \
+-DSQLITE_ENABLE_FTS4=1 \
+-DSQLITE_ENABLE_FTS5=1 \
+-DSQLITE_ENABLE_RTREE=1 \
+-DSQLITE_ENABLE_JSON1=1 \
+-DSQLITE_SECURE_DELETE=1 \
+-DSQLITE_ENABLE_DBSTAT_VTAB=1 \
+-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
+-DSQLITE_ENABLE_LOAD_EXTENSION=1 \
+-DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
+-DSQLITE_ENABLE_COLUMN_METADATA=1 \
+-DSQLITE_ENABLE_FTS3_PARENTHESIS=1
+
+if ($c.target.class != "windows")
+{
+ cc.poptions =+ -DHAVE_USLEEP=1
+
+ # SQLITE_THREADSAFE requres -lpthread
+ # SQLITE_ENABLE_LOAD_EXTENSION requires -ldl
+ # SQLITE_ENABLE_FTS5 requires -lm (calls log(1))
+ #
+ # You may be wondering why we didn't import them instead. While it would be
+ # almost equivalent, there is a subtle difference: if we import them, then
+ # build2 will start selecting static/shared libraries and we probably don't
+ # want that here. These libraries are in a sense an extension of -lc and we
+ # want them to be linked in the same way as -lc (e.g., the user will have to
+ # specify -static to force static linking and so on).
+ #
+ # We also assume these are implementation dependencies (so there is no
+ # c.export.libs listing them).
+ #
+ c.libs += -lpthread -ldl -lm
+}
+
+# Both Debian and Fedora add this so gotta be important.
+#
+if ($c.id != "msvc")
+ c.coptions += -fno-strict-aliasing
+
+# It would have been cleaner to handle this in a header but that will require
+# modifying sqlite3.h. Note that this is also sub-optimal if we are not using
+# an export stub (no dllimport).
+#
+lib{sqlite3}: cc.export.poptions = -I$src_base
+
+if ($c.target.class == "windows")
+{
+ objs{*}: c.poptions += '-DSQLITE_API=__declspec(dllexport)'
+ libs{sqlite3}: cc.export.poptions += '-DSQLITE_API=__declspec(dllimport)'
+}
diff --git a/sqlite3.c b/sqlite3/sqlite3.c
index ccddfe6..ccddfe6 100644
--- a/sqlite3.c
+++ b/sqlite3/sqlite3.c
diff --git a/sqlite3.h b/sqlite3/sqlite3.h
index 3b6b07c..3b6b07c 100644
--- a/sqlite3.h
+++ b/sqlite3/sqlite3.h
diff --git a/sqlite3ext.h b/sqlite3/sqlite3ext.h
index ce87e74..ce87e74 100644
--- a/sqlite3ext.h
+++ b/sqlite3/sqlite3ext.h