Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
227 dpurdie 1
###############################################################################
2
# Copyright (c) ERG Transit Systems. 1996-2007
3
#
4
# File:         PLATFORM/CSHARP.cfg
5
#
6
# Contents:     CSHARP 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
require 5.6.1;
16
use strict;
17
use warnings;
18
 
19
package CSHARP_Build;
20
use JatsError;
21
 
22
#
23
#   Create a hash of GBE_MACHTYPEs for which the CSHARP platform is available
24
#   It won't just build on any old machine
25
#
26
my %valid_machines = (
27
    'win32'             => 1,
28
);
29
 
30
#-------------------------------------------------------------------------------
31
# Function        : new_platform
32
#
33
# Description     : Called when a new platform is being created
34
#                   The function can extend the build information
35
#
36
#                   At the moment it simply removes the build from unsuitable
37
#                   machine types.
38
#
39
# Inputs          : $pInfo          - Reference to the platform build info hash
40
#
41
# Returns         : Nothing yet
42
#
43
 
44
sub new_platform
45
{
46
    my $class = shift;              # Not really a class, but its called like a class
47
    my $pInfo = shift;
48
 
49
    #
50
    #   Ignore this platform if there is no way that it can be built on the
51
    #   current machine.
52
    #
53
    my $entry = $valid_machines{$::GBE_MACHTYPE};
54
    unless ( $entry )
55
    {
56
        Verbose ("CSHARP will not build on this machine type: $::GBE_MACHTYPE");
57
        $pInfo->{NOT_AVAILABLE} = 1;
58
        return;
59
    }
60
}
61
 
62
#-------------------------------------------------------------------------------
63
# Function        : add_platform
64
#
65
# Description     : This function is invoked just before a 'platform' is about
66
#                   to be added to the build system.
67
#
68
#                   This call is allowed to alter or extend the platform build
69
#                   information.
70
#
71
# Inputs          : $pInfo          - Reference to the platform build info hash
72
#
73
# Returns         : Nothing yet
74
#
75
sub add_platform
76
{
77
    my $class = shift;              # Not really a class, but its called like a class
78
    my $pInfo = shift;
79
 
80
    #   ALSO_USES
81
    #   An array of other platforms that may be 'used' by this platform.
82
    #   The process is not recursive
83
    #   Similar to the --Uses option in BuildPlatforms()
84
    #   Will be subject to product expansion.
85
    #
86
    #   Intended use: CSHARP can use stuff from WIN32, but only if the
87
    #                 CSHARP stuff is not available.
88
    $pInfo->{ALSO_USES} = ['WIN32'];
89
 
90
    #
91
    #   EXT_SHARED
92
    #   Set to the value of the shared library extension
93
    #
94
    #   Intended Use
95
    #   Used to locate shared libraries in packgages for use in the
96
    #   generation set_<PLATFORM>.sh/.bat
97
    #
98
    #   If not set then the set_.sh files will no be created
99
    #
100
    $pInfo->{EXT_SHARED} = '.dll';
101
 
102
    #
103
    #   OS_COMMON
104
    #   Set the name of a directory to be used to package header files to be
105
    #   used on targets that share a common OS
106
    #
107
    #   Note: Should also be a part of EXTRA_USES
108
    #
109
    #   Intended Use
110
    #   Extend the operation of the PackageHdr directive to allow files
111
    #   common files to be packaged
112
    #
113
    $pInfo->{OS_COMMON} = 'WIN32';
114
}
115
 
116
1;
117