-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpgall
executable file
·60 lines (56 loc) · 1.12 KB
/
pgall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
WITH_COMPCERT=0
if [ "$1" = --with-compcert ]; then
WITH_COMPCERT=1
shift
fi
MAKEOPTS="$@"
process () {
dir=$1
makefile=$2
target=$3
echo $dir: Entering
pushd $dir
while ! make -f $makefile -q $target
do
echo $dir: Not up-to-date. Press CTRL+C to cancel now, ENTER otherwise
read
mkfifo fail
cat fail &
sleep 1
stdbuf -i0 -o0 -e0 make -f $makefile -k ${MAKEOPTS} $target 2>&1 |
stdbuf -i0 -e0 -o0 tee -a fail |
stdbuf -i0 -o0 -e0 grep $dir/ |
stdbuf -i0 -o0 -e0 sed -u 's!^.*/'$dir'/\([^"]*\).*$!\1!' |
{
n=0
while read f
do
n=$(($n + 1))
echo $dir: $f: failed, opening ./pg number $n
{
if ./pg $f
then
echo $dir: $f: done
else
echo $dir: $f: failed
fi
} &
done
echo $dir: Waiting for all $n ./pg to terminate
wait
}
rm -f fail
echo $dir: all ./pg done
done
popd
echo $dir: Successfully left
}
if [ $WITH_COMPCERT -ne 0 ]; then
process compcert Makefile proof
process compcertx Makefile.strict proof
else
process compcertx Makefile proof
fi
process liblayers Makefile all
process mcertikos Makefile all