aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/vendors/compile-intel.sh
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-01-16 12:29:06 +0100
committertgingold <tgingold@users.noreply.github.com>2021-01-16 13:31:46 +0100
commitb7596e645dacf769aeec627123d5cda2def01c4e (patch)
tree675f25ba3c59b181a8d4cdaa34a6426b382e58b2 /libraries/vendors/compile-intel.sh
parent9c4c05ccad13f7496083d05c54c46b9243e94733 (diff)
downloadghdl-b7596e645dacf769aeec627123d5cda2def01c4e.tar.gz
ghdl-b7596e645dacf769aeec627123d5cda2def01c4e.tar.bz2
ghdl-b7596e645dacf769aeec627123d5cda2def01c4e.zip
Fixed style issues and potential bugs.
Diffstat (limited to 'libraries/vendors/compile-intel.sh')
-rwxr-xr-xlibraries/vendors/compile-intel.sh92
1 files changed, 46 insertions, 46 deletions
diff --git a/libraries/vendors/compile-intel.sh b/libraries/vendors/compile-intel.sh
index b1810e166..79686f8b5 100755
--- a/libraries/vendors/compile-intel.sh
+++ b/libraries/vendors/compile-intel.sh
@@ -218,14 +218,14 @@ fi
# Search Intel Quartus in default installation locations
DefaultDirectories=("/opt/IntelFPGA" "/opt/intelfpga" "/opt/Intel" "/opt/intel" "/opt/Altera" "/opt/altera" "/c/intelFPGA")
if [ ! -z $QUARTUS_ROOTDIR ]; then
- EnvSourceDir=$QUARTUS_ROOTDIR/${Intel_Quartus_Settings[SourceDirectory]}
+ EnvSourceDir="$QUARTUS_ROOTDIR/${Intel_Quartus_Settings[SourceDirectory]}"
else
for DefaultDir in "${DefaultDirectories[@]}"; do
for Major in 21 20 19 18 17 16; do
for Minor in 4 3 2 1 0; do
Dir=$DefaultDir/${Major}.${Minor}/quartus
if [ -d $Dir ]; then
- EnvSourceDir=$Dir/${Intel_Quartus_Settings[SourceDirectory]}
+ EnvSourceDir="$Dir/${Intel_Quartus_Settings[SourceDirectory]}"
break 3
fi
done
@@ -296,7 +296,7 @@ Files=(
220model.vhd
)
CreateLibraryStruct $StructName "lpm" "." $VHDLVersion "${Files[@]}"
-test $COMPILE_ALTERA -eq 1 && Libraries+=($StructName)
+test $COMPILE_ALTERA -eq 1 && Libraries+=("$StructName")
StructName="SGATE"
Files=(
@@ -304,7 +304,7 @@ Files=(
sgate.vhd
)
CreateLibraryStruct $StructName "sgate" "." $VHDLVersion "${Files[@]}"
-test $COMPILE_ALTERA -eq 1 && Libraries+=($StructName)
+test $COMPILE_ALTERA -eq 1 && Libraries+=("$StructName")
StructName="ALTERA"
Files=(
@@ -316,7 +316,7 @@ Files=(
alt_dspbuilder_package.vhd
)
CreateLibraryStruct $StructName "altera" "." $VHDLVersion "${Files[@]}"
-test $COMPILE_ALTERA -eq 1 && Libraries+=($StructName)
+test $COMPILE_ALTERA -eq 1 && Libraries+=("$StructName")
StructName="ALTERA_MF"
Files=(
@@ -324,7 +324,7 @@ Files=(
altera_mf.vhd
)
CreateLibraryStruct $StructName "altera_mf" "." $VHDLVersion "${Files[@]}"
-test $COMPILE_ALTERA -eq 1 && Libraries+=($StructName)
+test $COMPILE_ALTERA -eq 1 && Libraries+=("$StructName")
StructName="ALTERA_LNSIM"
@@ -332,7 +332,7 @@ Files=(
altera_lnsim_components.vhd
)
CreateLibraryStruct $StructName "altera_lnsim" "." $VHDLVersion "${Files[@]}"
-test $COMPILE_ALTERA -eq 1 && Libraries+=($StructName)
+test $COMPILE_ALTERA -eq 1 && Libraries+=("$StructName")
# Intel device libraries
# ==============================================================================
@@ -344,11 +344,11 @@ Files=(
max_atoms.vhd
max_components.vhd
)
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Max'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "max" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_MAX -eq 1 && Libraries+=($StructName)
+ test $COMPILE_MAX -eq 1 && Libraries+=("$StructName")
fi
# Max II library
@@ -357,11 +357,11 @@ Files=(
maxii_atoms.vhd
maxii_components.vhd
)
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Max II'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "maxii" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_MAX -eq 1 && Libraries+=($StructName)
+ test $COMPILE_MAX -eq 1 && Libraries+=("$StructName")
fi
# Max V library
@@ -370,11 +370,11 @@ Files=(
maxv_atoms.vhd
maxv_components.vhd
)
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Max V'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "maxv" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_MAX -eq 1 && Libraries+=($StructName)
+ test $COMPILE_MAX -eq 1 && Libraries+=("$StructName")
fi
# Arria II library
@@ -389,11 +389,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
arriaii_hssi_atoms.vhd
)
fi
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Arria II'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "arriaii" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_ARRIA -eq 1 && Libraries+=($StructName)
+ test $COMPILE_ARRIA -eq 1 && Libraries+=("$StructName")
fi
# Arria II (PCIe) library
@@ -403,11 +403,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
arriaii_pcie_hip_components.vhd
arriaii_pcie_hip_atoms.vhd
)
- if [[ -f "$SourceDirectory/$Files" ]]; then
+ if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Arria II (PCIe)'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "arriaii_pcie_hip" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_ARRIA -eq 1 && Libraries+=($StructName)
+ test $COMPILE_ARRIA -eq 1 && Libraries+=("$StructName")
fi
fi
@@ -422,11 +422,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
arriaiigz_hssi_components.vhd
)
fi
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Arria II GZ'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "arriaiigz" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_ARRIA -eq 1 && Libraries+=($StructName)
+ test $COMPILE_ARRIA -eq 1 && Libraries+=("$StructName")
fi
# ArriaV library
@@ -441,11 +441,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
arriav_hssi_atoms.vhd
)
fi
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Arria V'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "arriav" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_ARRIA -eq 1 && Libraries+=($StructName)
+ test $COMPILE_ARRIA -eq 1 && Libraries+=("$StructName")
fi
# Arria V GZ library
@@ -460,11 +460,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
arriavgz_hssi_atoms.vhd
)
fi
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Arria V GZ'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "arriavgz" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_ARRIA -eq 1 && Libraries+=($StructName)
+ test $COMPILE_ARRIA -eq 1 && Libraries+=("$StructName")
fi
# Arria V GZ (PCIe) library
@@ -474,11 +474,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
arriavgz_pcie_hip_components.vhd
arriavgz_pcie_hip_atoms.vhd
)
- if [[ -f "$SourceDirectory/$Files" ]]; then
+ if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Arria V GZ (PCIe)'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "arriavgz_pcie_hip" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_ARRIA -eq 1 && Libraries+=($StructName)
+ test $COMPILE_ARRIA -eq 1 && Libraries+=("$StructName")
fi
fi
@@ -494,11 +494,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
cycloneiv_hssi_atoms.vhd
)
fi
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Cyclone IV'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "cycloneiv" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_CYCLONE -eq 1 && Libraries+=($StructName)
+ test $COMPILE_CYCLONE -eq 1 && Libraries+=("$StructName")
fi
# Cyclone IV (PCIe) library
@@ -508,11 +508,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
cycloneiv_pcie_hip_components.vhd
cycloneiv_pcie_hip_atoms.vhd
)
- if [[ -f "$SourceDirectory/$Files" ]]; then
+ if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Cyclone IV (PCIe)'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "cycloneiv_pcie_hip" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_CYCLONE -eq 1 && Libraries+=($StructName)
+ test $COMPILE_CYCLONE -eq 1 && Libraries+=("$StructName")
fi
fi
@@ -522,11 +522,11 @@ Files=(
cycloneive_atoms.vhd
cycloneive_components.vhd
)
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Cyclone IV E'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "cycloneive" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_CYCLONE -eq 1 && Libraries+=($StructName)
+ test $COMPILE_CYCLONE -eq 1 && Libraries+=("$StructName")
fi
# Cyclone V library
@@ -541,11 +541,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
cyclonev_hssi_atoms.vhd
)
fi
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Cyclone V'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "cyclonev" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_CYCLONE -eq 1 && Libraries+=($StructName)
+ test $COMPILE_CYCLONE -eq 1 && Libraries+=("$StructName")
fi
# Stratix IV library
@@ -560,11 +560,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
stratixiv_hssi_atoms.vhd
)
fi
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Stratix IV'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "stratixiv" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_STRATIX -eq 1 && Libraries+=($StructName)
+ test $COMPILE_STRATIX -eq 1 && Libraries+=("$StructName")
fi
# Stratix IV (PCIe) library
@@ -574,11 +574,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
stratixiv_pcie_hip_components.vhd
stratixiv_pcie_hip_atoms.vhd
)
- if [[ -f "$SourceDirectory/$Files" ]]; then
+ if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Stratix IV (PCIe)'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "stratixiv_pcie_hip" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_STRATIX -eq 1 && Libraries+=($StructName)
+ test $COMPILE_STRATIX -eq 1 && Libraries+=("$StructName")
fi
fi
@@ -594,11 +594,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
stratixv_hssi_atoms.vhd
)
fi
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Stratix V'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "stratixv" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_STRATIX -eq 1 && Libraries+=($StructName)
+ test $COMPILE_STRATIX -eq 1 && Libraries+=("$StructName")
fi
# Stratix V (PCIe) library
@@ -608,11 +608,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
stratixv_pcie_hip_components.vhd
stratixv_pcie_hip_atoms.vhd
)
- if [[ -f "$SourceDirectory/$Files" ]]; then
+ if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device 'Stratix V (PCIe)'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "stratixv_pcie_hip" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_STRATIX -eq 1 && Libraries+=($StructName)
+ test $COMPILE_STRATIX -eq 1 && Libraries+=("$StructName")
fi
fi
@@ -622,11 +622,11 @@ Files=(
fiftyfivenm_atoms.vhd
fiftyfivenm_components.vhd
)
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device '55 nm'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "fiftyfivenm" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_NM -eq 1 && Libraries+=($StructName)
+ test $COMPILE_NM -eq 1 && Libraries+=("$StructName")
fi
# 20 nm library
@@ -643,11 +643,11 @@ if [[ $SKIP_LARGE_FILES -eq 0 ]]; then
twentynm_hssi_atoms.vhd
)
fi
-if [[ -f "$SourceDirectory/$Files" ]]; then
+if [[ -f "$SourceDirectory/${Files[0]}" ]]; then
test $DEBUG -eq 1 && echo -e " ${ANSI_DARK_GRAY}Found device '20 nm'.${ANSI_NOCOLOR}"
CreateLibraryStruct $StructName "twentynm" "." $VHDLVersion "${Files[@]}"
- test $COMPILE_NM -eq 1 && Libraries+=($StructName)
+ test $COMPILE_NM -eq 1 && Libraries+=("$StructName")
fi
# if [[ $DEBUG -eq 1 ]]; then
@@ -656,7 +656,7 @@ fi
# done
# fi
-if [[ $Libraries != "" ]]; then
+if [[ ${#Libraries[@]} -ne 0 ]]; then
Compile "$SourceDirectory" "${Libraries[*]}"
echo "--------------------------------------------------------------------------------"