Subversion Repositories DevTools

Rev

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

Rev 4778 Rev 4781
Line 91... Line 91...
91
    $self->{FH}             = $handle;
91
    $self->{FH}             = $handle;
92
    $self->{FH_inmemory}    = 0;
92
    $self->{FH_inmemory}    = 0;
93
    $self->{RECIPE_PREFIX}  = '';
93
    $self->{RECIPE_PREFIX}  = '';
94
    $self->{RECIPE_COMMENT} = '';
94
    $self->{RECIPE_COMMENT} = '';
95
    $self->{STACK}          = [];
95
    $self->{STACK}          = [];
-
 
96
    $self->{SDEF}           = '';
96
 
97
 
97
    push @{$self->{NAME}}, split(/,/,$name) if ( $name );
98
    push @{$self->{NAME}}, split(/,/,$name) if ( $name );
98
 
99
 
99
    bless ($self, __PACKAGE__);
100
    bless ($self, __PACKAGE__);
100
 
101
 
Line 383... Line 384...
383
 
384
 
384
    $data{RECIPE}           = $self->{RECIPE};
385
    $data{RECIPE}           = $self->{RECIPE};
385
    $data{SHELL}            = $self->{SHELL};
386
    $data{SHELL}            = $self->{SHELL};
386
    $data{RECIPE_PREFIX}    = $self->{RECIPE_PREFIX};
387
    $data{RECIPE_PREFIX}    = $self->{RECIPE_PREFIX};
387
    $data{RECIPE_COMMENT}   = $self->{RECIPE_COMMENT};
388
    $data{RECIPE_COMMENT}   = $self->{RECIPE_COMMENT};
-
 
389
    $data{SDEF}             = $self->{SDEF};
-
 
390
    
388
 
391
 
389
    push @{$self->{STACK}}, \%data;
392
    push @{$self->{STACK}}, \%data;
390
 
393
 
391
    $self->{RECIPE}         = []; 
394
    $self->{RECIPE}         = []; 
392
    $self->{SHELL}          = [];
395
    $self->{SHELL}          = [];
393
    $self->{RECIPE_PREFIX}  = '';
396
    $self->{RECIPE_PREFIX}  = '';
394
    $self->{RECIPE_COMMENT} = '';
397
    $self->{RECIPE_COMMENT} = '';
-
 
398
    $self->{SDEF}           = '';
395
}
399
}
396
 
400
 
-
 
401
sub SectionDef
-
 
402
{
-
 
403
    my $self = shift;
-
 
404
    $self->{SDEF} = $_[0];
-
 
405
}
-
 
406
 
-
 
407
 
397
#-------------------------------------------------------------------------------
408
#-------------------------------------------------------------------------------
398
# Function        : Print
409
# Function        : Print
399
#
410
#
400
# Description     : Print the entry
411
# Description     : Print the entry
401
#
412
#
Line 497... Line 508...
497
        #
508
        #
498
        #   Push the current section onto the stack
509
        #   Push the current section onto the stack
499
        #   This will simplify processing of all sections
510
        #   This will simplify processing of all sections
500
        #
511
        #
501
        $self->NewSection();
512
        $self->NewSection();
502
        
-
 
503
        foreach my $recipeEntry (@{$self->{STACK}})
513
        foreach my $recipeEntry (@{$self->{STACK}})
504
        {
514
        {
505
            my $comment = $recipeEntry->{RECIPE_COMMENT};
515
            my $comment = $recipeEntry->{RECIPE_COMMENT};
506
            my $prefix =  $recipeEntry->{RECIPE_PREFIX};
516
            my $prefix =  $recipeEntry->{RECIPE_PREFIX};
507
            my $recipe =  $recipeEntry->{RECIPE};
517
            my $recipe =  $recipeEntry->{RECIPE};
508
            my $shell =   $recipeEntry->{SHELL};
518
            my $shell =   $recipeEntry->{SHELL};
-
 
519
            my $sdef =    $recipeEntry->{SDEF};
-
 
520
 
-
 
521
            if ($sdef)
-
 
522
            {
-
 
523
                print "\nifdef $sdef";
-
 
524
            }
-
 
525
 
509
            #
526
            #
510
            #   Print the Recipe runtime comment
527
            #   Print the Recipe runtime comment
511
            #
528
            #
512
            if ( $comment )
529
            if ( $comment )
513
            {
530
            {
Line 523... Line 540...
523
            #   Print the recipe as a shell command
540
            #   Print the recipe as a shell command
524
            #   Bracket the recipes with ( .. ) and place semi colons between lines
541
            #   Bracket the recipes with ( .. ) and place semi colons between lines
525
            #   Use the current recipe prefix
542
            #   Use the current recipe prefix
526
            #
543
            #
527
            print_list ( $prefix . '(', ';\\', $shell, ')');
544
            print_list ( $prefix . '(', ';\\', $shell, ')');
528
        }
-
 
529
 
545
 
-
 
546
            if ($sdef)
-
 
547
            {
-
 
548
                print "\nendif";
-
 
549
            }
-
 
550
        }
530
    }
551
    }
531
 
552
 
532
    print "\n\n";
553
    print "\n\n";
533
 
554
 
534
    #
555
    #