From f1bbe1639383cbb750667c1a3c542b176cf0ae46 Mon Sep 17 00:00:00 2001 From: Hannu Vuolasaho Date: Sat, 30 Jun 2018 00:34:00 +0300 Subject: Fixes for compile-altera.sh based on feedback --- libraries/vendors/compile-altera.sh | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'libraries/vendors') diff --git a/libraries/vendors/compile-altera.sh b/libraries/vendors/compile-altera.sh index c075244e5..3de2789b3 100755 --- a/libraries/vendors/compile-altera.sh +++ b/libraries/vendors/compile-altera.sh @@ -524,9 +524,12 @@ if [ $STOPCOMPILING -eq 0 ] && [ "$COMPILE_CYCLONE" == "TRUE" ]; then # append absolute source path SourceFiles=() for File in ${Files[@]}; do + FullPath="$SourceDirectory/$File" #Don't put nonexisting files. - if [ -f "$SourceDirectory/$File" ]; then - SourceFiles+=("$SourceDirectory/$File") + if [ -f $FullPath ]; then + SourceFiles+=($FullPath) + elif [ $SUPPRESS_WARNINGS -eq 0 ] ; then + echo -e "${ANSI_YELLOW}File ${FullPath} not found.${ANSI_NOCOLOR}" fi done @@ -543,15 +546,18 @@ if [ $STOPCOMPILING -eq 0 ] && [ "$COMPILE_CYCLONE" == "TRUE" ]; then # append absolute source path SourceFiles=() for File in ${Files[@]}; do + FullPath="$SourceDirectory/$File" #Don't put nonexisting files. - if [ -f "$SourceDirectory/$File" ]; then - SourceFiles+=("$SourceDirectory/$File") + if [ -f $FullPath ]; then + SourceFiles+=($FullPath) + elif [ $SUPPRESS_WARNINGS -eq 0 ] ; then + echo -e "${ANSI_YELLOW}File ${FullPath} not found.${ANSI_NOCOLOR}" fi done GHDLCompilePackages fi -# compile Cyclone IIIlibrary +# compile Cyclone III library if [ $STOPCOMPILING -eq 0 ] && [ "$COMPILE_CYCLONE" == "TRUE" ]; then Library="cycloneiii" Files=( @@ -562,9 +568,12 @@ if [ $STOPCOMPILING -eq 0 ] && [ "$COMPILE_CYCLONE" == "TRUE" ]; then # append absolute source path SourceFiles=() for File in ${Files[@]}; do + FullPath="$SourceDirectory/$File" #Don't put nonexisting files. - if [ -f "$SourceDirectory/$File" ]; then - SourceFiles+=("$SourceDirectory/$File") + if [ -f $FullPath ]; then + SourceFiles+=($FullPath) + elif [ $SUPPRESS_WARNINGS -eq 0 ] ; then + echo -e "${ANSI_YELLOW}File ${FullPath} not found.${ANSI_NOCOLOR}" fi done @@ -639,8 +648,12 @@ if [ $STOPCOMPILING -eq 0 ] && [ "$COMPILE_CYCLONE" == "TRUE" ]; then # append absolute source path SourceFiles=() for File in ${Files[@]}; do - if [ -f "$SourceDirectory/$File" ]; then - SourceFiles+=("$SourceDirectory/$File") + FullPath="$SourceDirectory/$File" + #Don't put nonexisting files. + if [ -f $FullPath ]; then + SourceFiles+=($FullPath) + elif [ $SUPPRESS_WARNINGS -eq 0 ] ; then + echo -e "${ANSI_YELLOW}File ${FullPath} not found.${ANSI_NOCOLOR}" fi done -- cgit v1.2.3