aboutsummaryrefslogtreecommitdiff
path: root/core/redo/build
blob: c27b9c0bda27b1c9d887b482d3bcdf89c39d5bc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh -e

[ "$CPT_CROSS_TRIPLET" ] && CC=$CPT_CROSS_TRIPLET-cc

mkdir -p "$1/usr/bin"

"${CC:=cc}" -static -Os -Wall -Wextra -Wwrite-strings -o "$1/usr/bin/redo" redo.c

for file in redo-sources redo-targets; do
    install -Dm755 "$file" "$1/usr/bin/$file"
done

for file in redo-ifcreate redo-ifchange redo-always; do
    ln -sf redo "$1/usr/bin/$file"
done