Subversion Repositories DevTools

Rev

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

Rev 5429 Rev 5679
Line 84... Line 84...
84
our @BUILDTOOLS             = ();               # Extended tool path
84
our @BUILDTOOLS             = ();               # Extended tool path
85
our $BUILDPHASE             = 0;                # In Build Phase
85
our $BUILDPHASE             = 0;                # In Build Phase
86
our @CLOBBERDIRS            = ();               # Directories to clobber
86
our @CLOBBERDIRS            = ();               # Directories to clobber
87
our @REMOVEDIRS             = ();               # Directories to remove - if empty
87
our @REMOVEDIRS             = ();               # Directories to remove - if empty
88
our %BUILD_KNOWNFILES       = ();               # Files that will be known
88
our %BUILD_KNOWNFILES       = ();               # Files that will be known
-
 
89
our @BUILDEXCLUDE           = ();               # Platforms to be excluded
89
 
90
 
90
our $Makelib                = "";
91
our $Makelib                = "";
91
our $GBE_CORE;                                  # Root of JATS
92
our $GBE_CORE;                                  # Root of JATS
92
our $InterfaceVersion;                          # Interface directory format version
93
our $InterfaceVersion;                          # Interface directory format version
93
our $ScmRoot;                                   # Package Root
94
our $ScmRoot;                                   # Package Root
Line 1191... Line 1192...
1191
    HashJoin( \%BUILDPLATFORMARGS, $;, $platform, @arguments )
1192
    HashJoin( \%BUILDPLATFORMARGS, $;, $platform, @arguments )
1192
        if ( $platform );
1193
        if ( $platform );
1193
}
1194
}
1194
 
1195
 
1195
#-------------------------------------------------------------------------------
1196
#-------------------------------------------------------------------------------
-
 
1197
# Function        : BuildExclude 
-
 
1198
#
-
 
1199
# Description     : Allow specific platforms to be excluded from the Build
-
 
1200
#                   Intended use:
-
 
1201
#                       Allow the use if a platform alias, but not all elements of it
-
 
1202
#                       ie: Use DEVLINUX, but not ARM9TDMI as we no longer support it 
-
 
1203
#                           in this version.
-
 
1204
#                   Multiple BuildExclude directives are allowed
-
 
1205
#                   Order or location is not important        
-
 
1206
#
-
 
1207
# Inputs          : Platforms names and options
-
 
1208
#                   Format:
-
 
1209
#                       --PLATFORM=xxxxx    (Marginal use)
-
 
1210
#                       --PRODUCT=yyyy      (Not very useful)
-
 
1211
#                       --TARGET=zzzz       (Default)
-
 
1212
#                       zzzz                (Same as --TARGET=ZZZZ)
-
 
1213
#                       
-
 
1214
#
-
 
1215
# Returns         : Nothing 
-
 
1216
#
-
 
1217
sub BuildExclude
-
 
1218
{
-
 
1219
    my( @arguments ) = @_;
-
 
1220
    Debug( "BuildExclude(@arguments)" );
-
 
1221
 
-
 
1222
    Error( "BuildExclude must appear before BuildName()..." )
-
 
1223
        if ( $BUILDNAME ne "" );
-
 
1224
 
-
 
1225
    #
-
 
1226
    #   Simply save the arguments for later
-
 
1227
    #   Allow multiple specs in the one definition
-
 
1228
    #
-
 
1229
    foreach ( @arguments)
-
 
1230
    {
-
 
1231
        UniquePush (\@BUILDEXCLUDE, split(/\s*,\s*/,$_));
-
 
1232
    }
-
 
1233
}
-
 
1234
 
-
 
1235
#-------------------------------------------------------------------------------
1196
# Function        : BuildName
1236
# Function        : BuildName
1197
#
1237
#
1198
# Description     : Defines the package name and version
1238
# Description     : Defines the package name and version
1199
#
1239
#
1200
# Inputs          : build arguments
1240
# Inputs          : build arguments
Line 1281... Line 1321...
1281
    Log( "TOOLS ...... $::GBE_TOOLS" );
1321
    Log( "TOOLS ...... $::GBE_TOOLS" );
1282
    Log( "CONFIG ..... $::GBE_CONFIG" );
1322
    Log( "CONFIG ..... $::GBE_CONFIG" );
1283
    Log( "MACHTYPE ... $::GBE_MACHTYPE" );
1323
    Log( "MACHTYPE ... $::GBE_MACHTYPE" );
1284
 
1324
 
1285
    Log( "PLATFORM ... " . PrintList([split(' ', $::GBE_PLATFORM)], $sep) )    if defined ($::GBE_PLATFORM);
1325
    Log( "PLATFORM ... " . PrintList([split(' ', $::GBE_PLATFORM)], $sep) )    if defined ($::GBE_PLATFORM);
-
 
1326
    Log( "EXCLUDE .... " . PrintList([@BUILDEXCLUDE], $sep) )    if defined (@BUILDEXCLUDE);
1286
    Log( "BUILDFILTER. " . PrintList([split(' ', $::GBE_BUILDFILTER)], $sep) ) if defined ($::GBE_BUILDFILTER);
1327
    Log( "BUILDFILTER. " . PrintList([split(' ', $::GBE_BUILDFILTER)], $sep) ) if defined ($::GBE_BUILDFILTER);
1287
 
1328
 
1288
    Log( "DPKG_STORE.. $::GBE_DPKG_STORE" );
1329
    Log( "DPKG_STORE.. $::GBE_DPKG_STORE" );
1289
    Log( "DPKG ....... $::GBE_DPKG" );
1330
    Log( "DPKG ....... $::GBE_DPKG" );
