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 829... Line 829...
829
#
829
#
830
sub ShowMakefiles
830
sub ShowMakefiles
831
{
831
{
832
    my ( $cmd, $pref ) = @_;
832
    my ( $cmd, $pref ) = @_;
833
    Verbose ("Show makefiles");
833
    Verbose ("Show makefiles");
-
 
834
    ShowTargetsAlaises();
834
 
835
 
835
    print "\nPlatform targets\n";
-
 
836
    foreach ( sort keys %BUILDINFO )
-
 
837
    {
-
 
838
        print "    $_\n";
-
 
839
    }
-
 
840
 
-
 
841
    my @alias = sort keys %ScmBuildAliases;
-
 
842
    if ( $#alias >=0 )
-
 
843
    {
-
 
844
        print "\nAlias targets\n";
-
 
845
        foreach ( @alias )
-
 
846
        {
-
 
847
            print "    $_   - $ScmBuildAliases{$_}\n";
-
 
848
        }
-
 
849
    }
-
 
850
    
-
 
851
    #
836
    #
852
    #   Read in the Tag file for the current directory
837
    #   Read in the Tag file for the current directory
853
    #   This will provide the current list of subdirectories
838
    #   This will provide the current list of subdirectories
854
    #
839
    #
855
    #   Process Test the current makefiles, then any subdirs
840
    #   Process Test the current makefiles, then any subdirs
Line 894... Line 879...
894
    {
879
    {
895
        ShowSubMake( $cmd, CleanDirName( "$dir/$subdir"), $pref, $level + 1 );
880
        ShowSubMake( $cmd, CleanDirName( "$dir/$subdir"), $pref, $level + 1 );
896
    }
881
    }
897
}
882
}
898
 
883
 
899
 
-
 
900
#-------------------------------------------------------------------------------
884
#-------------------------------------------------------------------------------
901
# Function        : TestMake
885
# Function        : TestMake
902
#
886
#
903
# Description     : Test the makefiles component files
887
# Description     : Test the makefiles component files
904
#                   and determine if the makefile(s) need to be rebuilt
888
#                   and determine if the makefile(s) need to be rebuilt
Line 1278... Line 1262...
1278
#
1262
#
1279
    pod2usage(-verbose => 0,
1263
    pod2usage(-verbose => 0,
1280
              -message => "Version: $VERSION",
1264
              -message => "Version: $VERSION",
1281
              -exitval => 'NOEXIT');
1265
              -exitval => 'NOEXIT');
1282
 
1266
 
-
 
1267
    ShowTargetsAlaises();
-
 
1268
}
-
 
1269
 
-
 
1270
#-------------------------------------------------------------------------------
-
 
1271
# Function        : ShowTargetsAlaises
-
 
1272
#
-
 
1273
# Description     : Display make targets and aliases
-
 
1274
#                   Used by 'show' and 'help'
-
 
1275
#
-
 
1276
# Inputs          : None
-
 
1277
#
-
 
1278
# Returns         : Nothing
-
 
1279
#                   Output via 'print'
-
 
1280
#
-
 
1281
sub ShowTargetsAlaises
-
 
1282
{
-
 
1283
    my @targets = sort keys %BUILDINFO;
-
 
1284
    my @alias = sort keys %ScmBuildAliases;
-
 
1285
    
-
 
1286
    #
-
 
1287
    #   Determine the max length of target or alias
-
 
1288
    #   Used to make pretty display
-
 
1289
    #
-
 
1290
    my $flen = 6;
-
 
1291
    foreach ( @alias, @targets )
-
 
1292
    {
-
 
1293
        my $len = length $_;
-
 
1294
        $flen = $len if ( $len > $flen );
-
 
1295
    }
-
 
1296
 
1283
    print "Platform targets\n";
1297
    print "\nActive Platform targets\n";
1284
    foreach ( sort keys %BUILDINFO )
1298
    foreach (@targets)
1285
    {
1299
    {
1286
        print "    $_\n";
1300
        print "    $_\n";
1287
    }
1301
    }
1288
 
1302
 
1289
    my @alias = sort keys %ScmBuildAliases;
-
 
1290
    if ( $#alias >=0 )
1303
    if ( $#alias >=0 )
1291
    {
1304
    {
1292
        print "Alias targets\n";
1305
        print "\nAlias targets\n";
-
 
1306
 
-
 
1307
        #   Display aliases
-
 
1308
        #   Indent list by 4 spaces
-
 
1309
        #
1293
        foreach ( @alias )
1310
        foreach ( @alias )
1294
        {
1311
        {
1295
            print "    $_   - $ScmBuildAliases{$_}\n";
1312
            print PrintList("    $_",4+$flen, split(' ', $ScmBuildAliases{$_}));
-
 
1313
        }
-
 
1314
    }
-
 
1315
}
-
 
1316
 
-
 
1317
#-------------------------------------------------------------------------------
-
 
1318
# Function        : PrintList
-
 
1319
#
-
 
1320
# Description     : Pretty format an array to fit within 80 char line
-
 
1321
#                   Perform wrapping as required
-
 
1322
#
-
 
1323
# Inputs          : $title          - Title string
-
 
1324
#                   $len            - Desired length of title area
-
 
1325
#                   @list           - An array of items to print
-
 
1326
#
-
 
1327
# Returns         : string
-
 
1328
#
-
 
1329
sub PrintList
-
 
1330
{
-
 
1331
    my ($title, $llen, @list) = @_;
-
 
1332
    my $string = sprintf ("%-${llen}s :", $title);
-
 
1333
 
-
 
1334
    my $nlen = length($string);
-
 
1335
    my $nl = "\n" . (' ' x  $nlen );
-
 
1336
    $llen = $nlen;
-
 
1337
 
-
 
1338
    for my $k (sort @list)
-
 
1339
    {
-
 
1340
        my $klen = length($k);
-
 
1341
        if ($llen + $klen > 78 )
-
 
1342
        {
-
 
1343
            $string .= $nl;
-
 
1344
            $llen = $nlen;
1296
        }
1345
        }
-
 
1346
        $string .= ' ' .  $k;
-
 
1347
        $llen += $klen + 1;
1297
    }
1348
    }
-
 
1349
    return $string . "\n";
1298
}
1350
}
1299
 
1351
 
1300
#-------------------------------------------------------------------------------
1352
#-------------------------------------------------------------------------------
1301
# Function        : ReadMaketags
1353
# Function        : ReadMaketags
1302
#
1354
#