Subversion Repositories DevTools

Rev

Rev 3965 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3965 Rev 4018
Line 279... Line 279...
279
#
279
#
280
#   Arrays of hook functions
280
#   Arrays of hook functions
281
#
281
#
282
our %MF_RegisterSrcHooks;                       # Hook source file discovery
282
our %MF_RegisterSrcHooks;                       # Hook source file discovery
283
 
283
 
-
 
284
# Misc
-
 
285
#
-
 
286
my $LastResolved;                               # 0 - No resolved, 1+ resolved
-
 
287
 
284
 
288
 
285
###############################################################################
289
###############################################################################
286
#
290
#
287
#   Packaging and Installation Information
291
#   Packaging and Installation Information
288
#   Held in a structure as its used in a few places
292
#   Held in a structure as its used in a few places
Line 2493... Line 2497...
2493
sub GenerateFiles
2497
sub GenerateFiles
2494
{
2498
{
2495
    my ( $platforms, $tool, @args) = @_;
2499
    my ( $platforms, $tool, @args) = @_;
2496
 
2500
 
2497
    return if ( ! ActivePlatform($platforms) );
2501
    return if ( ! ActivePlatform($platforms) );
2498
 
-
 
2499
    Debug2( "GenerateFiles:($platforms, $tool, @args)" );
2502
    Debug2( "GenerateFiles:($platforms, $tool, @args)" );
2500
 
2503
 
2501
    my @preq_files;
2504
    my @preq_files;
2502
    my $preq_unknown;
2505
    my $preq_unknown;
2503
    my @gen_files;
2506
    my @gen_files;
Line 5105... Line 5108...
5105
    #
5108
    #
5106
    Error ("MakeProject: Project name not defined") unless ( $proj );
5109
    Error ("MakeProject: Project name not defined") unless ( $proj );
5107
 
5110
 
5108
    #
5111
    #
5109
    #   Take the project name and convert it into a full path
5112
    #   Take the project name and convert it into a full path
-
 
5113
    #   Need to have resolved the project file
5110
    #
5114
    #
5111
    my $project = MakeSrcResolve ( $proj );
5115
    my $project = MakeSrcResolve ( $proj );
5112
    $proj = StripDir( $project );
-
 
5113
    Error ("Project File Not found: $project") unless ( -f $project );
5116
    Error ("Project File Not found: $project") unless ( $LastResolved || -f $project );
5114
 
5117
 
-
 
5118
    $proj = StripDir( $project );
5115
    my $basedir = StripFileExt( $project );
5119
    my $basedir = StripFileExt( $project );
5116
 
5120
 
5117
    #
5121
    #
5118
    #   Collect user arguments
5122
    #   Collect user arguments
5119
    #   They are all processed within the toolset
5123
    #   They are all processed within the toolset
Line 5331... Line 5335...
5331
    #
5335
    #
5332
    Error ("MakeAnt: build.xml name not defined") unless ( $proj );
5336
    Error ("MakeAnt: build.xml name not defined") unless ( $proj );
5333
 
5337
 
5334
    #
5338
    #
5335
    #   Take the project name and convert it into a full path
5339
    #   Take the project name and convert it into a full path
-
 
5340
    #   Need to have resolved the project file
5336
    #
5341
    #
5337
    my $project;
-
 
5338
    $project = MakeSrcResolve ( $proj );
5342
    my $project = MakeSrcResolve ( $proj );
5339
    $proj = StripDir( $project );
-
 
5340
    Error ("Build File Not found: $project") unless ( -f $project );
5343
    Error ("Build File Not found: $project") unless ( $LastResolved || -f $project );
5341
 
5344
 
-
 
5345
    $proj = StripDir( $project );
5342
    my $basedir = StripFileExt( $project );
5346
    my $basedir = StripFileExt( $project );
5343
 
5347
 
5344
    #
5348
    #
5345
    #   Collect user arguments
5349
    #   Collect user arguments
5346
    #   They are all processed within the toolset
5350
    #   They are all processed within the toolset
Line 7650... Line 7654...
7650
#
7654
#
7651
sub MakeResolve
7655
sub MakeResolve
7652
{
7656
{
7653
    my( $dirs, $source ) = @_;
7657
    my( $dirs, $source ) = @_;
7654
    my( $first, $count );
7658
    my( $first, $count );
-
 
7659
    $LastResolved = 0;
7655
 
7660
 
7656
    #
7661
    #
7657
    #   If the path contains a '$' then its assumed to be
7662
    #   If the path contains a '$' then its assumed to be
7658
    #   a variable name in the path. Just assume that it exists
7663
    #   a variable name in the path. Just assume that it exists
7659
    #
7664
    #
7660
    return $source if ( $source =~ m#\$# );
7665
    if ( $source =~ m#\$# )
-
 
7666
    {
-
 
7667
 
-
 
7668
        $LastResolved = 3;
-
 
7669
        return $source ;
-
 
7670
    }
7661
 
7671
 
7662
    #
7672
    #
7663
    #   If the path is absolute or contains a leading ., then don't search
7673
    #   If the path is absolute or contains a leading ., then don't search
7664
    #   Warn if it can't be found
7674
    #   Warn if it can't be found
7665
    #
7675
    #
7666
    if ( $source =~ m#^(/|\.)# )
7676
    if ( $source =~ m#^(/|\.)# )
7667
    {
7677
    {
7668
        Warning( "Unable to resolve '$source' path" ) unless -f $source;
7678
        Warning( "Unable to resolve '$source' path" ) unless -f $source;
-
 
7679
        $LastResolved = 0;
7669
        return $source;
7680
        return $source;
7670
    }
7681
    }
7671
 
7682
 
7672
 
7683
 
7673
#.. search local path first
7684
#.. search local path first
Line 7694... Line 7705...
7694
            }
7705
            }
7695
        }
7706
        }
7696
        Debug3( "MakeResolve: $count, $temp" );
7707
        Debug3( "MakeResolve: $count, $temp" );
7697
    }
7708
    }
7698
 
7709
 
-
 
7710
    $LastResolved = 4;
7699
    if ($first eq "") {
7711
    if ($first eq "") {
7700
        $first = $source;
7712
        $first = $source;
7701
        Warning( "Unable to resolve '$source' path" );
7713
        Warning( "Unable to resolve '$source' path" );
-
 
7714
        $LastResolved = 0;
7702
    } else {
7715
    } else {
7703
        Warning( "          using '$first'" )
7716
        Warning( "          using '$first'" )
7704
            if ($count);
7717
            if ($count);
7705
    }
7718
    }
7706
    return $first;
7719
    return $first;
Line 7724... Line 7737...
7724
#
7737
#
7725
sub MakeSrcResolve
7738
sub MakeSrcResolve
7726
{
7739
{
7727
    my ($name) = @_;
7740
    my ($name) = @_;
7728
    my $file;
7741
    my $file;
-
 
7742
    $LastResolved = 0;
7729
 
7743
 
7730
    if ( exists ( $::BUILD_KNOWNFILES{$name} ) ) {
7744
    if ( exists ( $::BUILD_KNOWNFILES{$name} ) ) {
7731
        #
7745
        #
7732
        #   The Known Files list is relative to ScmRoot
7746
        #   The Known Files list is relative to ScmRoot
7733
        #   This must be included in the full path
7747
        #   This must be included in the full path
7734
        #
7748
        #
7735
        $file = $ScmRoot . '/' . $::BUILD_KNOWNFILES{$name};
7749
        $file = $ScmRoot . '/' . $::BUILD_KNOWNFILES{$name};
-
 
7750
        $LastResolved = 2;
7736
 
7751
 
7737
    } elsif ( exists $SRCS{$name} ) {
7752
    } elsif ( exists $SRCS{$name} ) {
7738
        $file = $SRCS{$name};
7753
        $file = $SRCS{$name};
-
 
7754
        $LastResolved = 1;
7739
 
7755
 
7740
    } else {
7756
    } else {
7741
        $file = MakeResolve( \@SRCDIRS, @_ )
7757
        $file = MakeResolve( \@SRCDIRS, @_ )
7742
    }
7758
    }
7743
    return $file;
7759
    return $file;