############################################################################### # Copyright (c) ERG Transit Systems. 1996-2006 # # File: PLATFORM/LINUX.cfg # # Contents: SOLARIS Build support # # This package is used during the processing of the build.pl file # Values provided by this package are used to extend the Platform # information as platforms are being created. This provides a # powerful set of mechanism to extend the entire JATS toolset # # # Version Who Date Description # DDP 01-Aug-06 Created ############################################################################### use strict; use warnings; package LINUX_Build; use JatsError; # # Create a hash of GBE_MACHTYPEs for which the LINUX platform is available # It won't just build on any only machine # # Hash values are an array of: # Operating System # architecture # my %valid_machines = ( 'linux_i386' => [ 'LINUX' , 'i386' ], # Current compiler on 32 bit linux 'linux_x64' => [ 'LINUX' , 'x64' ], # Current compiler on 64 bit linux ); #------------------------------------------------------------------------------- # Function : new_platform # # Description : Called when a new platform is being created # The function can extend the build information # # The 'LINUX' platform will be converted into a 'suitable' # platform for the current machine. # # Inputs : $pInfo - Reference to the platform build info hash # # Returns : Nothing yet # sub new_platform { my $class = shift; # Not really a class, but its called like a class my $pInfo = shift; # # Ignore this platform if there is no way that it can be built on the # current machine. # my $entry = $valid_machines{$::GBE_MACHTYPE}; unless ( $entry ) { Verbose ("LINUX will not build on this machine type: $::GBE_MACHTYPE"); $pInfo->{NOT_AVAILABLE} = 1; return; } # # Request that a simple BuildAlias be created for this platform # Use the original name of the TARGET # $pInfo->{ALIAS} = $pInfo->{TARGET}; # # Alter the 'TARGET' name # This is allowed (expected) # $pInfo->{TARGET} = uc( $entry->[0] . '_' . $entry->[1] ); } #------------------------------------------------------------------------------- # Function : add_platform # # Description : This function is invoked just before a 'platform' is about # to be added to the build system. # # This call is allowed to alter or extend the platform build # information. # # Inputs : $pInfo - Reference to the platform build info hash # # Returns : Nothing yet # sub add_platform { my $class = shift; # Not really a class, but its called like a class my $pInfo = shift; # # Insert data into the class # # ALSO_USES # An array of other platforms that may be 'used' by this platform. # The process is not recursive # Similar to the --Uses option in BuildPlatforms() # Will be subject to product expansion. # # Intended use: VS2003 can use stuff from WIN32, but only if the # VS2003 stuff is not available. # $pInfo->{ALSO_USES} = []; # # EXTRA_USES # An array of other platforms to be 'used' by this platform. # This list is not expanded in a PRODUCT as the USERS list is. # # Intended use: Extend the SOLARIS on a sparc platform to allow for bad usage. # ie: Stuff is in SOLARIS, SOLARIS_sparc and sparc # $pInfo->{EXTRA_USES} = ['LINUX']; # # EXT_SHARED # Set to the value of the shared library extension # # Intended Use # Used to locate shared libraries in packgages for use in the # generation set_.sh/.bat # # If not set then the set_.sh files will no be created # $pInfo->{EXT_SHARED} = '.so'; # # OS_COMMON # Set the name of a directory to be used to package header files to be # used on targets that share a common OS # # Note: Should also be a part of EXTRA_USES # # Intended Use # Extend the operation of the PackageHdr directive to allow files # common files to be packaged # $pInfo->{OS_COMMON} = 'LINUX'; } 1;