blob: 1387773f6105c8f9e5b5df63751539a90e591806 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#! /usr/bin/env bash
trap 'exit 1' ERR
odb=odb
inc=()
if test -d ../.bdep; then
if [ -n "$1" ]; then
cfg="$1"
else
# Use default configuration for headers.
#
cfg="$(bdep config list -d .. | \
sed -r -ne 's#^(@[^ ]+ )?([^ ]+)/ .*default.*$#\2#p')"
fi
# Note: there is nothing generated in libbutl-odb.
#
inc+=("-I../../libbutl/libbutl-odb")
inc+=("-I$cfg/libbutl")
inc+=("-I../../libbutl")
inc+=("-I$cfg/libbpkg")
inc+=("-I../../libbpkg")
inc+=("-I$cfg/bpkg")
inc+=("-I..")
else
inc+=("-I../../libbutl/libbutl-odb")
inc+=(-I.. -I../../libbpkg -I../../libbutl)
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 <bpkg/pointer-traits.hxx>' \
--odb-epilogue '#include <bpkg/wrapper-traits.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>' \
--generate-prepared --include-with-brackets --include-prefix bpkg \
--guard-prefix BPKG --schema main \
--schema-version-table main.schema_version \
--sqlite-override-null package.hxx
|