Subversion Repositories DevTools

Rev

Rev 4814 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4814 Rev 4969
Line 16... Line 16...
16
use strict;
16
use strict;
17
use warnings;
17
use warnings;
18
 
18
 
19
package LINUX_Build;
19
package LINUX_Build;
20
use JatsError;
20
use JatsError;
-
 
21
use Storable qw(dclone);
21
 
22
 
22
#
23
#
23
#   Create a hash of GBE_MACHTYPEs for which the LINUX platform is available
24
#   Create a hash of GBE_MACHTYPEs for which the LINUX platform is available
24
#   It won't just build on any only machine
25
#   It won't just build on any old machine
25
#
26
#
26
#   Hash values are an array of:
27
#   Hash values are an array of:
27
#           Operating System
28
#           Operating System
28
#           architecture
29
#           architecture
29
#
30
#
30
my %valid_machines = (
31
my %valid_machines = (
31
    'linux_i386'             => [ 'LINUX' , 'i386' ],               # Current compiler on 32 bit linux
32
    'linux_i386'             => [ 'LINUX_I386' ],                   # Current compiler on 32 bit linux
32
    'linux_x64'              => [ 'LINUX' ,                         # Current compiler on 64 bit linux
33
    'linux_x64'              => [ 'UBUNTU14',                      # Current compiler on 64 bit linux
33
                                  'UBUNTU14', 
-
 
34
                                  'UBUNTU14_INSTRUMENT' ],    
34
                                  'UBUNTU14_INSTRUMENT' ],    
35
);
35
);
36
 
36
 
37
#-------------------------------------------------------------------------------
37
#-------------------------------------------------------------------------------
38
# Function        : new_platform
38
# Function        : new_platform
Line 64... Line 64...
64
        $pInfo->{NOT_AVAILABLE} = 1;
64
        $pInfo->{NOT_AVAILABLE} = 1;
65
        return;
65
        return;
66
    }
66
    }
67
 
67
 
68
    #
68
    #
69
    #   Request that a simple BuildAlias be created for this platform
-
 
70
    #   Use the original name of the TARGET
69
    #   Instantiate all targets
71
    #
70
    #
-
 
71
    foreach my $target ( @$entry )
-
 
72
    {
72
    $pInfo->{ALIAS} = $pInfo->{TARGET};
73
        LINUX_generic(  dclone($pInfo), $target );
-
 
74
    }
73
 
75
 
74
    #
76
    #
75
    #   Alter the 'TARGET' name
77
    #   All done
-
 
78
    #   Mark the original entry as a TEMPLATE so that it won't be added
76
    #   This is allowed (expected)
79
    #   We have added cloned copies of it
77
    #
80
    #
78
    $pInfo->{TARGET} = uc( $entry->[0] . '_' . $entry->[1] );
81
    $pInfo->{TEMPLATE} = 1;
79
}
82
}
80
 
83
 
81
#-------------------------------------------------------------------------------
84
#-------------------------------------------------------------------------------
82
# Function        : add_platform
85
# Function        : LINUX_generic
83
#
86
#
84
# Description     : This function is invoked just before a 'platform' is about
87
# Description     : Take a clone of the buildinfo structure and specialise it
85
#                   to be added to the build system.
88
#                   for the required target
86
#
89
#
87
#                   This call is allowed to alter or extend the platform build
90
# Inputs          : $pInfo       - A clone of the buildinfo data
88
#                   information.
91
#                   $target      - Name of the target platform
89
#
92
#
-
 
93
# Returns         : Nothing
90
# Inputs          : $pInfo          - Reference to the platform build info hash
94
#                   The buildinfo MUST be added to the build system
91
#
95
#
92
# Returns         : Nothing yet
-
 
93
#
-
 
94
sub add_platform
96
sub LINUX_generic
95
{
97
{
96
    my $class = shift;              # Not really a class, but its called like a class
98
    my ($pInfo, $target) = @_;
97
    my $pInfo  = shift;
99
    Debug("DEVLINUX_generic: $target");
98
 
100
 
99
    #
101
    #
100
    #   Insert data into the class
-
 
101
    #
-
 
102
    #   ALSO_USES
-
 
103
    #   An array of other platforms that may be 'used' by this platform.
102
    #   Request that a simple BuildAlias be created for this platform
104
    #   The process is not recursive
103
    #   Use the original name of the TARGET
105
    #   Similar to the --Uses option in BuildPlatforms()
-
 
106
    #   Will be subject to product expansion.
-
 
107
    #
-
 
108
    #   Intended use: VS2003 can use stuff from WIN32, but only if the
-
 
109
    #                 VS2003 stuff is not available.
-
 
110
#    $pInfo->{ALSO_USES} = [];
-
 
111
 
-
 
112
    #
-
 
113
    #   EXTRA_USES
-
 
114
    #   An array of other platforms to be 'used' by this platform.
-
 
115
    #   This list is not expanded in a PRODUCT as the USERS list is.
-
 
116
    #
-
 
117
    #   Intended use: Extend the SOLARIS on a sparc platform to allow for bad usage.
-
 
118
    #                 ie: Stuff is in SOLARIS, SOLARIS_sparc and sparc
-
 
119
    #
104
    #
120
    $pInfo->{EXTRA_USES} = ['LINUX'];
105
    $pInfo->{ALIAS} = $pInfo->{TARGET};
121
 
106
 
-
 
107
#    #
-
 
108
#    #   Specify the hardware family
-
 
109
#    #   Will be used to create an ALIAS
-
 
110
#    #
-
 
111
#    $pInfo->{HARDWARE} = uc($arch);
-
 
112
    
122
    #
113
    #
123
    #   EXT_SHARED
-
 
124
    #   Set to the value of the shared library extension
-
 
125
    #
-
 
126
    #   Intended Use
114
    #   Alter the 'TARGET' name
127
    #   Used to locate shared libraries in packgages for use in the
-
 
128
    #   generation set_<PLATFORM>.sh/.bat
115
    #   This is allowed (expected)
129
    #
-
 
130
    #   If not set then the set_.sh files will no be created
-
 
131
    #
116
    #
132
    $pInfo->{EXT_SHARED} = '.so';
117
    $pInfo->{TARGET} = uc($target);
133
 
118
 
134
    #
119
    #
135
    #   OS_COMMON
-
 
136
    #   Set the name of a directory to be used to package header files to be
120
    #   Register this 'new' buildinfo entry with the build system
137
    #   used on targets that share a common OS
-
 
138
    #
-
 
139
    #   Note: Should also be a part of EXTRA_USES
-
 
140
    #
121
    #
141
    #   Intended Use
-
 
142
    #   Extend the operation of the PackageHdr directive to allow files
-
 
143
    #   common files to be packaged
122
    ::AddBuildPlatformEntry( $pInfo );
144
    #
-
 
145
    $pInfo->{OS_COMMON} = 'LINUX';
-
 
146
}
123
}
147
    
124
 
148
1;
125
1;
149
 
126