Subversion Repositories DevTools

Rev

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

Rev 239 Rev 241
Line 68... Line 68...
68
our @BUILDSETENV            = ();               # BuildSetenv()
68
our @BUILDSETENV            = ();               # BuildSetenv()
69
our $BUILDINTERFACE         = "";               # BuildInterface()
69
our $BUILDINTERFACE         = "";               # BuildInterface()
70
our $BUILDLOCAL             = "";               # BuildInterface()
70
our $BUILDLOCAL             = "";               # BuildInterface()
71
our $BUILDDIRTREE           = "";               # BuildDirTree()
71
our $BUILDDIRTREE           = "";               # BuildDirTree()
72
our $BUILDLPA_CLEAN_DONE    = 0;                # LinkPkgArchive initialisation done
72
our $BUILDLPA_CLEAN_DONE    = 0;                # LinkPkgArchive initialisation done
-
 
73
our @BUILD_BADNAME          = ();               # Unknown platforms
73
 
74
 
74
our $BUILDNAME              = "";               # BuildName()
75
our $BUILDNAME              = "";               # BuildName()
75
our $BUILDVERSION           = "";               # BuildName()
76
our $BUILDVERSION           = "";               # BuildName()
76
our $BUILDNAME_PACKAGE;                         # Name
77
our $BUILDNAME_PACKAGE;                         # Name
77
our $BUILDNAME_VERSION;                         # Version
78
our $BUILDNAME_VERSION;                         # Version
Line 830... Line 831...
830
    #
831
    #
831
    #   Locate the optional PLATFORM configuration file
832
    #   Locate the optional PLATFORM configuration file
832
    #   If it does exist then it can extend build-time information
833
    #   If it does exist then it can extend build-time information
833
    #
834
    #
834
    my $target = $pInfo->{TARGET};
835
    my $target = $pInfo->{TARGET};
-
 
836
 
-
 
837
    #
-
 
838
    #   Ensure target is known to JATS
-
 
839
    #   Remove unknown targets from the build. Create a list of unknown
-
 
840
    #   targets and report them later.
-
 
841
    #
-
 
842
    unless ( Exists( "$::GBE_CONFIG/PLATFORM", $target  ) )
-
 
843
    {
-
 
844
        $pInfo->{NOT_AVAILABLE} = 1;
-
 
845
        UniquePush (\@BUILD_BADNAME, $target );
-
 
846
    }
-
 
847
 
835
    unless ($pInfo->{NOT_AVAILABLE} )
848
    unless ($pInfo->{NOT_AVAILABLE} )
836
    {
849
    {
837
        if ( my $build_cfg = Require( "$::GBE_CONFIG/PLATFORM", "${target}.cfg"  ) )
850
        if ( my $build_cfg = Require( "$::GBE_CONFIG/PLATFORM", "${target}.cfg"  ) )
838
        {
851
        {
839
            Verbose ("Processing(add) Platform Configuration file: $build_cfg");
852
            Verbose ("Processing(add) Platform Configuration file: $build_cfg");
Line 1207... Line 1220...
1207
    Log( "PERL ....... $::GBE_PERL\n" );
1220
    Log( "PERL ....... $::GBE_PERL\n" );
1208
    Log( "TOOLS ...... $::GBE_TOOLS\n" );
1221
    Log( "TOOLS ...... $::GBE_TOOLS\n" );
1209
    Log( "CONFIG ..... $::GBE_CONFIG\n" );
1222
    Log( "CONFIG ..... $::GBE_CONFIG\n" );
1210
    Log( "MACHTYPE ... $::GBE_MACHTYPE\n" );
1223
    Log( "MACHTYPE ... $::GBE_MACHTYPE\n" );
1211
 
1224
 
1212
    Log( "PLATFORM ... " . $::GBE_PLATFORM . "\n")    if defined ($::GBE_PLATFORM);
1225
    Log( "PLATFORM ... " . PrintList([split(' ', $::GBE_PLATFORM)], $sep) . "\n")    if defined ($::GBE_PLATFORM);
1213
    Log( "BUILDFILTER. " . $::GBE_BUILDFILTER . "\n") if defined ($::GBE_BUILDFILTER);
1226
    Log( "BUILDFILTER. " . PrintList([split(' ', $::GBE_BUILDFILTER)], $sep) . "\n") if defined ($::GBE_BUILDFILTER);
1214
 
1227
 
1215
    Log( "DPKG_STORE.. $::GBE_DPKG_STORE\n" );
1228
    Log( "DPKG_STORE.. $::GBE_DPKG_STORE\n" );
1216
    Log( "DPKG ....... $::GBE_DPKG\n" );
1229
    Log( "DPKG ....... $::GBE_DPKG\n" );
1217
    Log( "DPKG_CACHE.. $::GBE_DPKG_CACHE\n" );
1230
    Log( "DPKG_CACHE . $::GBE_DPKG_CACHE\n" );
1218
    Log( "DPKG_LOCAL.. $::GBE_DPKG_LOCAL\n" );
1231
    Log( "DPKG_LOCAL . $::GBE_DPKG_LOCAL\n" );
1219
    Log( "DPKG_SBOX... $::GBE_DPKG_SBOX\n" );
1232
    Log( "DPKG_SBOX .. $::GBE_DPKG_SBOX\n" );
1220
 
1233
 
1221
    Log( "Platforms .. ", PrintPlatforms(\@BUILDPLATFORMS, $sep)."\n");
1234
    Log( "Platforms .. ", PrintPlatforms(\@BUILDPLATFORMS, $sep)."\n");
1222
 
1235
 
1223
    #
1236
    #
-
 
1237
    #   Generate a list of platforms that are completely unknown to JATS
-
 
1238
    #   May be the result of a user type or a guess
-
 
1239
    #
-
 
1240
    if ( @BUILD_BADNAME )
-
 
1241
    {
-
 
1242
        Log( "Uknown Pla . ". PrintPlatforms(\@BUILD_BADNAME, $sep)."\n");
-
 
1243
         Warning ("The following platform names are not known to JATS", "@BUILD_BADNAME");
-
 
1244
    }
-
 
1245
    
-
 
1246
    #
1224
    #   Generate a list of active platforms
1247
    #   Generate a list of active platforms
1225
    #   Ensure that there are some active platforms
1248
    #   Ensure that there are some active platforms
1226
    #
1249
    #
1227
    GeneratePlatformList();
1250
    GeneratePlatformList();
1228
    Error( "GBE_BUILDFILTER prevents any targets being built" )
1251
    Error( "GBE_BUILDFILTER prevents any targets being built" )
Line 2270... Line 2293...
2270
            }
2293
            }
2271
        }    
2294
        }    
