Revision 1b57c8e01a682145f576e101c868ba84ea38ec1b authored by ah744 on 06 August 2016, 01:41:28 UTC, committed by ah744 on 06 August 2016, 01:41:28 UTC
1 parent 2eae3de
gen-ll.sh
#!/bin/bash
DIR=$(dirname $0)
ROOT=$DIR/..
OPT=$ROOT/build/Release+Asserts/bin/opt
SCAF=$ROOT/build/Release+Asserts/lib/Scaffold.so
# Create directory to put all byproduct and output files in
for f in $*; do
b=$(basename $f .scaffold)
echo "[gen-ll.sh] $b: Creating output directory ..."
mkdir -p "$b"
#mv ./*${b}* ${b} 2>/dev/null
done
# Generate .ll file if not done already
for f in $*; do
b=$(basename $f .scaffold)
echo "[gen-ll.sh] $b: Compiling ..."
if [ ! -e ${b}/${b}.ll ]; then
# Generate compiled files
$ROOT/scaffold.sh -r $f
mv ${b}11.ll ${b}11.ll.keep_me
# clean intermediary compilation files (comment out for speed)
$ROOT/scaffold.sh -c $f
# Keep the final output for the compilation
mv ${b}11.ll.keep_me ${b}/${b}.ll
fi
done

Computing file changes ...