1 | #!/usr/bin/env bash
|
2 | set -o pipefail
|
3 | set -o errexit
|
4 |
|
5 | REPO_ROOT=$(cd "$(dirname $0)/.."; pwd)
|
6 | readonly REPO_ROOT
|
7 |
|
8 | readonly DEPS_DIR=$REPO_ROOT/../oil_DEPS
|
9 |
|
10 | source build/common.sh
|
11 | source build/dev-shell.sh
|
12 | source devtools/run-task.sh
|
13 |
|
14 | compile_one() {
|
15 | in=$1
|
16 | local base=$(basename -s .dl $in)
|
17 | local out="prebuilt/datalog/${base}.cc"
|
18 |
|
19 | souffle -g - -I $REPO_ROOT/mycpp/datalog $in > $out
|
20 | }
|
21 |
|
22 | compile_all() {
|
23 | compile_one mycpp/datalog/call-graph.dl
|
24 | compile_one deps/source.medo/souffle/smoke-test.dl
|
25 | }
|
26 |
|
27 | run-task "$@"
|