Subversion Repositories DevTools

Rev

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

Rev 279 Rev 285
Line 60... Line 60...
60
    MakeLibInit();
60
    MakeLibInit();
61
}
61
}
62
 
62
 
63
sub MakeLibInit
63
sub MakeLibInit
64
{
64
{
65
    my ( $argc );                               # argument count
-
 
66
 
-
 
67
    #.. Test environment
65
    #.. Test environment
68
    #
66
    #
69
    EnvImport( "GBE_BIN" );
67
    EnvImport( "GBE_BIN" );
70
    EnvImport( "GBE_PERL" );
68
    EnvImport( "GBE_PERL" );
71
    EnvImport( "GBE_TOOLS" );
69
    EnvImport( "GBE_TOOLS" );
Line 223... Line 221...
223
    my( $path, $script ) = @_;
221
    my( $path, $script ) = @_;
224
    my( $line );
222
    my( $line );
225
    Error ("Directive 'Defines' not allowed in this context") if ( $::ScmBuildlib  );
223
    Error ("Directive 'Defines' not allowed in this context") if ( $::ScmBuildlib  );
226
 
224
 
227
    $script = Exists( $path, $script, "Defines" );
225
    $script = Exists( $path, $script, "Defines" );
228
    open( SCRIPT, $script ) ||
226
    open( my $fh, '<' ,$script ) ||
229
        Error( "cannot open '$script'" );
227
        Error( "cannot open '$script'" );
230
    while (<SCRIPT>) {
228
    while (<$fh>) {
231
        $_ =~ s/\s*(\n|$)//;                    # kill trailing whitespace & nl
229
        $_ =~ s/\s*(\n|$)//;                    # kill trailing whitespace & nl
232
        push( @::DEFINES, $_ );
230
        push( @::DEFINES, $_ );
233
    }
231
    }
234
    push( @::ScmDepends, "$script" );           # makefile dependencies
232
    push( @::ScmDepends, "$script" );           # makefile dependencies
235
    close( SCRIPT );
233
    close( $fh );
236
}
234
}
237
 
235
 
238
 
236
 
239
sub Rule
237
sub Rule
240
{
238
{
Line 248... Line 246...
248
    Error ("Directive 'Rules' not allowed in this context") if ( $::ScmBuildlib  );
246
    Error ("Directive 'Rules' not allowed in this context") if ( $::ScmBuildlib  );
249
    my( $path, $script ) = @_;
247
    my( $path, $script ) = @_;
250
    my( $line );
248
    my( $line );
251
 
249
 
252
    $script = Exists( $path, $script, "Rules" );
250
    $script = Exists( $path, $script, "Rules" );
253
    open( SCRIPT, $script ) ||
251
    open( my $fh, '<' ,$script ) ||
254
        Error( "cannot open '$script'" );
252
        Error( "cannot open '$script'" );
255
    while (<SCRIPT>) {
253
    while (<$fh>) {
256
        $_ =~ s/\s*(\n|$)//;                    # kill trailing whitespace & nl
254
        $_ =~ s/\s*(\n|$)//;                    # kill trailing whitespace & nl
257
        push( @::RULES, $_ );
255
        push( @::RULES, $_ );
258
    }
256
    }
259
    push( @::ScmDepends, "$script" );           # makefile dependencies
257
    push( @::ScmDepends, "$script" );           # makefile dependencies
260
    close( SCRIPT );
258
    close( $fh );
261
}
259
}
262
 
260
 
263
#-------------------------------------------------------------------------------
261
#-------------------------------------------------------------------------------
264
# Function        : Platform
262
# Function        : Platform
265
#
263
#
Line 287... Line 285...
287
# Returns         :
285
# Returns         :
288
#
286
#
289
sub Platform
287
sub Platform
290
{
288
{
291
    my ( @platforms ) = @_;
289
    my ( @platforms ) = @_;
-
 
290
    my $exitVal;
292
    my ( $dir, $exitVal, $platform );
291
    my $platform;
293
    my $noplatforms = 0;
292
    my $noplatforms = 0;
294
    my $defplatforms = 0;
293
    my $defplatforms = 0;
295
    my %platforms;
294
    my %platforms;
296
 
295
 
297
    Debug( "Platform(@_)" );
296
    Debug( "Platform(@_)" );
Line 335... Line 334...
335
        my( @args );
334
        my( @args );
336
        my( @exclude );
335
        my( @exclude );
337
 
336
 
338
        $targets = $products = 0;
337
        $targets = $products = 0;
339
 
338
 
340
        foreach $_ ( @platforms ) {
339
        foreach ( @platforms ) {
341
            next if ( /^\*$/);
340
            next if ( /^\*$/);
342
            next if ( /^--Targets$/ && ($targets = 1));
341
            next if ( /^--Targets$/ && ($targets = 1));
343
            next if ( /^--Products$/ && ($products = 1));
342
            next if ( /^--Products$/ && ($products = 1));
344
            next if ( /^--NoPlatformBuilds/ && ($noplatforms = 1));
343
            next if ( /^--NoPlatformBuilds/ && ($noplatforms = 1));
345
            next if ( /^--/ && push @args, $_ );
344
            next if ( /^--/ && push @args, $_ );