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