1290
    Log( "DPKG_REPLI . $::GBE_DPKG_REPLICA" );
1331
    Log( "DPKG_REPLI . $::GBE_DPKG_REPLICA" );
Line 2201... Line 2242...
2201
# Function        : GeneratePlatformList
2242
# Function        : GeneratePlatformList
2202
#
2243
#
2203
# Description     : Return a list of platforms that should particiate in this
2244
# Description     : Return a list of platforms that should particiate in this
2204
#                   build. This is a function of
2245
#                   build. This is a function of
2205
#                       1) Platforms defined in the build.pl file
2246
#                       1) Platforms defined in the build.pl file
-
 
2247
#                       2) Platforms excluded in the build.pl file
2206
#                       2) User filter defined in GBE_BUILDFILTER
2248
#                       3) User filter defined in GBE_BUILDFILTER
2207
#
2249
#
2208
#                   The primary use of this function is to limit the creation
2250
#                   The primary use of this function is to limit the creation
2209
#                   of makefiles to those that have supported compilers on
2251
#                   of makefiles to those that have supported compilers on
2210
#                   the underlying machine.
2252
#                   the underlying machine.
2211
#
2253
#
Line 2218... Line 2260...
2218
#
2260
#
2219
#                   Where OPTION may be one of
2261
#                   Where OPTION may be one of
2220
#                       --PLATFORM
2262
#                       --PLATFORM
2221
#                       --PRODUCT
2263
#                       --PRODUCT
2222
#                       --TARGET
2264
#                       --TARGET
-
 
2265
#                   For a BuildProduct( AA,BB,CC)
-
 
2266
#                       Product     - AA
-
 
2267
#                       Targets     - BB, CC
-
 
2268
#                       Platforms   - AA_BB, AA_CC
2223
#
2269
#
2224
#                   Special cases
2270
#                   Special cases
2225
#                   1) If GBE_BUILDFILTER is empty, then all available platforms are used
2271
#                   1) If GBE_BUILDFILTER is empty, then all available platforms are used
2226
#                      The global $All is set, then all available platforms are used
2272
#                      The global $All is set, then all available platforms are used
2227
#                   2) If the first word of GBE_BUILDFILTER is a negative filter,
2273
#                   2) If the first word of GBE_BUILDFILTER is a negative filter,
Line 2297... Line 2343...
2297
        }
2343
        }
2298
        Debug( "GeneratePlatformList: Filter:$platform_filter" );
2344
        Debug( "GeneratePlatformList: Filter:$platform_filter" );
2299
 
2345
 
2300
        #
2346
        #
2301
        #   Detect the special cases
2347
        #   Detect the special cases
2302
        #       1) No user definition - assume all platforms
2348
        #       1) No user definition
2303
        #       2) First word contains a subtractive element
2349
        #       2) First word contains a subtractive element
-
 
2350
        #   And assume all platforms    
2304
        #
2351
        #
2305
        my (@filter) = split( ' ', $platform_filter );
2352
        my (@filter) = split( ' ', $platform_filter );
2306
 
2353
 
2307
        if ( !scalar @filter || $filter[0] =~ m/^$/ || $filter[0] =~ m/!/ )
2354
        if ( !scalar @filter || $filter[0] =~ m/^$/ || $filter[0] =~ m/!/ )
2308
        {
2355
        {
2309
            %result = %{$part_to_platform{'PLATFORM'}}
2356
            %result = %{$part_to_platform{'PLATFORM'}}
2310
                if exists $part_to_platform{'PLATFORM'} ;
2357
                if exists $part_to_platform{'PLATFORM'} ;
2311
        }
2358
        }
-
 
2359
 
2312
#DebugDumpData( "PartToPlatform", \%part_to_platform );
2360
#DebugDumpData( "PartToPlatform", \%part_to_platform );
2313
 
2361
 
2314
        #
2362
        #
2315
        #   Process each element in the user filter list
2363
        #   Process each element in the user filter list
2316
        #   Expand platforms into known aliases
2364
        #   Expand platforms into known aliases
Line 2364... Line 2412...
2364
                print "GBE_BUILDFILTER filter term not understood: $word\n";
2412
                print "GBE_BUILDFILTER filter term not understood: $word\n";
2365
            }
2413
            }
2366
        }
2414
        }
2367
 
2415
 
2368
        #
2416
        #
-
 
2417
        #   Process BuildExclude
-
 
2418
        #   A list of 
-
 
2419
        #
-
 
2420
        for my $word (@BUILDEXCLUDE)
-
 
2421
        {
-
 
2422
            my $platform;
-
 
2423
 
-
 
2424
            Error('BuildExclude: Unknown option: ' . $word) if ($word =~ m~^-~);
-
 
2425
            Error('BuildExclude: Invalid format: ' . $word) if ($word =~ m~^!~);
-
 
2426
 
-
 
2427
            #
-
 
2428
            #   Remove items from the result
-
 
2429
            #
-
 
2430
            my $table = "TARGET";
-
 
2431
            my $plist = $part_to_platform{$table}{$word};
-
 
2432
            Warning('BuildExclude: Unknown target:' . $word ) unless $plist;
-
 
2433
            for ( @{$plist})
-
 
2434
            {
-
 
2435
                delete $result{$_};
-
 
2436
            }
-
 
2437
        }
-
 
2438
 
-
 
2439
        #
2369
        #   Return an array of platforms to process
2440
        #   Return an array of platforms to process
2370
        #
2441
        #
2371
        @BUILD_ACTIVEPLATFORMS = sort keys %result;
2442
        @BUILD_ACTIVEPLATFORMS = sort keys %result;
2372
 
2443
 
2373
        #
2444
        #