Fixed helper scripts.
This commit is contained in:
parent
938e8897b2
commit
fd0b3efd2c
18
heptc
18
heptc
|
@ -17,28 +17,28 @@ HEPTC=$COMPILER_DIR/$COMPILER
|
||||||
HEPTC_DEBUG=$COMPILER_DIR/$COMPILER_DEBUG
|
HEPTC_DEBUG=$COMPILER_DIR/$COMPILER_DEBUG
|
||||||
|
|
||||||
#compile the compiler
|
#compile the compiler
|
||||||
if [ ! -x $HEPTC ]
|
if [ ! -x "$HEPTC" ]
|
||||||
then
|
then
|
||||||
if [ -x $HEPTC_DEBUG ]
|
if [ -x "$HEPTC_DEBUG" ]
|
||||||
then
|
then
|
||||||
#use the debug
|
#use the debug
|
||||||
HEPTC=$HEPTC_DEBUG
|
HEPTC=$HEPTC_DEBUG
|
||||||
else
|
else
|
||||||
cd $COMPILER_DIR
|
cd "$COMPILER_DIR"
|
||||||
ocamlbuild -j 0 $COMPILER
|
ocamlbuild -j 0 "$COMPILER"
|
||||||
cd -
|
cd -
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#compile the stdlib
|
#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
|
then
|
||||||
cd $LIB_DIR
|
cd "$LIB_DIR"
|
||||||
echo "Recompile pervasives.epci"
|
echo "Recompile pervasives.epci"
|
||||||
$HEPTC -nopervasives pervasives.epi
|
"$HEPTC" -nopervasives pervasives.epi
|
||||||
cd -
|
cd -
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#call the compiler with the passed arguments.
|
#call the compiler with the passed arguments.
|
||||||
cd $RUN_DIR
|
cd "$RUN_DIR"
|
||||||
$HEPTC -stdlib $LIB_DIR "$@"
|
"$HEPTC" -stdlib "$LIB_DIR" "$@"
|
||||||
|
|
|
@ -17,7 +17,7 @@ coption=
|
||||||
CAMLC=ocamlc
|
CAMLC=ocamlc
|
||||||
JAVAC=javac
|
JAVAC=javac
|
||||||
LUSTREC=lustre
|
LUSTREC=lustre
|
||||||
CC="gcc -std=c99"
|
CC="gcc -std=c99 -I../../../lib/c"
|
||||||
|
|
||||||
# par defaut : pas de test de generation de code
|
# par defaut : pas de test de generation de code
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,8 @@ shift
|
||||||
|
|
||||||
# Compile source file to VHDL, flattening node calls
|
# Compile source file to VHDL, flattening node calls
|
||||||
if [ $compile -eq 1 ]; then
|
if [ $compile -eq 1 ]; then
|
||||||
$HEPTC $@ -s main -target c $F $@ || exit 1
|
"$HEPTC" $@ -s main -target c $F $@ || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Compile it with GCC
|
# 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
|
||||||
|
|
Loading…
Reference in New Issue