Smart(er) heptc-c.sh script

This commit is contained in:
Adrien Guatto 2010-11-10 15:44:28 +01:00
parent 5c8e1a47fe
commit 405edd8649

View file

@ -7,6 +7,12 @@ then
exit 1
fi
if `which heptc.native` 2>/dev/null; then
HEPTC=heptc.native
else
HEPTC=heptc.byte
fi
compile=1
if [ $# -gt 2 ];
@ -20,7 +26,7 @@ shift
# Compile source file to VHDL, flattening node calls
if [ $compile -eq 1 ]; then
heptc.native $@ -s main -target c $F $@ || exit 1
$HEPTC $@ -s main -target c $F $@ || exit 1
fi
# Compile it with GCC