OILS / prebuilt / datalog.sh View on Github | oilshell.org

27 lines, 19 significant
1#!/usr/bin/env bash
2set -o pipefail
3set -o errexit
4
5REPO_ROOT=$(cd "$(dirname $0)/.."; pwd)
6readonly REPO_ROOT
7
8readonly DEPS_DIR=$REPO_ROOT/../oil_DEPS
9
10source build/common.sh
11source build/dev-shell.sh
12source devtools/run-task.sh
13
14compile_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
22compile_all() {
23 compile_one mycpp/datalog/call-graph.dl
24 compile_one deps/source.medo/souffle/smoke-test.dl
25}
26
27run-task "$@"