From 825a5354da3274f069ccc02a75b8998dc0479ac3 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Fri, 29 May 2015 21:41:43 +0200 Subject: Updated PowerShell build scripts for Windows. --- dist/mcode/winbuild.ps1 | 27 +++++++++++++++++++++------ dist/mcode/windows/complib.ps1 | 33 ++++++++++++--------------------- 2 files changed, 33 insertions(+), 27 deletions(-) (limited to 'dist') diff --git a/dist/mcode/winbuild.ps1 b/dist/mcode/winbuild.ps1 index badd9bc4f..50ec438c1 100644 --- a/dist/mcode/winbuild.ps1 +++ b/dist/mcode/winbuild.ps1 @@ -73,6 +73,8 @@ Param( [switch]$Install, # Installation directory [string]$InstallPath, + # update files + [switch]$Update, # uninstall all files from a directory [switch]$Uninstall, @@ -227,7 +229,8 @@ else } else { Write-Host "--------------------------------------------------------------------------------" - Write-Host "Completed [SUCCESSFUL]" + Write-Host "Completed " -NoNewline + Write-Host "[SUCCESSFUL]" -ForegroundColor Green Write-Host } } @@ -249,7 +252,8 @@ else } else { Write-Host "--------------------------------------------------------------------------------" - Write-Host "Completed [SUCCESSFUL]" + Write-Host "Completed " -NoNewline + Write-Host "[SUCCESSFUL]" -ForegroundColor Green Write-Host } } @@ -292,7 +296,8 @@ else } else { Write-Host "--------------------------------------------------------------------------------" - Write-Host "Completed [SUCCESSFUL]" + Write-Host "Completed " -NoNewline + Write-Host "[SUCCESSFUL]" -ForegroundColor Green Write-Host } } @@ -314,7 +319,8 @@ else } else { Write-Host "--------------------------------------------------------------------------------" - Write-Host "Completed [SUCCESSFUL]" + Write-Host "Completed " -NoNewline + Write-Host "[SUCCESSFUL]" -ForegroundColor Green Write-Host } } @@ -395,9 +401,18 @@ else } else { if (Test-Path -Path $InstallPath) - { $Script_ExitCode = 1 - Write-Host " Directory '$InstallPath' already exists." -ForegroundColor Red + { if ($Update) + { Remove-Item -Path "$InstallPath\*" -Recurse -Force } + else + { Write-Host " Directory '$InstallPath' already exists." -ForegroundColor Red + Write-Host + $Script_ExitCode = 1 + } + } + elseif ($Update) + { Write-Host " Directory '$InstallPath' does not exists." -ForegroundColor Red Write-Host + $Script_ExitCode = 1 } } diff --git a/dist/mcode/windows/complib.ps1 b/dist/mcode/windows/complib.ps1 index c7360a4af..7a622da30 100644 --- a/dist/mcode/windows/complib.ps1 +++ b/dist/mcode/windows/complib.ps1 @@ -180,7 +180,9 @@ elseif ($Compile) "fixed_pkg", "float_generic_pkg", "float_generic_pkg-body", - "float_pkg" + "float_pkg", + "ieee_std_context", + "ieee_bit_context" ); "vital95" = @( "vital_timing", @@ -238,7 +240,7 @@ elseif ($Compile) $LocalDir2Name = $VHDLDestLibrary $LocalDir2 = $LocalDir + "\" + $LocalDir2Name - Write-Host " compiling library $VHDLDestLibrary" + Write-Host " compiling library $VHDLDestLibrary" -ForegroundColor DarkCyan if (Test-Path -Path $LocalDir2) { if ($Script_EnableVerbose) { Write-Host " Directory '$LocalDir2Name' already exists." } } else @@ -280,7 +282,7 @@ elseif ($Compile) $LocalDir2Name = $VHDLDestLibrary $LocalDir2 = $LocalDir + "\" + $LocalDir2Name - Write-Host " compiling library $VHDLDestLibrary" + Write-Host " compiling library $VHDLDestLibrary" -ForegroundColor DarkCyan if (Test-Path -Path $LocalDir2) { if ($Script_EnableVerbose) { Write-Host " Directory '$LocalDir2Name' already exists." } } else @@ -327,7 +329,7 @@ elseif ($Compile) $LocalDir2Name = "synopsys" $LocalDir2 = $LocalDir + "\" + $LocalDir2Name - Write-Host " compiling library $VHDLDestLibrary" + Write-Host " compiling library $VHDLDestLibrary" -ForegroundColor DarkCyan if (Test-Path -Path $LocalDir2) { if ($Script_EnableVerbose) { Write-Host " Directory '$LocalDir2Name' already exists." } } else @@ -400,7 +402,7 @@ elseif ($Compile) $LocalDir2Name = $VHDLDestLibrary $LocalDir2 = $LocalDir + "\" + $LocalDir2Name - Write-Host " compiling library $VHDLDestLibrary" + Write-Host " compiling library $VHDLDestLibrary" -ForegroundColor DarkCyan if (Test-Path -Path $LocalDir2) { if ($Script_EnableVerbose) { Write-Host " Directory '$LocalDir2Name' already exists." } } else @@ -436,7 +438,7 @@ elseif ($Compile) $LocalDir2Name = $VHDLDestLibrary $LocalDir2 = $LocalDir + "\" + $LocalDir2Name - Write-Host " compiling library $VHDLDestLibrary" + Write-Host " compiling library $VHDLDestLibrary" -ForegroundColor DarkCyan if (Test-Path -Path $LocalDir2) { if ($Script_EnableVerbose) { Write-Host " Directory '$LocalDir2Name' already exists." } } else @@ -494,7 +496,7 @@ elseif ($Compile) $LocalDir2Name = "synopsys" $LocalDir2 = $LocalDir + "\" + $LocalDir2Name - Write-Host " compiling library $VHDLDestLibrary" + Write-Host " compiling library $VHDLDestLibrary" -ForegroundColor DarkCyan if (Test-Path -Path $LocalDir2) { if ($Script_EnableVerbose) { Write-Host " Directory '$LocalDir2Name' already exists." } } else @@ -563,7 +565,7 @@ elseif ($Compile) $LocalDir2Name = "mentor" $LocalDir2 = $LocalDir + "\" + $LocalDir2Name - Write-Host " compiling library $VHDLDestLibrary" + Write-Host " compiling library $VHDLDestLibrary" -ForegroundColor DarkCyan if (Test-Path -Path $LocalDir2) { if ($Script_EnableVerbose) { Write-Host " Directory '$LocalDir2Name' already exists." } } else @@ -647,7 +649,7 @@ elseif ($Compile) $LocalDir2Name = $VHDLDestLibrary $LocalDir2 = $LocalDir + "\" + $LocalDir2Name - Write-Host " compiling library $VHDLDestLibrary" + Write-Host " compiling library $VHDLDestLibrary" -ForegroundColor DarkCyan if (Test-Path -Path $LocalDir2) { if ($Script_EnableVerbose) { Write-Host " Directory '$LocalDir2Name' already exists." } } else @@ -684,7 +686,7 @@ elseif ($Compile) $LocalDir2Name = $VHDLDestLibrary $LocalDir2 = $LocalDir + "\" + $LocalDir2Name - Write-Host " compiling library $VHDLDestLibrary" + Write-Host " compiling library $VHDLDestLibrary" -ForegroundColor DarkCyan if (Test-Path -Path $LocalDir2) { if ($Script_EnableVerbose) { Write-Host " Directory '$LocalDir2Name' already exists." } } else @@ -708,17 +710,6 @@ elseif ($Compile) if ($Script_EnableVerbose) { Write-Host (" ghdl analyse (" + ($GHDLParameters -join " ") + ")") } & $GHDLExecutable $GHDLParameters } - - $VHDLSrcLibrary = "vital2000" - foreach ($SourceFile in $SourceFiles[$VHDLSrcLibrary]) - { Write-Host " file: v08\$SourceFile.v08" - if ($Script_EnableVerbose) { Write-Host " copy: $SourceFile" } - Copy-Item "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" "$SourceFile.vhd" - - $GHDLParameters = @("-a", "-C", "--std=08", "-P..\std", "--work=$VHDLDestLibrary", "$SourceFile.vhd") - if ($Script_EnableVerbose) { Write-Host (" ghdl analyse (" + ($GHDLParameters -join " ") + ")") } - & $GHDLExecutable $GHDLParameters - } } # ============================================================================== # vXX -- cgit v1.2.3