Subversion Repositories DevTools

Rev

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

Rev 7308 Rev 7309
Line 68... Line 68...
68
our @BUILDSETENV            = ();               # BuildSetenv()
68
our @BUILDSETENV            = ();               # BuildSetenv()
69
our $BUILDINTERFACE         = "";               # BuildInterface()
69
our $BUILDINTERFACE         = "";               # BuildInterface()
70
our $BUILDLOCAL             = "";               # BuildInterface()
70
our $BUILDLOCAL             = "";               # BuildInterface()
71
our $BUILDDIRTREE           = "";               # BuildDirTree()
71
our $BUILDDIRTREE           = "";               # BuildDirTree()
72
our @BUILD_BADNAME          = ();               # Unknown platforms
72
our @BUILD_BADNAME          = ();               # Unknown platforms
73
our @GENERIC_TARGETS        = ();               # Generic targets - only one allowed    
73
our @GENERIC_TARGETS        = ();               # Generic targets - only one allowed
-
 
74
our %BUILDERINFO            = ();               # Complete build info
74
 
75
 
75
our $BUILDNAME              = "";               # BuildName()
76
our $BUILDNAME              = "";               # BuildName()
76
our $BUILDVERSION           = "";               # BuildName()
77
our $BUILDVERSION           = "";               # BuildName()
77
our $BUILDNAME_PACKAGE;                         # Name
78
our $BUILDNAME_PACKAGE;                         # Name
78
our $BUILDNAME_VERSION;                         # Version
79
our $BUILDNAME_VERSION;                         # Version
Line 881... Line 882...
881
    #
882
    #
882
    AddBuildPlatformEntry (\%buildentry )
883
    AddBuildPlatformEntry (\%buildentry )
883
        unless ( $buildentry{TEMPLATE} );
884
        unless ( $buildentry{TEMPLATE} );
884
}
885
}
885
 
886
 
-
 
887
END {
-
 
888
    DebugDumpData("BUILDERINFO", \%BUILDERINFO);
-
 
889
    }
886
 
890
 
887
#-------------------------------------------------------------------------------
891
#-------------------------------------------------------------------------------
888
# Function        : AddBuildPlatformEntry
892
# Function        : AddBuildPlatformEntry
889
#
893
#
890
# Description     : Internal routine to add a Build Entry into the build system
894
# Description     : Internal routine to add a Build Entry into the build system
Line 911... Line 915...
911
    #   If it does exist then it can extend build-time information
915
    #   If it does exist then it can extend build-time information
912
    #
916
    #
913
    my $target = $pInfo->{TARGET};
917
    my $target = $pInfo->{TARGET};
914
 
918
 
915
    #
919
    #
916
    #   Yukky Kludge
-
 
917
    #   JATS has a mechanism whereby packages can create new platforms
-
 
918
    #   Luckily this has only been done for LMOS - don't every do it again
-
 
919
    #   One problem is that we can't validate the target name at this point
-
 
920
    #   in time: as the packages are loaded much later.
-
 
921
    #
-
 
922
    #   Kludge. Assume that a leading LMOS_ can be removed when determing
-
 
923
    #           validity of the target platform.
-
 
924
    #
-
 
925
    my $base_target = $target;
-
 
926
    $base_target =~ s~^LMOS_~~;
-
 
927
 
-
 
928
    #
-
 
929
    #   Detect GENERIC targets
920
    #   Detect GENERIC targets
930
    #       The Build file is only allowed to have one that can be built on any one machine
921
    #       The Build file is only allowed to have one that can be built on any one machine
931
    #
922
    #
932
    my $buildAvailability = PlatformConfig::targetHasTag( $base_target, 'KNOWN' );
923
    my $buildAvailability = PlatformConfig::targetHasTag( $target, 'MACHTYPE' );
933
    if (PlatformConfig::targetHasTag( $base_target, 'GENERIC' ) )
924
    if (PlatformConfig::targetHasTag( $target, 'GENERIC' ) )
934
    {
925
    {
935
        UniquePush (\@GENERIC_TARGETS, $target );
926
        UniquePush (\@GENERIC_TARGETS, $target );
936
    }
927
    }
937
 
928
 
938
    #
929
    #
939
    #   Detect GENERIC_<machType> targets
930
    #   Detect GENERIC_<machType> targets
940
    #
931
    #
941
    if (PlatformConfig::targetHasTag( $base_target, 'GENERIC_MACHTYPE' ) )
932
    if (PlatformConfig::targetHasTag( $target, 'GENERIC_MACHTYPE' ) )