2272
    }
2295
    }
2273
    return $string;
2296
    return $string;
2274
}
2297
}
-
 
2298
#-------------------------------------------------------------------------------
-
 
2299
# Function        : PrintList
-
 
2300
#
-
 
2301
# Description     : Pretty format an array to fit within 80 char line
-
 
2302
#                   Perform wrapping as required
-
 
2303
#
-
 
2304
# Inputs          : $list           - Reference to an array
-
 
2305
#                   $nl             - New line stuff.
-
 
2306
#                                     Use to prefix new lines
-
 
2307
#
-
 
2308
# Returns         : string
-
 
2309
#
-
 
2310
sub PrintList
-
 
2311
{
-
 
2312
    my ($list, $nl) = @_;
-
 
2313
    my ($string) = '';                          # result
-
 
2314
    my $sep;
-
 
2315
 
-
 
2316
    if ( @$list )
-
 
2317
    {
-
 
2318
        my ($llen) = length($nl);
-
 
2319
 
-
 
2320
        for my $k (@$list)
-
 
2321
        {
-
 
2322
            my $klen = length($k);
-
 
2323
            if ($llen + $klen > 78 )
-
 
2324
            {
-
 
2325
                $string .= $nl;
-
 
2326
                $llen = length($nl);
-
 
2327
            }
-
 
2328
            else
-
 
2329
            {
-
 
2330
                if ( $sep )
-
 
2331
                {
-
 
2332
                    $string .= $sep;
-
 
2333
                    $llen++;
-
 
2334
                }
-
 
2335
                else
-
 
2336
                {
-
 
2337
                    $sep = ' ';
-
 
2338
                }
-
 
2339
            }
-
 
2340
            $string .= $k;
-
 
2341
            $llen += $klen;
-
 
2342
        }
-
 
2343
    }
-
 
2344
    return $string;
-
 
2345
}
2275
 
2346
 
2276
 
2347
 
2277
sub BuildReleaseFile
2348
sub BuildReleaseFile
2278
{
2349
{
2279
    my ( $BuildFilename, $BuildDir ) = @_;
2350
    my ( $BuildFilename, $BuildDir ) = @_;
Line 2472... Line 2543...
2472
    #   Santity test
2543
    #   Santity test
2473
    #   Target must be a directory
2544
    #   Target must be a directory
2474
    #
2545
    #
2475
    unless ( -d $target_archive )
2546
    unless ( -d $target_archive )
2476
    {
2547
    {
2477
        Warning("$target_archive_name is not a dirertory: $target_archive")
2548
        Warning("$target_archive_name is not a directory: $target_archive")
2478
            unless $Clobber;
2549
            unless $Clobber;
2479
        return;
2550
        return;
2480
    }
2551
    }
2481
 
2552
 
2482
    my $link_dir = "$target_archive/$BUILDNAME_PACKAGE";
2553
    my $link_dir = "$target_archive/$BUILDNAME_PACKAGE";
Line 2520... Line 2591...
2520
    my $sandbox_dpkg_archive = $::GBE_DPKG_SBOX;
2591
    my $sandbox_dpkg_archive = $::GBE_DPKG_SBOX;
2521
    return unless ( $sandbox_dpkg_archive );
2592
    return unless ( $sandbox_dpkg_archive );
2522
 
2593
 
2523
    unless ( -d $sandbox_dpkg_archive )
2594
    unless ( -d $sandbox_dpkg_archive )
2524
    {
2595
    {
2525
        Error("sandbox_dpkg_archive is not a dirertory: $sandbox_dpkg_archive")
2596
        Error("sandbox_dpkg_archive is not a directory: $sandbox_dpkg_archive")
2526
            unless $Clobber;
2597
            unless $Clobber;
2527
        return;
2598
        return;
2528
    }
2599
    }
2529
 
2600
 
2530
    #
2601
    #