Subversion Repositories DevTools

Rev

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

Rev 321 Rev 325
Line 7769... Line 7769...
7769
#                       AliasName
7769
#                       AliasName
7770
#                       TargetName,--Target
7770
#                       TargetName,--Target
7771
#                       --Project=ProjectName
7771
#                       --Project=ProjectName
7772
#                       --Defined=SomeValue
7772
#                       --Defined=SomeValue
7773
#                       --MachType=SomeValue
7773
#                       --MachType=SomeValue
-
 
7774
#                   Special markers (Must be True)
-
 
7775
#                       (!)++Project=ProjectName
-
 
7776
#                       (!)++Defined=SomeValue
-
 
7777
#                       (!)++MachType=SomeValue
7774
#
7778
#
7775
#                   Each can be prefxied with a '!' to negate the test
7779
#                   Each can be prefxied with a '!' to negate the test
7776
#
7780
#
7777
#                   Valid options are:
7781
#                   Valid options are:
7778
#                       --Target        - indicates that the platform is a 'target'
7782
#                       --Target        - indicates that the platform is a 'target'
Line 7795... Line 7799...
7795
    {
7799
    {
7796
        Debug3( " ActivePlatform(@_) = TRUE" );
7800
        Debug3( " ActivePlatform(@_) = TRUE" );
7797
        return 1;
7801
        return 1;
7798
    }
7802
    }
7799
 
7803
 
7800
 
-
 
7801
    #
7804
    #
7802
    #   Platform specifier may be a comma seperated list
7805
    #   Platform specifier may be a comma seperated list
7803
    #   ie:  WIN32,MOS,XXX
7806
    #   ie:  WIN32,MOS,XXX
7804
    #   Extract non-platform arguments
7807
    #   Extract non-platform arguments
7805
    #   Process to yield a dummy platform of '0' or '1' - these will be seen later
7808
    #   Process to yield a dummy platform of '0' or '1' - these will be seen later
7806
    #
7809
    #
7807
    foreach ( split( '\s*,\s*', $platform_spec ) )
7810
    foreach ( split( '\s*,\s*', $platform_spec ) )
7808
    {
7811
    {
7809
        if ( m~^(!?)--Project=(.+)~ ) {
7812
        my ($result, $mode, $not);
7810
            my $result = ActiveProject( $2);
7813
        if ( m~^(!?)(--|\+\+)Project=(.+)~ ) {
7811
            $result = $result ? 1 : 0;
7814
            $not = $1;
7812
            push @plist, "$1$result";
7815
            $mode = $2;
7813
            next;
7816
            $result = ActiveProject($3);
7814
 
7817
 
7815
        } elsif ( m~^(!?)--Defined=(.+)~ ) {
7818
        } elsif ( m~^(!?)(--|\+\+)Defined=(.+)~ ) {
-
 
7819
            $not = $1;
-
 
7820
            $mode = $2;
7816
            my $result = 0;
7821
            $result = 0;
7817
            no strict 'refs';
7822
            no strict 'refs';
7818
            $result = 1 if ( defined( $$2 ) || defined( @$2 ) );
7823
            $result = 1 if ( defined( $$3 ) || defined( @$3 ) );
7819
            use strict 'refs';
7824
            use strict 'refs';
7820
 
7825
 
7821
            $result = $result ? 1 : 0;
7826
        } elsif ( m~^(!?)(--|\+\+)MachType=(.+)~ ) {
7822
            push @plist, "$1$result";
7827
            $not = $1;
7823
            next;
7828
            $mode = $2;
7824
 
-
 
7825
        } elsif ( m~^(!?)--MachType=(.+)~ ) {
7829
            $result = ( uc($3) eq uc($::GBE_MACHTYPE) );
-
 
7830
        } else {
-
 
7831
            #
7826
            my $result = ( uc($2) eq uc($::GBE_MACHTYPE) );
7832
            #   Must be a platform argument
7827
            $result = $result ? 1 : 0;
7833
            #   Add to a list
-
 
7834
            #
7828
            push @plist, "$1$result";
7835
            push @platforms, $_;
7829
            next;
7836
            next;
7830
        }
7837
        }
7831
 
7838
 
7832
        #
7839
        #
7833
        #   Must be a platform argument
7840
        #   Continue processing non-platform arguments
-
 
7841
        #   If an ++ prefix, then its an AND operation so we can
7834
        #   Add to a list
7842
        #   terminate now if its not satisfied
7835
        #
7843
        #
-
 
7844
        $result = $result ? 1 : 0;
-
 
7845
        if ( $mode eq '++' ) {
-
 
7846
            $result = ! $result if ( $not );
-
 
7847
            return 0 unless ( $result );
-
 
7848
        } else {
7836
        push @platforms, $_;
7849
            push @plist, "$not$result";
-
 
7850
        }
7837
    }
7851
    }
7838
 
7852
 
7839
    #   Platform specified may be an Alias
7853
    #   Platform specified may be an Alias
7840
    #   Perform alias expansion
7854
    #   Perform alias expansion
7841
    #
7855
    #
7842
    @platforms = ExpandPlatforms( @platforms );         # aliasing
7856
    @platforms = ExpandPlatforms( @platforms );         # aliasing
7843
    Debug3( " ActivePlatform(@_)" );
7857
    Debug3( " ActivePlatform(@_)" );
-
 
7858
#    Debug0( " Platforms(@platforms)", "PLIST(@plist)" );
7844
 
7859
 
7845
#.. Arguments
7860
#.. Arguments
7846
#   At this point we have a list of platforms and arguments
7861
#   At this point we have a list of platforms and arguments
7847
#   Build up a hash of arguments for each platform being parsed
7862
#   Build up a hash of arguments for each platform being parsed
7848
#   Multiple arguments can follow a platform name
7863
#   Multiple arguments can follow a platform name
Line 7872... Line 7887...
7872
    }
7887
    }
7873
 
7888
 
7874
#.. Scan the expression
7889
#.. Scan the expression
7875
#
7890
#
7876
    $scmplatform = uc( $ScmPlatform );          # current platform
7891
    $scmplatform = uc( $ScmPlatform );          # current platform
-
 
7892
 
7877
    foreach ( @plist )
7893
    foreach ( @plist )
7878
    {
7894
    {
7879
        $platform = uc( Trim( $_ ) );           # trim white and convert case
7895
        $platform = uc( Trim( $_ ) );           # trim white and convert case
7880
 
7896
 
7881
        #
7897
        #