| 227 |
dpurdie |
1 |
###############################################################################
|
|
|
2 |
# Copyright (c) ERG Transit Systems. 1996-2006
|
|
|
3 |
#
|
|
|
4 |
# File: PLATFORM/LINUX.cfg
|
|
|
5 |
#
|
|
|
6 |
# Contents: SOLARIS 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 |
# Version Who Date Description
|
|
|
15 |
# DDP 01-Aug-06 Created
|
|
|
16 |
###############################################################################
|
|
|
17 |
|
|
|
18 |
use strict;
|
|
|
19 |
use warnings;
|
|
|
20 |
|
|
|
21 |
package LINUX_Build;
|
|
|
22 |
use JatsError;
|
|
|
23 |
|
|
|
24 |
#
|
|
|
25 |
# Create a hash of GBE_MACHTYPEs for which the LINUX platform is available
|
|
|
26 |
# It won't just build on any only machine
|
|
|
27 |
#
|
|
|
28 |
# Hash values are an array of:
|
|
|
29 |
# Operating System
|
|
|
30 |
# architecture
|
|
|
31 |
#
|
|
|
32 |
my %valid_machines = (
|
|
|
33 |
'linux_i386' => [ 'LINUX' , 'i386' ],
|
|
|
34 |
);
|
|
|
35 |
|
|
|
36 |
#-------------------------------------------------------------------------------
|
|
|
37 |
# Function : new_platform
|
|
|
38 |
#
|
|
|
39 |
# Description : Called when a new platform is being created
|
|
|
40 |
# The function can extend the build information
|
|
|
41 |
#
|
|
|
42 |
# The 'LINUX' platform will be converted into a 'suitable'
|
|
|
43 |
# platform for the current machine.
|
|
|
44 |
#
|
|
|
45 |
# Inputs : $pInfo - Reference to the platform build info hash
|
|
|
46 |
#
|
|
|
47 |
# Returns : Nothing yet
|
|
|
48 |
#
|
|
|
49 |
|
|
|
50 |
sub new_platform
|
|
|
51 |
{
|
|
|
52 |
my $class = shift; # Not really a class, but its called like a class
|
|
|
53 |
my $pInfo = shift;
|
|
|
54 |
|
|
|
55 |
#
|
|
|
56 |
# Ignore this platform if there is no way that it can be built on the
|
|
|
57 |
# current machine.
|
|
|
58 |
#
|
|
|
59 |
my $entry = $valid_machines{$::GBE_MACHTYPE};
|
|
|
60 |
unless ( $entry )
|
|
|
61 |
{
|
|
|
62 |
Verbose ("LINUX will not build on this machine type: $::GBE_MACHTYPE");
|
|
|
63 |
$pInfo->{NOT_AVAILABLE} = 1;
|
|
|
64 |
return;
|
|
|
65 |
}
|
|
|
66 |
|
|
|
67 |
#
|
|
|
68 |
# Request that a simple BuildAlias be created for this platform
|
|
|
69 |
# Use the original name of the TARGET
|
|
|
70 |
#
|
|
|
71 |
$pInfo->{ALIAS} = $pInfo->{TARGET};
|
|
|
72 |
|
|
|
73 |
#
|
|
|
74 |
# Alter the 'TARGET' name
|
|
|
75 |
# This is allowed (expected)
|
|
|
76 |
#
|
|
|
77 |
$pInfo->{TARGET} = uc( $entry->[0] . '_' . $entry->[1] );
|
|
|
78 |
}
|
|
|
79 |
|
|
|
80 |
#-------------------------------------------------------------------------------
|
|
|
81 |
# Function : add_platform
|
|
|
82 |
#
|
|
|
83 |
# Description : This function is invoked just before a 'platform' is about
|
|
|
84 |
# to be added to the build system.
|
|
|
85 |
#
|
|
|
86 |
# This call is allowed to alter or extend the platform build
|
|
|
87 |
# information.
|
|
|
88 |
#
|
|
|
89 |
# Inputs : $pInfo - Reference to the platform build info hash
|
|
|
90 |
#
|
|
|
91 |
# Returns : Nothing yet
|
|
|
92 |
#
|
|
|
93 |
sub add_platform
|
|
|
94 |
{
|
|
|
95 |
my $class = shift; # Not really a class, but its called like a class
|
|
|
96 |
my $pInfo = shift;
|
|
|
97 |
|
|
|
98 |
#
|
|
|
99 |
# Insert data into the class
|
|
|
100 |
#
|
|
|
101 |
# ALSO_USES
|
|
|
102 |
# An array of other platforms that may be 'used' by this platform.
|
|
|
103 |
# The process is not recursive
|
|
|
104 |
# Similar to the --Uses option in BuildPlatforms()
|
|
|
105 |
# Will be subject to product expansion.
|
|
|
106 |
#
|
|
|
107 |
# Intended use: VS2003 can use stuff from WIN32, but only if the
|
|
|
108 |
# VS2003 stuff is not available.
|
|
|
109 |
# $pInfo->{ALSO_USES} = [];
|
|
|
110 |
|
|
|
111 |
#
|
|
|
112 |
# EXTRA_USES
|
|
|
113 |
# An array of other platforms to be 'used' by this platform.
|
|
|
114 |
# This list is not expanded in a PRODUCT as the USERS list is.
|
|
|
115 |
#
|
|
|
116 |
# Intended use: Extend the SOLARIS on a sparc platform to allow for bad usage.
|
|
|
117 |
# ie: Stuff is in SOLARIS, SOLARIS_sparc and sparc
|
|
|
118 |
#
|
|
|
119 |
$pInfo->{EXTRA_USES} = ['LINUX'];
|
|
|
120 |
|
|
|
121 |
#
|
|
|
122 |
# EXT_SHARED
|
|
|
123 |
# Set to the value of the shared library extension
|
|
|
124 |
#
|
|
|
125 |
# Intended Use
|
|
|
126 |
# Used to locate shared libraries in packgages for use in the
|
|
|
127 |
# generation set_<PLATFORM>.sh/.bat
|
|
|
128 |
#
|
|
|
129 |
# If not set then the set_.sh files will no be created
|
|
|
130 |
#
|
|
|
131 |
$pInfo->{EXT_SHARED} = '.so';
|
|
|
132 |
|
|
|
133 |
#
|
|
|
134 |
# OS_COMMON
|
|
|
135 |
# Set the name of a directory to be used to package header files to be
|
|
|
136 |
# used on targets that share a common OS
|
|
|
137 |
#
|
|
|
138 |
# Note: Should also be a part of EXTRA_USES
|
|
|
139 |
#
|
|
|
140 |
# Intended Use
|
|
|
141 |
# Extend the operation of the PackageHdr directive to allow files
|
|
|
142 |
# common files to be packaged
|
|
|
143 |
#
|
|
|
144 |
$pInfo->{OS_COMMON} = 'LINUX';
|
|
|
145 |
}
|
|
|
146 |
|
|
|
147 |
1;
|
|
|
148 |
|