From fd0b3efd2c9d6c34b253e48e287bd7bac7fcdda1 Mon Sep 17 00:00:00 2001 From: Adrien Guatto Date: Mon, 30 May 2011 10:23:03 +0200 Subject: [PATCH] Fixed helper scripts. --- heptc | 18 +++++++++--------- test/check | 2 +- tools/heptc-c.sh | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/heptc b/heptc index 94c9a58..f28b279 100755 --- a/heptc +++ b/heptc @@ -17,28 +17,28 @@ HEPTC=$COMPILER_DIR/$COMPILER HEPTC_DEBUG=$COMPILER_DIR/$COMPILER_DEBUG #compile the compiler -if [ ! -x $HEPTC ] +if [ ! -x "$HEPTC" ] then - if [ -x $HEPTC_DEBUG ] + if [ -x "$HEPTC_DEBUG" ] then #use the debug HEPTC=$HEPTC_DEBUG else - cd $COMPILER_DIR - ocamlbuild -j 0 $COMPILER + cd "$COMPILER_DIR" + ocamlbuild -j 0 "$COMPILER" cd - fi fi #compile the stdlib -if [ ! -e $LIB_DIR/pervasives.epci ] || [ $HEPTC -nt $LIB_DIR/pervasives.epci ] +if [ ! -e "$LIB_DIR/pervasives.epci" ] || [ "$HEPTC" -nt "$LIB_DIR/pervasives.epci" ] then - cd $LIB_DIR + cd "$LIB_DIR" echo "Recompile pervasives.epci" - $HEPTC -nopervasives pervasives.epi + "$HEPTC" -nopervasives pervasives.epi cd - fi #call the compiler with the passed arguments. -cd $RUN_DIR -$HEPTC -stdlib $LIB_DIR "$@" +cd "$RUN_DIR" +"$HEPTC" -stdlib "$LIB_DIR" "$@" diff --git a/test/check b/test/check index 218e3f1..2112888 100755 --- a/test/check +++ b/test/check @@ -17,7 +17,7 @@ coption= CAMLC=ocamlc JAVAC=javac LUSTREC=lustre -CC="gcc -std=c99" +CC="gcc -std=c99 -I../../../lib/c" # par defaut : pas de test de generation de code diff --git a/tools/heptc-c.sh b/tools/heptc-c.sh index 3a7ecaf..ff4ebff 100755 --- a/tools/heptc-c.sh +++ b/tools/heptc-c.sh @@ -26,8 +26,8 @@ shift # Compile source file to VHDL, flattening node calls if [ $compile -eq 1 ]; then - $HEPTC $@ -s main -target c $F $@ || exit 1 + "$HEPTC" $@ -s main -target c $F $@ || exit 1 fi # Compile it with GCC -cc -I `$HEPTC -where`/c -std=c99 $REP/*.c -o `basename $F .ept` || exit 1 +cc -I "`$HEPTC -where`/c" -std=c99 $REP/*.c -o "`basename $F .ept`" || exit 1