aboutsummaryrefslogtreecommitdiff
path: root/libbrep/odb.sh
blob: b794a2d28e88608f1a7cc04cf9172712950b91dd (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
#! /usr/bin/env bash

trap 'exit 1' ERR

odb=odb
lib="\
-I$HOME/work/odb/libodb-pgsql-default \
-I$HOME/work/odb/libodb-pgsql \
-I$HOME/work/odb/libodb-default \
-I$HOME/work/odb/libodb"

$odb $lib -d pgsql --std c++11 --generate-query              \
    --odb-epilogue '#include <libbrep/wrapper-traits.hxx>'   \
    --hxx-prologue '#include <libbrep/wrapper-traits.hxx>'   \
    -DLIBODB_BUILD2 -DLIBODB_PGSQL_BUILD2                    \
    -I .. -I ../../libbbot -I ../../libbpkg -I ../../libbutl \
    --hxx-suffix ".hxx" --include-with-brackets              \
    --include-prefix libbrep --guard-prefix LIBBREP          \
    common.hxx

$odb $lib -d pgsql --std c++11 --generate-query --generate-schema      \
    --schema-format sql --schema-format embedded --schema-name package \
    --odb-epilogue '#include <libbrep/wrapper-traits.hxx>'             \
    --hxx-prologue '#include <libbrep/package-traits.hxx>'             \
    --generate-prepared -DLIBODB_BUILD2 -DLIBODB_PGSQL_BUILD2          \
    -I .. -I ../../libbbot -I ../../libbpkg -I ../../libbutl           \
    --hxx-suffix ".hxx" --include-with-brackets                        \
    --include-prefix libbrep --guard-prefix LIBBREP                    \
    package.hxx

xxd -i <package-extra.sql >package-extra.hxx

$odb $lib -d pgsql --std c++11 --generate-query --generate-schema    \
    --schema-format sql --schema-format embedded --schema-name build \
    --odb-epilogue '#include <libbrep/wrapper-traits.hxx>'           \
    --generate-prepared -DLIBODB_BUILD2 -DLIBODB_PGSQL_BUILD2        \
    -I .. -I ../../libbbot -I ../../libbpkg -I ../../libbutl         \
    --hxx-suffix ".hxx" --include-with-brackets                      \
    --include-prefix libbrep --guard-prefix LIBBREP                  \
    build.hxx