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

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