Subversion Repositories DevTools

Rev

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

Rev 6142 Rev 6177
Line 1... Line 1...
1
########################################################################
1
########################################################################
2
# Copyright (c) VIX TECHNOLOGY (AUST) LTD
2
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
3
#
3
#
4
# Module name   : buildlib.pl
4
# Module name   : buildlib.pl
5
# Module type   : Makefile system
5
# Module type   : Makefile system
6
# Compiler(s)   : Perl
6
# Compiler(s)   : Perl
7
# Environment(s): jats
7
# Environment(s): jats
Line 95... Line 95...
95
our $InterfaceVersion;                          # Interface directory format version
95
our $InterfaceVersion;                          # Interface directory format version
96
our $ScmRoot;                                   # Package Root
96
our $ScmRoot;                                   # Package Root
97
our $ScmInterface;                              # Interface directory
97
our $ScmInterface;                              # Interface directory
98
our $ScmBuildFilter;                            # Build Filter when build was created
98
our $ScmBuildFilter;                            # Build Filter when build was created
99
our $NoBuild                = 0;                # Dummy Build under ABT only
99
our $NoBuild                = 0;                # Dummy Build under ABT only
100
 
-
 
-
 
100
our $BUILD_UUID             = time() . substr(rand(),2); # Build Unique Identifier
101
 
101
 
102
my  $DeleteDPACKAGE         = 0;                # Must clobber DPACKAGE
102
my  $DeleteDPACKAGE         = 0;                # Must clobber DPACKAGE
103
my  $build_source_pkg       = 0;                # Flag to build source package
103
my  $build_source_pkg       = 0;                # Flag to build source package
104
my  $opt_help               = 0;
104
my  $opt_help               = 0;
105
my  $sandbox_exact          = 0;                # Exact or in-exact sandbox
105
my  $sandbox_exact          = 0;                # Exact or in-exact sandbox
Line 344... Line 344...
344
# Returns         : Reserved word or none
344
# Returns         : Reserved word or none
345
#
345
#
346
sub isKeyword
346
sub isKeyword
347
{
347
{
348
    my ($test) = @_;
348
    my ($test) = @_;
349
    foreach my $keyword ( qw (NATIVE TOOLSET GENERIC INSTRUMENT))
349
    foreach my $keyword ( qw (NATIVE TOOLSET GENERIC INSTRUMENT PKG_DEB PKG_RPM PRG_WIN))
350
    {
350
    {
351
        return $keyword if (uc($test) eq $keyword);
351
        return $keyword if (uc($test) eq $keyword);
352
    }
352
    }
353
 
353
 
354
    return undef;
354
    return undef;
Line 3156... Line 3156...
3156
    Process_TargetAlias();
3156
    Process_TargetAlias();
3157
 
3157
 
3158
    #
3158
    #
3159
    #   Calculate NATIVE and INSTRUMENT alias
3159
    #   Calculate NATIVE and INSTRUMENT alias
3160
    #       Limit the Aliases to active platforms
3160
    #       Limit the Aliases to active platforms
-
 
3161
    #       Another LMOS kudge. LMOS targets pick up alias from their base target
3161
    #
3162
    #
3162
    foreach my $alias (qw( NATIVE INSTRUMENT))
3163
    foreach my $alias (qw( NATIVE INSTRUMENT PKG_WIN PKG_RPM PKG_DEB))
3163
    {
3164
    {
3164
        if (exists $BUILDALIAS{$alias})
3165
        if (exists $BUILDALIAS{$alias})
3165
        {
3166
        {
3166
            Warning("User has manually specified a $alias alias",'Default alias will not be set.');
3167
            Warning("User has manually specified a $alias alias",'Default alias will not be set.');
3167
        }
3168
        }
3168
        else
3169
        else
3169
        {
3170
        {
-
 
3171
            my %activePlatformMap;
3170
            my %activePlatformMap = map {$_ => 1} @BUILD_ACTIVEPLATFORMS;
3172
            foreach my $item (@BUILD_ACTIVEPLATFORMS) {
-
 
3173
                if ($item =~ m~^LMOS_(.*)~) {
-
 
3174
                    $activePlatformMap{$1} = $item;
-
 
3175
                } else {
-
 
3176
                    $activePlatformMap{$item} = $item;
-
 
3177
                }
-
 
3178
            }
-
 
3179
            
3171
            my @activeAliases;
3180
            my @activeAliases;
3172
            foreach my $item (PlatformConfig::getTargetsByTag($alias))
3181
            foreach my $item (PlatformConfig::getTargetsByTag($alias))
3173
            {
3182
            {
3174
                push (@activeAliases, $item) if exists($activePlatformMap{$item});
3183
                push (@activeAliases, $activePlatformMap{$item}) if exists($activePlatformMap{$item});
3175
            }
3184
            }
3176
            
-
 
3177
            $BUILDALIAS{$alias} = join(' ', @activeAliases) if (@activeAliases);
3185
            $BUILDALIAS{$alias} = join(' ', @activeAliases) if (@activeAliases);
3178
 
3186
 
3179
            #
3187
            #
3180
            #   Add to the build entry too
3188
            #   Add to the build entry too
3181
            #
3189
            #
Line 3183... Line 3191...
3183
            {
3191
            {
3184
                push @{$BUILDINFO{$aliasTarget}{USERALIAS}}, $alias;
3192
                push @{$BUILDINFO{$aliasTarget}{USERALIAS}}, $alias;
3185
            }
3193
            }
3186
        }
3194
        }
3187
    }
3195
    }
3188
    
-
 
3189
    CleanUp_Aliases();
3196
    CleanUp_Aliases();
3190
 
3197
 
3191
    #
3198
    #
3192
    #   Create dummy package to describe the Interface directory
3199
    #   Create dummy package to describe the Interface directory
3193
    #
3200
    #
Line 3964... Line 3971...
3964
\$ScmSrcDir                     = \"$Srcdir\";
3971
\$ScmSrcDir                     = \"$Srcdir\";
3965
\$ScmBuildSrc                   = \"$ScmBuildSrc\";
3972
\$ScmBuildSrc                   = \"$ScmBuildSrc\";
3966
\$ScmExpert                     = \"$Expert\";
3973
\$ScmExpert                     = \"$Expert\";
3967
\$ScmAll                        = \"$All\";
3974
\$ScmAll                        = \"$All\";
3968
\$ScmNoBuild                    = \"$NoBuild\";
3975
\$ScmNoBuild                    = \"$NoBuild\";
-
 
3976
\$ScmBuildUuid                  = \"$BUILD_UUID\";
3969
");
3977
");
3970
 
3978
 
3971
#.. Alias
3979
#.. Alias
3972
#
3980
#
3973
    $fh->DumpData(
3981
    $fh->DumpData(