942
    {
933
    {
943
        $pInfo->{IS_GENERIC} = 1;
934
        $pInfo->{IS_GENERIC} = 1;
944
        $pInfo->{ALIAS} = 'GENERIC';
935
        $pInfo->{ALIAS} = 'GENERIC';
945
        $pInfo->{NOT_AVAILABLE} = 1 unless needToolset();
936
        $pInfo->{NOT_AVAILABLE} = 1 unless needToolset();
946
        $All = 1;
937
        $All = 1;
Line 949... Line 940...
949
    #
940
    #
950
    #   Ensure target is known to JATS
941
    #   Ensure target is known to JATS
951
    #   Remove unknown targets from the build. Create a list of unknown
942
    #   Remove unknown targets from the build. Create a list of unknown
952
    #   targets and report them later.
943
    #   targets and report them later.
953
    #
944
    #
954
    #   If there are signs that the target has been processed, then it may be
-
 
955
    #   an alias that has not been expanded.
-
 
956
    #
-
 
957
    #   One result will be that alias platforms, such as DEVLINUX, that don't
-
 
958
    #   expand on WIN32 will be shown as DEVLINUX and not its components.
-
 
959
    #
-
 
960
    unless ( $pInfo->{NOT_AVAILABLE} || exists $BUILDINFO{$target} || $pInfo->{IS_GENERIC} || ($base_target =~ m~^GENERIC_~) )
945
    unless ( $pInfo->{NOT_AVAILABLE} || exists $BUILDINFO{$target} || $pInfo->{IS_GENERIC} || ($target =~ m~^GENERIC_~) )
961
    {
946
    {
-
 
947
        my $base_target = PlatformConfig::targetHasTag( $target, 'BASE_TARGET' ) || $target;
962
        unless ( Exists( "$::GBE_CONFIG/PLATFORM", $base_target  ) )
948
        unless ( Exists( "$::GBE_CONFIG/PLATFORM", $base_target  ) )
963
        {
949
        {
964
            UniquePush (\@BUILD_BADNAME, $target ); 
950
            UniquePush (\@BUILD_BADNAME, $target ); 
965
            $pInfo->{NOT_AVAILABLE} = 1;
951
            $pInfo->{NOT_AVAILABLE} = 1;
966
        }
952
        }
967
    }
953
    }
968
 
954
 
-
 
955
    if ($buildAvailability)
-
 
956
    {
-
 
957
        $BUILDERINFO{$target}{$buildAvailability} = 1;
-
 
958
         $pInfo->{NOT_AVAILABLE} = 1 unless ($buildAvailability eq $::GBE_MACHTYPE)
-
 
959
    }
-
 
960
 
969
    #
961
    #
970
    #   Mark as NOT_AVAILABLE platforms that are not available on this machine
962
    #   Mark as NOT_AVAILABLE platforms that are not available on this machine
971
    #
963
    #
972
    unless ($pInfo->{NOT_AVAILABLE} )
964
    unless ($pInfo->{NOT_AVAILABLE} )
973
    {
965
    {
974
        $pInfo->{NOT_AVAILABLE} = 1
966
        $pInfo->{NOT_AVAILABLE} = 1
975
            if ($buildAvailability == 0 )
967
            unless ($buildAvailability);
976
    }
968
    }
977
 
969
 
978
    unless ($pInfo->{NOT_AVAILABLE} )
970
    unless ($pInfo->{NOT_AVAILABLE} )
979
    {
971
    {
980
        my $target_cfg = $pInfo->{TARGET_CFG} || $target;
972
        my $target_cfg = $pInfo->{TARGET_CFG} || $target;
Line 3346... Line 3338...
3346
    Process_TargetAlias();
3338
    Process_TargetAlias();
3347
 
3339
 
3348
    #
3340
    #
3349
    #   Calculate defined aliases
3341
    #   Calculate defined aliases
3350
    #       Limit the Aliases to active platforms
3342
    #       Limit the Aliases to active platforms
3351
    #       Another LMOS kudge. LMOS targets pick up alias from their base target
-
 
3352
    #       ie: NATIVE INSTRUMENT PKG_WIN PKG_RPM PKG_DEB SK
3343
    #       ie: NATIVE INSTRUMENT PKG_WIN PKG_RPM PKG_DEB SK
3353
    #
3344
    #
3354
    foreach my $alias ( @PlatformConfig::BuildAliases )
3345
    foreach my $alias ( @PlatformConfig::BuildAliases )
3355
    {
3346
    {
3356
        if (exists $BUILDALIAS{$alias}) 
3347
        if (exists $BUILDALIAS{$alias}) 
Line 3360... Line 3351...
3360
        }
3351
        }
3361
        else
3352
        else
3362
        {
3353
        {
3363
            my %activePlatformMap;
3354
            my %activePlatformMap;
3364
            foreach my $item (@BUILD_ACTIVEPLATFORMS) {
3355
            foreach my $item (@BUILD_ACTIVEPLATFORMS) {
3365
                if ($item =~ m~^LMOS_(.*)~) {
-
 
3366
                    $activePlatformMap{$1} = $item;
-
 
3367
                } else {
-
 
3368
                    $activePlatformMap{$item} = $item;
3356
                    $activePlatformMap{$item} = $item;
3369
                }
-
 
3370
            }
3357
            }
3371
            
3358
            
3372
            my @activeAliases;
3359
            my @activeAliases;
3373
            foreach my $item (PlatformConfig::getTargetsByTag($alias))
3360
            foreach my $item (PlatformConfig::getTargetsByTag($alias)) {
3374
            {
-
 
3375
                push (@activeAliases, $activePlatformMap{$item}) if exists($activePlatformMap{$item});
3361
                push (@activeAliases, $activePlatformMap{$item}) if exists($activePlatformMap{$item});
3376
            }
3362
            }
3377
            $BUILDALIAS{$alias} = join(' ', @activeAliases) if (@activeAliases);
3363
            $BUILDALIAS{$alias} = join(' ', @activeAliases) if (@activeAliases);
3378
 
3364
 
3379
            #
3365
            #