summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xset_soenv.in25
1 files changed, 13 insertions, 12 deletions
diff --git a/set_soenv.in b/set_soenv.in
index 9261ccaf6f35..375940e48a28 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1092,26 +1092,28 @@ elsif ($platform =~ m/cygwin/)
$tmppath = CygFormat($COMPATH).$BIN;
$tmppath .= $ds."amd64" if $CL_X64;
$tmppath =~ s/^\/\//\//;
- $PATH .= $ps.$tmppath;
+ if ( "$PATH:$oldPATH" !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
+ $PATH .= $ps.$tmppath;
+ }
$tmppath = CygFormat($MSPDB_PATH);
- # for MSVC to find mspdb71.dll
- if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
+ # for MSVC to find mspdb*.dll
+ if ( "$PATH:$oldPATH" !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
$PATH .= $ps.$tmppath;
}
# need midl.exe
$tmppath = CygFormat($MIDL_PATH);
- if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
+ if ( "$PATH:$oldPATH" !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
$PATH .= $ps.$tmppath;
}
# needs csc.exe
$tmppath = CygFormat($CSC_PATH);
- if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
+ if ( "$PATH:$oldPATH" !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
$PATH .= $ps.$tmppath;
}
# Installer needs some files if the Windows Installer SDK
$tmppath = CygFormat($WINDOWS_SDK_HOME);
- if ( $PATH !~ /(?:[:]|\A)(?:$tmppath\/bin)(?:[:]|\Z)/i ) {
+ if ( "$PATH:$oldPATH" !~ /(?:[:]|\A)(?:$tmppath\/bin)(?:[:]|\Z)/i ) {
$PATH .= $ps.$tmppath.$BIN;
}
@@ -1119,28 +1121,27 @@ elsif ($platform =~ m/cygwin/)
{ $PATH .= $ps.CygFormat($ASM_PATH);
}
- # Possible cygwin paths must follow behind the OOo and MS paths
+ # Possible cygwin paths must follow behind the OOo and MS paths.
+ # What the above comment means I have no idea.
# Check if $PERL_PATH is already set in PATH
$tmppath = CygFormat($PERL_PATH);
- if ( ! ( $PATH =~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) )
- {
+ if ( "$PATH:$oldPATH" !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
$PATH .= $ps.$tmppath;
}
# makensis directory
$NSIS_PATH = PathFormat('@NSIS_PATH@');
$tmppath = CygFormat($NSIS_PATH);
- if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
+ if ( "$PATH:$oldPATH" !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
$PATH .= $ps.$tmppath;
}
# path to sn.exe (signing) for Windows users.
my $sn_path = PathFormat('@DOTNET_FRAMEWORK_HOME@/bin');
$tmppath = CygFormat($sn_path);
- if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
+ if ( "$PATH:$oldPATH" !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
$PATH .= $ps.$tmppath;
}
-
# Add the rest of the original path if it is still missing.
if (($^O eq "cygwin")) { # Not for ActiveState perl
my $expandedPATH = $PATH;