Subversion Repositories DevTools

Rev

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

Rev 361 Rev 363
Line 42... Line 42...
42
my $BUILD_FILE      = "build.pl";
42
my $BUILD_FILE      = "build.pl";
43
my @BUILD_FILE_ALT  = qw(auto.pl build_test.pl);
43
my @BUILD_FILE_ALT  = qw(auto.pl build_test.pl);
44
my $BUILD_FILE_SET;
44
my $BUILD_FILE_SET;
45
my $RESULT = 0;
45
my $RESULT = 0;
46
my $PSPLIT = ':';                               # Win/Unix path splitter
46
my $PSPLIT = ':';                               # Win/Unix path splitter
47
my $TIMER = time;
-
 
48
my $opt_time = 0;
47
my $opt_time = 0;
49
my $opt_help = 0;
48
my $opt_help = 0;
50
my $opt_locate = 0;
49
my $opt_locate = 0;
51
my $opt_locate_file;
50
my $opt_locate_file;
52
my $opt_locate_package;
51
my $opt_locate_package;
Line 666... Line 665...
666
#   Note: Don't use `pwd`. This sucks for so many reasons including
665
#   Note: Don't use `pwd`. This sucks for so many reasons including
667
#         the fact that it may not be available until this wrapper
666
#         the fact that it may not be available until this wrapper
668
#         script has done it job.
667
#         script has done it job.
669
#
668
#
670
$CWD = getcwd();
669
$CWD = getcwd();
-
 
670
$CWD =~tr~\\/~/~s;
671
Verbose ("Current Working Directory: $CWD");
671
Verbose ("Current Working Directory: $CWD");
672
Warning ("Current working directory contains spaces") if ( $CWD =~ m/\s/ );
-
 
673
 
-
 
674
 
672
 
675
################################################################################
673
################################################################################
676
#   Setup drive
674
#   Setup drive
677
#   This is only required under windows
675
#   This is only required under windows
678
#   Purpose is unclear, but under windows it is required, so lets create one
676
#   Purpose is unclear, but under windows it is required, so lets create one
Line 984... Line 982...
984
$ENV{'COMSPEC'}           = $COMSPEC;
982
$ENV{'COMSPEC'}           = $COMSPEC;
985
$ENV{'GBE_HOSTNAME'}      = $GBE_HOSTNAME;
983
$ENV{'GBE_HOSTNAME'}      = $GBE_HOSTNAME;
986
$ENV{'GBE_VIEWBASE'}      = $GBE_VIEWBASE;
984
$ENV{'GBE_VIEWBASE'}      = $GBE_VIEWBASE;
987
$ENV{'GBE_VCS'}           = $GBE_VCS;
985
$ENV{'GBE_VCS'}           = $GBE_VCS;
988
 
986
 
-
 
987
#
-
 
988
#   Warn users of potential problem
-
 
989
#   Only do once. May change dirtory while getting here
-
 
990
unless ( $GBE_JATS_SANE)
-
 
991
{
-
 
992
    Warning ("Current working directory contains spaces")
-
 
993
        if ( $CWD =~ m/\s/ );
-
 
994
}
-
 
995
 
-
 
996
 
989
#-------------------------------------------------------------------------------
997
#-------------------------------------------------------------------------------
990
# Function        : PathPrepend
998
# Function        : PathPrepend
991
#
999
#
992
# Description     : Prepend stuff to the PATH
1000
# Description     : Prepend stuff to the PATH
993
#
1001
#
Line 1095... Line 1103...
1095
#
1103
#
1096
sub change_dir
1104
sub change_dir
1097
{
1105
{
1098
    my ($dir) = @_;
1106
    my ($dir) = @_;
1099
 
1107
 
1100
    if ( $dir && $dir !~ m/^\.$/ )
1108
    if ( $dir && $dir ne '.' )
1101
    {
1109
    {
1102
        Verbose ("Changing to JATS build directory: $dir");
1110
        Verbose ("Changing to JATS build directory: $dir");
1103
        chdir $dir || Error ("Bad change directory: $dir");
1111
        chdir $dir || Error ("Bad change directory: $dir");
1104
    }
-
 
1105
 
1112
 
1106
    #
1113
        #
1107
    #   Reset the CWD
1114
        #   Reset the CWD
1108
    #   Note: Don't use `pwd`. This sucks for so many reasons including
1115
        #   Note: Don't use `pwd`. This sucks for so many reasons including
1109
    #         the fact that it may not be available until this wrapper
1116
        #         the fact that it may not be available until this wrapper
1110
    #         script has done it job.
1117
        #         script has done it job.
1111
    #
1118
        #
1112
    $CWD = getcwd();
1119
        $CWD = getcwd();
1113
    $CWD =~tr~\\/~/~s;
1120
        $CWD =~tr~\\/~/~s;
1114
    Warning ("Current working directory contains spaces") if ( $CWD =~ m/\s/ );
-
 
1115
    return;
1121
    }
1116
}
1122
}
1117
 
1123
 
1118
#-------------------------------------------------------------------------------
1124
#-------------------------------------------------------------------------------
1119
# Function        : scan_for_dir
1125
# Function        : scan_for_dir
1120
#
1126
#
Line 1992... Line 1998...
1992
 
1998
 
1993
    $RESULT = $ecode if ( $ecode );
1999
    $RESULT = $ecode if ( $ecode );
1994
 
2000
 
1995
    #..
2001
    #..
1996
    #   Determine the runtime
2002
    #   Determine the runtime
-
 
2003
    #       $^T is the time that the program started
1997
    #
2004
    #
1998
    if ( $opt_time )
2005
    if ( $opt_time )
1999
    {
2006
    {
2000
        my ($TIMEU, $TIMES) = times;
2007
        my ($TIMEU, $TIMES) = times;
2001
        $TIMER = time - $TIMER;
2008
        my $TIMER = time - $^T;
2002
        my ($m, $s );
-
 
2003
 
-
 
2004
        $m = int($TIMER / 60);
2009
        my $m = int($TIMER / 60);
2005
        $s = $TIMER - ($m * 60);
2010
        my $s = $TIMER - ($m * 60);
2006
 
2011
 
2007
        Message ( "Times: Real: $m:$s, User: $TIMEU, System: $TIMES");
2012
        Message ( "Times: Real: $m:$s, User: $TIMEU, System: $TIMES");
2008
    }
2013
    }
2009
    #.
2014
    #.
2010
    #   Make sure that any important exit code is passed to the user
2015
    #   Make sure that any important exit code is passed to the user