diff options
| author | Unai Martinez-Corral <38422348+umarcor@users.noreply.github.com> | 2021-09-22 23:33:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-22 23:33:27 +0100 |
| commit | 778ee5cbb8f7a936f8d4cc93ec6b4671bec2008e (patch) | |
| tree | 8a1737ad099250e97344aee3ac7fa2569f605a90 /scripts/vendors/shared.psm1 | |
| parent | 111007296f1553540a78f59d20197faba29d43c9 (diff) | |
| parent | 3a018ce83a92999ebba6a05cc1fbc32c705493c4 (diff) | |
| download | ghdl-778ee5cbb8f7a936f8d4cc93ec6b4671bec2008e.tar.gz ghdl-778ee5cbb8f7a936f8d4cc93ec6b4671bec2008e.tar.bz2 ghdl-778ee5cbb8f7a936f8d4cc93ec6b4671bec2008e.zip | |
scripts/vendors: fix PoSh scripting (#1878)
Diffstat (limited to 'scripts/vendors/shared.psm1')
| -rw-r--r-- | scripts/vendors/shared.psm1 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/vendors/shared.psm1 b/scripts/vendors/shared.psm1 index 0c15ef53f..bc6f6f93c 100644 --- a/scripts/vendors/shared.psm1 +++ b/scripts/vendors/shared.psm1 @@ -188,8 +188,8 @@ function Get-VHDLVariables #> [CmdletBinding()] param( - [bool]$VHDL93 = $false, - [bool]$VHDL2008 = $true + [switch]$VHDL93 = $false, + [switch]$VHDL2008 = $true ) if ($VHDL93) @@ -285,16 +285,16 @@ function Start-PackageCompilation Write-Host "Compiling library '$Library' ..." -ForegroundColor Yellow $LibraryDirectory= "$DestinationDirectory/$Library/$VHDLVersion" - $EnableVerbose -and (Write-Host " Creating library $Library ..." -ForegroundColor Gray ) | Out-Null - $EnableDebug -and (Write-Host " mkdir $LibraryDirectory" -ForegroundColor DarkGray ) | Out-Null + $EnableVerbose -and (Write-Host " Creating library $Library ..." -ForegroundColor Gray ) | Out-Null + $EnableDebug -and (Write-Host " mkdir $LibraryDirectory" -ForegroundColor DarkGray ) | Out-Null mkdir $LibraryDirectory -ErrorAction SilentlyContinue | Out-Null - $EnableDebug -and (Write-Host " cd $LibraryDirectory" -ForegroundColor DarkGray ) | Out-Null + $EnableDebug -and (Write-Host " cd $LibraryDirectory" -ForegroundColor DarkGray ) | Out-Null cd $LibraryDirectory $ErrorCount = 0 foreach ($File in $SourceFiles) - { Write-Host " Analyzing package file '$File'" -ForegroundColor DarkCyan + { $EnableVerbose -and (Write-Host " Analyzing package file '$File'" -ForegroundColor DarkCyan ) | Out-Null $InvokeExpr = "& '$GHDLBinary' -a " + ($Parameters -join " ") + " --work=$Library " + $File + " 2>&1" - $EnableDebug -and (Write-Host " $InvokeExpr" -ForegroundColor DarkGray ) | Out-Null + $EnableDebug -and (Write-Host " $InvokeExpr" -ForegroundColor DarkGray ) | Out-Null $ErrorRecordFound = Invoke-Expression $InvokeExpr | Restore-NativeCommandStream | Write-ColoredGHDLLine $SuppressWarnings -Indent:"$Indent" if (($LastExitCode -ne 0) -or $ErrorRecordFound) { $ErrorCount += 1 |
