From 405edd8649936329d7ef279d8670f1de2e3e25cb Mon Sep 17 00:00:00 2001 From: Adrien Guatto Date: Wed, 10 Nov 2010 15:44:28 +0100 Subject: [PATCH] Smart(er) heptc-c.sh script --- tools/heptc-c.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/heptc-c.sh b/tools/heptc-c.sh index 86898ba..24f4ea6 100755 --- a/tools/heptc-c.sh +++ b/tools/heptc-c.sh @@ -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