| 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 | local in=$src_dir/time-helper.c
|
| 20 | local out=$build_dir/time-helper
|
| 21 |
|
| 22 | # Copied from build/py.sh time-helper
|
| 23 | cc -std=c99 -o $out $in
|
| 24 | }
|
| 25 |
|
| 26 | wedge-install() {
|
| 27 | local build_dir=$1
|
| 28 | local install_dir=$2
|
| 29 |
|
| 30 | # TODO: The harness should make this
|
| 31 | mkdir -p $install_dir
|
| 32 | echo '*** wedge-install'
|
| 33 | cp -v $build_dir/time-helper $install_dir/time-helper
|
| 34 | }
|
| 35 |
|
| 36 | wedge-smoke-test() {
|
| 37 | local install_dir=$1
|
| 38 |
|
| 39 | $install_dir/time-helper -o /dev/stdout -x true
|
| 40 | }
|