Subversion Repositories DevTools

Rev

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

Rev 5710 Rev 6133
Line 21... Line 21...
21
#
21
#
22
#
22
#
23
#
23
#
24
# Interface     : ReadBuildConfig           - Initialise module
24
# Interface     : ReadBuildConfig           - Initialise module
25
#                 getPlatformParts          - Get a list of Platform parts
25
#                 getPlatformParts          - Get a list of Platform parts
-
 
26
#                 
-
 
27
#                 PackageEntry - Internal class
-
 
28
#                   getUnifiedName
-
 
29
#                   getBase
-
 
30
#                   getName
-
 
31
#                   getVersion
-
 
32
#                   getType
-
 
33
#                   getDir
-
 
34
#                   getLibDirs
-
 
35
#                   getIncDirs
26
#
36
#
27
#......................................................................#
37
#......................................................................#
28
 
38
 
29
require 5.006_001;
39
require 5.006_001;
30
use strict;
40
use strict;
Line 43... Line 53...
43
@EXPORT      = qw(  ReadBuildConfig
53
@EXPORT      = qw(  ReadBuildConfig
44
                    getPlatformParts
54
                    getPlatformParts
45
                    getPackagePaths
55
                    getPackagePaths
46
                    getPackageList
56
                    getPackageList
47
                    getToolInfo
57
                    getToolInfo
-
 
58
                    getAliases
48
                );
59
                );
49
@EXPORT_OK =  qw(   $InterfaceVersion
60
@EXPORT_OK =  qw(   $InterfaceVersion
50
                    $ScmBuildMachType
61
                    $ScmBuildMachType
51
                    $ScmInterfaceVersion
62
                    $ScmInterfaceVersion
52
                    $ScmBuildName
63
                    $ScmBuildName
Line 213... Line 224...
213
        }
224
        }
214
    }
225
    }
215
}
226
}
216
 
227
 
217
#-------------------------------------------------------------------------------
228
#-------------------------------------------------------------------------------
-
 
229
# Function        : getAliases 
-
 
230
#
-
 
231
# Description     : Return a list of aliases for the current platform
-
 
232
#
-
 
233
# Inputs          : 
-
 
234
#
-
 
235
# Returns         : A list of aliases
-
 
236
#
-
 
237
sub getAliases
-
 
238
{
-
 
239
    Error ("BuildConfig:getAliases. Not initialised") unless ( $platform );
-
 
240
    #
-
 
241
    #   Determine the aliases for this target
-
 
242
    #       The alias list includes the actual target too
-
 
243
    #
-
 
244
    my @AliasList;
-
 
245
    push @AliasList, $platform;
-
 
246
 
-
 
247
    if ( exists( $BUILDINFO{$platform}{'ALIAS'} ))
-
 
248
    {
-
 
249
        push @AliasList, $BUILDINFO{$platform}{'ALIAS'};
-
 
250
    }
-
 
251
 
-
 
252
    if ( exists( $BUILDINFO{$platform}{'USERALIAS'} ))
-
 
253
    {
-
 
254
        push @AliasList, @{$BUILDINFO{$platform}{'USERALIAS'}};
-
 
255
    }
-
 
256
 
-
 
257
    return @AliasList;
-
 
258
}
-
 
259
 
-
 
260
 
-
 
261
#-------------------------------------------------------------------------------
218
# Function        : getPlatformParts
262
# Function        : getPlatformParts
219
#
263
#
220
# Description     : return a list of platform parts
264
# Description     : return a list of platform parts
221
#
265
#
222
# Inputs          : None
266
# Inputs          : None
Line 519... Line 563...
519
        return '';
563
        return '';
520
    }
564
    }
521
}
565
}
522
 
566
 
523
#-------------------------------------------------------------------------------
567
#-------------------------------------------------------------------------------
-
 
568
# Function        : getXxxx 
-
 
569
#
-
 
570
# Description     : Various getters
-
 
571
#
-
 
572
# Inputs          : $self - Reference to the class 
-
 
573
#
-
 
574
# Returns         : Value
-
 
575
#
-
 
576
 
-
 
577
sub getName
-
 
578
{
-
 
579
    my ($self) = @_;
-
 
580
    return $self->{NAME};
-
 
581
}
-
 
582
 
-
 
583
sub getVersion
-
 
584
{
-
 
585
    my ($self) = @_;
-
 
586
    return $self->{VERSION};
-
 
587
}
-
 
588
 
-
 
589
sub getType
-
 
590
{
-
 
591
    my ($self) = @_;
-
 
592
    return $self->{TYPE};
-
 
593
}
-
 
594
 
-
 
595
#
-
 
596
#   Returns the location of the package.
-
 
597
#       This will be a ref into the package store
-
 
598
#       Used only if access to dpkg_archive is needed
-
 
599
#       Only useful if TYPE is build or link
-
 
600
#
-
 
601
sub getDir
-
 
602
{
-
 
603
    my ($self) = @_;
-
 
604
    return $self->{ROOT};
-
 
605
}
-
 
606
 
-
 
607
#-------------------------------------------------------------------------------
524
# Function        : getLibDirs
608
# Function        : getLibDirs
525
#
609
#
526
# Description     : Return an array of library directories
610
# Description     : Return an array of library directories
527
#
611
#
528
# Inputs          : $self                   - Class ref
612
# Inputs          : $self                   - Class ref
529
#                   $type                   - 0 : Relative to base of the package
613
#                   $type                   - 0 : Relative to base of the package
530
#                                             1 : abs to the dpkg_archive package
614
#                                             1 : abs to the dpkg_archive package
531
#                                             2 : abs to the interface
615
#                                             2 : abs to the interface
532
#                                             3: Interface, LinkPkgs
616
#                                             3 : Interface, LinkPkgs
533
#
617
#
534
# Returns         : An array
618
# Returns         : An array
535
#
619
#
536
sub getLibDirs
620
sub getLibDirs
537
{
621
{