Subversion Repositories DevTools

Rev

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

Rev 4690 Rev 4902
Line 53... Line 53...
53
my $opt_dir;
53
my $opt_dir;
54
my $opt_java;
54
my $opt_java;
55
my $opt_export_vars = 1;
55
my $opt_export_vars = 1;
56
my $result;
56
my $result;
57
my $opt_logfile;
57
my $opt_logfile;
-
 
58
my $notaBuildMachine = 0;
58
 
59
 
59
#
60
#
60
#   Grab a copy of ALL the environment variable that will be used
61
#   Grab a copy of ALL the environment variable that will be used
61
#   This will simplify the script a great deal
62
#   This will simplify the script a great deal
62
#
63
#
Line 105... Line 106...
105
$GBE_PLATFORM    = join (' ', split( /[,\s]+/, $GBE_PLATFORM));
106
$GBE_PLATFORM    = join (' ', split( /[,\s]+/, $GBE_PLATFORM));
106
$GBE_ABT         = join (' ', split( /[,\s]+/, $GBE_ABT));
107
$GBE_ABT         = join (' ', split( /[,\s]+/, $GBE_ABT));
107
$GBE_HOSTNAME    =~ s~\s+~~g;
108
$GBE_HOSTNAME    =~ s~\s+~~g;
108
$GBE_VCS         = lc( $GBE_VCS );
109
$GBE_VCS         = lc( $GBE_VCS );
109
 
110
 
-
 
111
# Capture NON Build Machine config before parsing the command line
-
 
112
#   Yes the user can still fudge the envrionment
-
 
113
$notaBuildMachine = (exists $ENV{GBE_ABT} && $ENV{GBE_ABT} eq 'NONE' );
-
 
114
 
110
#-------------------------------------------------------------------------------
115
#-------------------------------------------------------------------------------
111
#   Parse the user options
116
#   Parse the user options
112
#   GetOptions has been configured so that it will stop parsing on the first
117
#   GetOptions has been configured so that it will stop parsing on the first
113
#   non-options. This allows the command syntax to the script to have options
118
#   non-options. This allows the command syntax to the script to have options
114
#   that are directed to this script before the command keyword, and command
119
#   that are directed to this script before the command keyword, and command
Line 1506... Line 1511...
1506
#
1511
#
1507
#   Kick off the build process
1512
#   Kick off the build process
1508
#
1513
#
1509
sub build
1514
sub build
1510
{
1515
{
-
 
1516
    isaBuildMachine();
1511
    my $build_file = $BUILD_FILE;
1517
    my $build_file = $BUILD_FILE;
1512
    (my $name = $CWD) =~ s~^.*/~~ ;
1518
    (my $name = $CWD) =~ s~^.*/~~ ;
1513
    $opr_done = 1;
1519
    $opr_done = 1;
1514
 
1520
 
1515
    find_jats_dir($build_file);
1521
    find_jats_dir($build_file);
Line 1542... Line 1548...
1542
{
1548
{
1543
    my @make_args = @_;
1549
    my @make_args = @_;
1544
    my $all = 1;
1550
    my $all = 1;
1545
    my $msg;
1551
    my $msg;
1546
    $opr_done = 1;
1552
    $opr_done = 1;
-
 
1553
    isaBuildMachine();
1547
 
1554
 
1548
    if ( $make_args[0] && $make_args[0] eq 'NOTALL' )
1555
    if ( $make_args[0] && $make_args[0] eq 'NOTALL' )
1549
    {
1556
    {
1550
        $all = 0;
1557
        $all = 0;
1551
        shift @make_args;
1558
        shift @make_args;
Line 1883... Line 1890...
1883
#
1890
#
1884
# Inputs          : $1+ program arguments
1891
# Inputs          : $1+ program arguments
1885
#
1892
#
1886
sub run_ant
1893
sub run_ant
1887
{
1894
{
-
 
1895
    isaBuildMachine();
1888
    my $JAVA_HOME = $ENV{JAVA_HOME} || Error ("JAVA_HOME is not defined in the environment");
1896
    my $JAVA_HOME = $ENV{JAVA_HOME} || Error ("JAVA_HOME is not defined in the environment");
1889
    my $ANT_HOME  = $ENV{ANT_HOME}  || Error ("ANT_HOME is not defined in the environment" );
1897
    my $ANT_HOME  = $ENV{ANT_HOME}  || Error ("ANT_HOME is not defined in the environment" );
1890
 
1898
 
1891
    #
1899
    #
1892
    #   Detect an VIX formatted build
1900
    #   Detect an VIX formatted build
Line 1984... Line 1992...
1984
    my $ANT_HOME  = $ENV{ANT_HOME};
1992
    my $ANT_HOME  = $ENV{ANT_HOME};
1985
    my @abt_arg;
1993
    my @abt_arg;
1986
    my $buildfile = 'build.xml';
1994
    my $buildfile = 'build.xml';
1987
 
1995
 
1988
    ErrorConfig( 'name'    => 'JATS ABT' );
1996
    ErrorConfig( 'name'    => 'JATS ABT' );
-
 
1997
    isaBuildMachine();
1989
 
1998
 
1990
    #
1999
    #
1991
    #   Use the user specified buildfile
2000
    #   Use the user specified buildfile
1992
    #
2001
    #
1993
    $buildfile = $BUILD_FILE
2002
    $buildfile = $BUILD_FILE
Line 2087... Line 2096...
2087
#   Cleanup the sandbox
2096
#   Cleanup the sandbox
2088
#   Perform a "make clean" then a "build clobber"
2097
#   Perform a "make clean" then a "build clobber"
2089
#
2098
#
2090
sub clobber
2099
sub clobber
2091
{
2100
{
-
 
2101
    isaBuildMachine();
2092
    Message ("=== Removing ======");
2102
    Message ("=== Removing ======");
2093
    find_jats_dir( $BUILD_FILE );
2103
    find_jats_dir( $BUILD_FILE );
2094
    my $build_file = getBuildFile();
2104
    my $build_file = getBuildFile();
2095
    
2105
    
2096
 
2106
 
Line 2147... Line 2157...
2147
    #
2157
    #
2148
    Verbose ("ExitCode: $RESULT");
2158
    Verbose ("ExitCode: $RESULT");
2149
    exit $RESULT;
2159
    exit $RESULT;
2150
}
2160
}
2151
 
2161
 
-
 
2162
#-------------------------------------------------------------------------------
-
 
2163
# Function        : isaBuildMachine 
-
 
2164
#
-
 
2165
# Description     : Test that this machine is a build machine
-
 
2166
#                   One that supports compilation
-
 
2167
#                   Jats may be installed on machines where it may be used in 
-
 
2168
#                   a support mode but not to build software. ie: auperaunx01
-
 
2169
#
-
 
2170
# Inputs          : None
-
 
2171
#
-
 
2172
# Returns         : May not return 
-
 
2173
#
-
 
2174
sub isaBuildMachine
-
 
2175
{
-
 
2176
    if ($notaBuildMachine)
-
 
2177
    {
-
 
2178
        Error("This machine does not support JATS for building software.",
-
 
2179
              "This machine does support JATS for the purpose of running support utilities.");
-
 
2180
    }
-
 
2181
 
-
 
2182
 
-
 
2183
}
-
 
2184
 
-
 
2185
 
2152
########################################################################
2186
########################################################################
2153
#
2187
#
2154
#   Main body of the script
2188
#   Main body of the script
2155
#
2189
#
2156
#   Process help and manual options
2190
#   Process help and manual options