summaryrefslogtreecommitdiff
path: root/pkg.sh
blob: 1a397b5f6cbbf447e025a263d130dbeb62dae2b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
std_things="io arr"
cd std

VALGRIND="valgrind --track-origins=yes --exit-on-first-error=yes --error-exitcode=1 -q"
if [ "$1" = "nov" ]; then
	VALGRIND=""
fi
if [ "$CC" = "" ]; then
	CC=gcc
fi

for thing in $std_things; do
	$VALGRIND ../toc $thing.toc -o $thing.c || exit 1
done
cd ..
$VALGRIND ./toc test.toc || exit 1
$CC out.c std/*.c || exit 1
./a.out