aboutsummaryrefslogtreecommitdiff
path: root/bpkg/odb.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/odb.sh')
-rwxr-xr-xbpkg/odb.sh21
1 files changed, 11 insertions, 10 deletions
diff --git a/bpkg/odb.sh b/bpkg/odb.sh
index 0c8ae1b..1387773 100755
--- a/bpkg/odb.sh
+++ b/bpkg/odb.sh
@@ -16,8 +16,9 @@ if test -d ../.bdep; then
sed -r -ne 's#^(@[^ ]+ )?([^ ]+)/ .*default.*$#\2#p')"
fi
- inc+=("-I$(echo "$cfg"/libodb-[1-9]*/)")
- inc+=("-I$(echo "$cfg"/libodb-sqlite-[1-9]*/)")
+ # Note: there is nothing generated in libbutl-odb.
+ #
+ inc+=("-I../../libbutl/libbutl-odb")
inc+=("-I$cfg/libbutl")
inc+=("-I../../libbutl")
@@ -30,11 +31,7 @@ sed -r -ne 's#^(@[^ ]+ )?([^ ]+)/ .*default.*$#\2#p')"
else
- inc+=("-I$HOME/work/odb/builds/default/libodb-sqlite-default")
- inc+=("-I$HOME/work/odb/libodb-sqlite")
-
- inc+=("-I$HOME/work/odb/builds/default/libodb-default")
- inc+=("-I$HOME/work/odb/libodb")
+ inc+=("-I../../libbutl/libbutl-odb")
inc+=(-I.. -I../../libbpkg -I../../libbutl)
@@ -43,10 +40,14 @@ fi
$odb "${inc[@]}" \
-DLIBODB_BUILD2 -DLIBODB_SQLITE_BUILD2 --generate-schema \
-d sqlite --std c++14 --generate-query \
- --odb-epilogue '#include <libbutl/small-vector-odb.hxx>' \
+ --odb-epilogue '#include <libbutl/small-vector-odb.hxx>' \
+ --odb-epilogue '#include <bpkg/pointer-traits.hxx>' \
--odb-epilogue '#include <bpkg/wrapper-traits.hxx>' \
- --hxx-prologue '#include <libbutl/small-vector-odb.hxx>' \
+ --hxx-prologue '#include <libbutl/small-vector-odb.hxx>' \
+ --hxx-prologue '#include <bpkg/pointer-traits.hxx>' \
--hxx-prologue '#include <bpkg/wrapper-traits.hxx>' \
--hxx-prologue '#include <bpkg/value-traits.hxx>' \
- --include-with-brackets --include-prefix bpkg --guard-prefix BPKG \
+ --generate-prepared --include-with-brackets --include-prefix bpkg \
+ --guard-prefix BPKG --schema main \
+ --schema-version-table main.schema_version \
--sqlite-override-null package.hxx