Subversion Repositories DevTools

Rev

Rev 369 | Rev 379 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 369 Rev 375
Line 768... Line 768...
768
ReportError ('Cannot determine USER name, via USER, USERNAME, LOGNAME or getlogin')
768
ReportError ('Cannot determine USER name, via USER, USERNAME, LOGNAME or getlogin')
769
    unless ( $USER );
769
    unless ( $USER );
770
#Debug ("User: ", $USER, $ENV{ 'USERNAME'}, $ENV{ 'LOGNAME' }, getlogin() );
770
#Debug ("User: ", $USER, $ENV{ 'USERNAME'}, $ENV{ 'LOGNAME' }, getlogin() );
771
 
771
 
772
################################################################################
772
################################################################################
773
#   Sanitize the PATH variable
773
#   Sanitize the EnvVars for Windows
774
#   Some of the Win32 binary tools used by JATS cannot handle lower case Path
-
 
775
#   Force an upper case PATH
-
 
776
#
-
 
777
my $PATH = '';
-
 
778
$PATH .= delete( $ENV{ 'Path' } ) if (exists $ENV{ 'Path' });
-
 
779
$PATH .= delete( $ENV{ 'path' } ) if (exists $ENV{ 'path' });
-
 
780
$PATH .= delete( $ENV{ 'PATH' } ) if (exists $ENV{ 'PATH' });
-
 
781
$ENV{'PATH'} = $PATH;
-
 
782
 
-
 
783
#
-
 
784
#   Windows now defines ComSpec. This is only a problem when programs are
-
 
785
#   started up without the use of cmd.exe - like the JATS internal sh.exe
-
 
786
#   Correct by deleting the environment variable and forcing it to be uppercase
-
 
787
#
774
#
-
 
775
#   It appears the %ENV is magical (in Win32)
-
 
776
#   The keys are case insensitive, even though the underlying env is not
-
 
777
#       Some of the Win32 binary tools used by JATS cannot handle lower
-
 
778
#       case envVars. In particulare Path/PATH.
-
 
779
#       This will also fix some issues within MAKE
-
 
780
#
-
 
781
#   Force all EnvVars to be uppercase
-
 
782
#       Need to delete the entry then reset it
-
 
783
#
-
 
784
unless ( $GBE_JATS_SANE || $GBE_UNIX )
-
 
785
{
-
 
786
    while (my($var, $val) = each %ENV)
-
 
787
    {
-
 
788
        delete $ENV{$var};
788
my $COMSPEC = '';
789
        $ENV{$var} = $val;
-
 
790
    }
-
 
791
}
789
$COMSPEC = delete( $ENV{'COMSPEC'} ) if ( exists $ENV{'COMSPEC'} );
792
my $PATH = $ENV{'PATH'};
790
 
793
 
791
################################################################################
794
################################################################################
792
#   There is some really ugly interaction between Cygwin, ActiveState Perl 5.8.2
795
#   There is some really ugly interaction between Cygwin, ActiveState Perl 5.8.2
793
#   and xmake. Even if none of the cygwin bits are used within JATS the fact that
796
#   and xmake. Even if none of the cygwin bits are used within JATS the fact that
794
#   Cygwin is in the path causes problems.
797
#   Cygwin is in the path causes problems.
Line 978... Line 981...
978
$ENV{'GBE_ABT'}           = $GBE_ABT if ($GBE_ABT);
981
$ENV{'GBE_ABT'}           = $GBE_ABT if ($GBE_ABT);
979
$ENV{'GBE_DEBUG'}         = $GBE_DEBUG;
982
$ENV{'GBE_DEBUG'}         = $GBE_DEBUG;
980
$ENV{'GBE_VERBOSE'}       = $GBE_VERBOSE;
983
$ENV{'GBE_VERBOSE'}       = $GBE_VERBOSE;
981
$ENV{'GBE_UNIX'}          = $GBE_UNIX;
984
$ENV{'GBE_UNIX'}          = $GBE_UNIX;
982
$ENV{'USER'}              = $USER;
985
$ENV{'USER'}              = $USER;
983
$ENV{'COMSPEC'}           = $COMSPEC;
-
 
984
$ENV{'GBE_HOSTNAME'}      = $GBE_HOSTNAME;
986
$ENV{'GBE_HOSTNAME'}      = $GBE_HOSTNAME;
985
$ENV{'GBE_VIEWBASE'}      = $GBE_VIEWBASE;
987
$ENV{'GBE_VIEWBASE'}      = $GBE_VIEWBASE;
986
$ENV{'GBE_VCS'}           = $GBE_VCS;
988
$ENV{'GBE_VCS'}           = $GBE_VCS;
987
 
989
 
988
#
990
#
989
#   Warn users of potential problem
991
#   Warn users of potential problem
990
#   Only do once. May change dirtory while getting here
992
#   Only do once. May change directory while getting here
991
unless ( $GBE_JATS_SANE)
993
unless ( $GBE_JATS_SANE )
992
{
994
{
993
    Warning ("Current working directory contains spaces")
995
    Warning ("Current working directory contains spaces")
994
        if ( $CWD =~ m/\s/ );
996
        if ( $CWD =~ m/\s/ );
995
}
997
}
996
 
998