Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4309 dpurdie 1
###############################################################################
6177 dpurdie 2
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
4309 dpurdie 3
#
4
# File:         PLATFORM/MSWIN32.cfg
5
#
6
# Contents:     MSWIN32 Build support
7
#
8
#               This package is used during the processing of the build.pl file
9
#               Values provided by this package are used to extend the Platform
10
#               information as platforms are being created. This provides a
11
#               powerful set of mechanism to extend the entire JATS toolset
12
#
13
###############################################################################
14
 
15
use strict;
16
use warnings;
17
 
18
package MSWIN32_Build;
19
use JatsError;
20
use Storable qw(dclone);
21
 
22
#-------------------------------------------------------------------------------
23
# Function        : new_platform
24
#
25
# Description     : Called when a new platform is being created
26
#                   The function can extend the build information
27
#
28
#                   The 'MSWIN32' platform will be converted into a 'suitable'
29
#                   platform for the current machine.
30
#
31
# Inputs          : $pInfo          - Reference to the platform build info hash
32
#
33
# Returns         : Nothing yet
34
#
35
 
36
sub new_platform
37
{
38
    my $class = shift;              # Not really a class, but its called like a class
39
    my $pInfo  = shift;
40
 
41
    #
6133 dpurdie 42
    #   Get the list of targets that have been tagged as MSWIN32
43
    #   
44
    my @targets = PlatformConfig::getTargetsByTag('MSWIN32');
45
    #
4309 dpurdie 46
    #   Ignore this platform if there is no way that it can be built on the
47
    #   current machine.
48
    #
6133 dpurdie 49
    unless ( @targets )
4309 dpurdie 50
    {
51
        Verbose ("MSWIN32 will not build on this machine type: $::GBE_MACHTYPE");
52
        $pInfo->{NOT_AVAILABLE} = 1;
53
        return;
54
    }
55
 
56
    #
57
    #   Instantiate all targets
58
    #
6133 dpurdie 59
    foreach my $target ( @targets )
4309 dpurdie 60
    {
61
        MSWIN32_generic(  dclone($pInfo), $target );
62
    }
63
 
64
    #
65
    #   All done
66
    #   Mark the original entry as a TEMPLATE so that it won't be added
67
    #   We have added cloned copies of it
68
    #
69
    $pInfo->{TEMPLATE} = 1;
70
}
71
 
72
#-------------------------------------------------------------------------------
73
# Function        : MSWIN32_generic
74
#
75
# Description     : Take a clone of the buildinfo structure and specialise it
76
#                   for the required target
77
#
78
# Inputs          : $pInfo       - A clone of the buildinfo data
79
#                   $target      - Name of the target platform
80
#
81
# Returns         : Nothing
82
#                   The buildinfo MUST be added to the build system
83
#
84
sub MSWIN32_generic
85
{
86
    my ($pInfo, $target) = @_;
87
    Debug("MSWIN32_generic: $target");
88
 
89
    #
90
    #   Request that a simple BuildAlias be created for this platform
91
    #   Use the original name of the TARGET
92
    #
93
    $pInfo->{ALIAS} = $pInfo->{TARGET};
94
 
95
    #
96
    #   Alter the 'TARGET' name
97
    #   This is allowed (expected)
98
    #
99
    $pInfo->{TARGET} = uc($target);
100
 
101
    #
102
    #   Register this 'new' buildinfo entry with the build system
103
    #
104
    ::AddBuildPlatformEntry( $pInfo );
105
}
106
 
107
1;
108