1 | # Wedge definition for time-helper
|
2 | #
|
3 | # Loaded by deps/wedge.sh.
|
4 |
|
5 | set -o nounset
|
6 | set -o pipefail
|
7 | set -o errexit
|
8 |
|
9 | # sourced
|
10 | WEDGE_NAME='time-helper'
|
11 | WEDGE_VERSION='2023-02-28'
|
12 | WEDGE_IS_ABSOLUTE=1 # TODO: consider relaxing
|
13 |
|
14 | wedge-make() {
|
15 | local src_dir=$1
|
16 | local build_dir=$2
|
17 | local install_dir=$3
|
18 |
|
19 | # TODO: Should not have access to this home dir!!!
|
20 | # Usually this is _cache, but it's not here
|
21 | local repo_root=/home/uke0/oil
|
22 |
|
23 | local in=$repo_root/benchmarks/time-helper.c
|
24 | local out=$build_dir/time-helper
|
25 |
|
26 | # Copied from build/py.sh time-helper
|
27 | cc -std=c99 -o $out $in
|
28 | }
|
29 |
|
30 | wedge-install() {
|
31 | local build_dir=$1
|
32 | local install_dir=$2
|
33 |
|
34 | # TODO: The harness should make this
|
35 | mkdir -p $install_dir
|
36 | cp $build_dir/time-helper $install_dir/time-helper
|
37 | }
|
38 |
|
39 | wedge-smoke-test() {
|
40 | local install_dir=$1
|
41 |
|
42 | $install_dir/time-helper -o /dev/stdout -x true
|
43 | }
|