Subversion Repositories DevTools

Rev

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

Rev 1121 Rev 1123
Line 60... Line 60...
60
#                       --Architecture=xxxx     - Default actitecture is the current target
60
#                       --Architecture=xxxx     - Default actitecture is the current target
61
#                       --Product=yyyy          - Product Family
61
#                       --Product=yyyy          - Product Family
62
#                       --Debian=BaseName[,--Prod,--Debug,--Arch=xxxx,--Product=yyyy]
62
#                       --Debian=BaseName[,--Prod,--Debug,--Arch=xxxx,--Product=yyyy]
63
#                       --MugPackage=Package[,--Subdir=subdir[,subdir]+]
63
#                       --MugPackage=Package[,--Subdir=subdir[,subdir]+]
64
#                       --SrcFile=xxx
64
#                       --SrcFile=xxx
-
 
65
#                       --Comment=xxx           - Add comment to Manifst
65
#
66
#
66
# Returns         : Nothing
67
# Returns         : Nothing
67
#
68
#
68
sub ManifestFiles
69
sub ManifestFiles
69
{
70
{
Line 97... Line 98...
97
                ReportError ("ManifestFiles:--Tier option is only allowed once");
98
                ReportError ("ManifestFiles:--Tier option is only allowed once");
98
                next;
99
                next;
99
            }
100
            }
100
            $tier = $1;
101
            $tier = $1;
101
 
102
 
-
 
103
        } elsif ( m~^--Comment=~ ) {
-
 
104
            my $cmt = $_;
-
 
105
            $cmt =~ s~.+=~~;
-
 
106
            $cmt =~ s~\s*\n\s*~\n~g;
-
 
107
            push @files, {'cmt' => $cmt };
-
 
108
 
102
        } elsif ( m~^--Debian=(.+)~ ) {
109
        } elsif ( m~^--Debian=(.+)~ ) {
103
            push @files, LocateDebianFile($1, $default_arch, $default_prod);
110
            push @files, {'file' => LocateDebianFile($1, $default_arch, $default_prod)};
104
 
111
 
105
        } elsif ( m~^--SrcFile=(.+)~ ) {
112
        } elsif ( m~^--SrcFile=(.+)~ ) {
106
            push @files, LocatePreReq($1);
113
            push @files, {'file' => LocatePreReq($1)};
107
            
114
            
108
        } elsif ( m~^--MugPackage=(.+)~ ) {
115
        } elsif ( m~^--MugPackage=(.+)~ ) {
109
            if ( $mug_dir )
116
            if ( $mug_dir )
110
            {
117
            {
111
                ReportError ("ManifestFiles:--MugPackage option is only allowed once");
118
                ReportError ("ManifestFiles:--MugPackage option is only allowed once");
Line 313... Line 320...
313
#
320
#
314
sub ManifestFiles_Generate
321
sub ManifestFiles_Generate
315
{
322
{
316
    Debug ("ManifestFiles_Generate");
323
    Debug ("ManifestFiles_Generate");
317
    Message ("Generating Manifest File");
324
    Message ("Generating Manifest File");
-
 
325
 
-
 
326
    #
-
 
327
    #   Need at least one Manifest Entry
-
 
328
    #
-
 
329
    return unless ( @Manifests );
318
#DebugDumpData ( "Manifests", \@Manifests );
330
#DebugDumpData ( "Manifests", \@Manifests );
319
 
331
 
320
    #
332
    #
321
    #   Create the Manifest File as we process the lists
333
    #   Create the Manifest File as we process the lists
322
    #   Place this in the local directory:
334
    #   Place this in the local directory:
323
    #       - So that it will be deleted on clobber
335
    #       - So that it will be deleted on clobber
324
    #       - So this it can be placed in a target-specific subdir
336
    #       - So that it can be placed in a target-specific subdir
325
    #
337
    #
326
    Error ("ManifestFiles: Needs local directory specified in build.pl") unless ( $::ScmLocal );
338
    Error ("ManifestFiles: Needs local directory specified in build.pl") unless ( $::ScmLocal );
327
 
339
 
328
    my $manifest_dir = "$::ScmRoot/$::ScmLocal/Manifest/$::ScmPlatform";
340
    my $manifest_dir = "$::ScmRoot/$::ScmLocal/Manifest/$::ScmPlatform";
329
    System( "$::GBE_BIN/mkdir -p $manifest_dir" );
341
    System( "$::GBE_BIN/mkdir -p $manifest_dir" );
Line 343... Line 355...
343
    print_mf ("#");
355
    print_mf ("#");
344
 
356
 
345
    #
357
    #
346
    #   Process each tire in the order presented in the source file
358
    #   Process each tire in the order presented in the source file
347
    #
359
    #
-
 
360
    my $last_was_comment = 0;
348
    foreach my $entry ( @Manifests )
361
    foreach my $entry ( @Manifests )
349
    {
362
    {
350
    print_mf ("#");
363
    print_mf ("#");
351
 
364
 
352
#DebugDumpData ( "Manifest Entry", $entry );
365
#DebugDumpData ( "Manifest Entry", $entry );
Line 356... Line 369...
356
 
369
 
357
        #
370
        #
358
        #   Insert all the files that have been specified
371
        #   Insert all the files that have been specified
359
        #   The user specified order is preserved
372
        #   The user specified order is preserved
360
        #
373
        #
-
 
374
        #   Entries may be either a file or a comment
-
 
375
        #   Comments: Merge multiple comments and create blocks
-
 
376
        #
-
 
377
        #
361
        my @files = @{ $entry->{files} };
378
        my @files = @{ $entry->{files} };
362
        foreach my $file ( @files )
379
        foreach my $fentry ( @files )
363
        {
380
        {
-
 
381
            if ( my $cmt = $fentry->{'cmt'} )
-
 
382
            {
-
 
383
                print_mf ('') unless ( $last_was_comment ) ;
-
 
384
                print_mf ( map (('# ' . $_) , split ("\n", $cmt) ));
-
 
385
                $last_was_comment = 1;
-
 
386
                next;
-
 
387
            }
-
 
388
 
-
 
389
            print_mf ('#') if ( $last_was_comment );
-
 
390
            if ( my $file = $fentry->{'file'} )
-
 
391
            {
364
            my $base_file = StripDir($file);
392
                my $base_file = StripDir( $file );
365
            print_mf ("$name,$tier,$base_file");
393
                print_mf ("$name,$tier,$base_file");
366
            PackageFile ('*', $file, '--Subdir=mug', '--Strip' );
394
                PackageFile ('*', $file, '--Subdir=mug', '--Strip' );
-
 
395
                $last_was_comment = 0;
-
 
396
            }
367
        }
397
        }
368
 
398
 
369
        #
399
        #
370
        #   Expand out the entire MUG directory
400
        #   Expand out the entire MUG directory
371
        #   All .mug files in the MUG directory will be added to the manifest
401
        #   All .mug files in the MUG directory will be added to the manifest