diff options
Diffstat (limited to 'libraries/vendors/compile-altera.sh')
-rwxr-xr-x | libraries/vendors/compile-altera.sh | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/libraries/vendors/compile-altera.sh b/libraries/vendors/compile-altera.sh index deef5bedd..afb2ffbae 100755 --- a/libraries/vendors/compile-altera.sh +++ b/libraries/vendors/compile-altera.sh @@ -47,6 +47,7 @@ source $ScriptDir/shared.sh # command line argument processing NO_COMMAND=1 SKIP_EXISTING_FILES=0 +SKIP_LARGE_FILES=0 SUPPRESS_WARNINGS=0 HALT_ON_ERROR=0 VHDLStandard=93 @@ -134,12 +135,12 @@ while [[ $# > 0 ]]; do shift # past argument or value done -if [ "$NO_COMMAND" == "TRUE" ]; then +if [ $NO_COMMAND -eq 1 ]; then HELP=TRUE fi if [ "$HELP" == "TRUE" ]; then - test "$NO_COMMAND" == "TRUE" && echo 1>&2 -e "${COLORED_ERROR} No command selected." + test $NO_COMMAND -eq 1 && echo 1>&2 -e "\n${COLORED_ERROR} No command selected." echo "" echo "Synopsis:" echo " A script to compile the Altera Quartus simulation libraries for GHDL on Linux." @@ -170,9 +171,9 @@ if [ "$HELP" == "TRUE" ]; then echo " -H --halt-on-error Halt on error(s)." echo "" echo "Advanced options:" - echo " --ghdl <GHDL BinDir> Path to GHDL binary directory e.g. /usr/bin." + echo " --ghdl <GHDL Binary> Path to GHDL's binary e.g. /usr/local/bin/ghdl." echo " --out <dir name> Name of the output directory." - echo " --src <Path to OSVVM> Name of the output directory." + echo " --src <Path to OSVVM> Path to the source directory." echo "" echo "Verbosity:" echo " -n --no-warnings Suppress all warnings. Show only error messages." @@ -189,6 +190,22 @@ if [ "$COMPILE_ALL" == "TRUE" ]; then COMPILE_NM=TRUE fi +DefaultDirectories=("/opt/Altera" "/opt/altera") +if [ ! -z $QUARTUS_ROOTDIR ]; then + EnvSourceDir=$QUARTUS_ROOTDIR/${SourceDirectories[AlteraQuartus]} +else + for DefaultDir in ${DefaultDirectories[@]}; do + for Major in 17 16 15 14 13; do + for Minor in 3 2 1 0; do + Dir=$DefaultDir/${Major}.${Minor}/quartus + if [ -d $Dir ]; then + EnvSourceDir=$Dir/${SourceDirectories[AlteraQuartus]} + break 3 + fi + done + done + done +fi # -> $SourceDirectories # -> $DestinationDirectories |