aboutsummaryrefslogtreecommitdiff
path: root/libbrep/odb.sh
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-04-29 23:55:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-04-30 23:57:17 +0300
commit8f3d3956b1e837c726859eb8bbe19dad79c54a42 (patch)
tree81ded52db212b12c7f685165702cce90aa0233cf /libbrep/odb.sh
parentea60a6df471706a0eeb5ff1f774d69abe89e4bc9 (diff)
Add hxx extension for headers and lib prefix for library dirs
Diffstat (limited to 'libbrep/odb.sh')
-rwxr-xr-xlibbrep/odb.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/libbrep/odb.sh b/libbrep/odb.sh
new file mode 100755
index 0000000..b794a2d
--- /dev/null
+++ b/libbrep/odb.sh
@@ -0,0 +1,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