Subversion Repositories DevTools

Rev

Rev 7310 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7310 Rev 7320
Line 55... Line 55...
55
                    getPackagePaths
55
                    getPackagePaths
56
                    getPackageList
56
                    getPackageList
57
                    getToolInfo
57
                    getToolInfo
58
                    testToolInfo
58
                    testToolInfo
59
                    getAliases
59
                    getAliases
-
 
60
                    isGenericBuild
60
                );
61
                );
61
@EXPORT_OK =  qw(   $InterfaceVersion
62
@EXPORT_OK =  qw(   $InterfaceVersion
62
                    $ScmBuildMachType
63
                    $ScmBuildMachType
63
                    $ScmInterfaceVersion
64
                    $ScmInterfaceVersion
64
                    $ScmBuildName
65
                    $ScmBuildName
Line 114... Line 115...
114
our %BUILDINFO;
115
our %BUILDINFO;
115
our %BUILDPLATFORM_PARTS;
116
our %BUILDPLATFORM_PARTS;
116
our $ScmInterfaceVersion;
117
our $ScmInterfaceVersion;
117
our %ScmBuildPkgRules;
118
our %ScmBuildPkgRules;
118
our $ScmBuildMachType;
119
our $ScmBuildMachType;
-
 
120
our %ScmBuildMatrix; 
119
 
121
 
120
#-------------------------------------------------------------------------------
122
#-------------------------------------------------------------------------------
121
# Function        : ReadBuildConfig
123
# Function        : ReadBuildConfig
122
#
124
#
123
# Description     : Read in the build config information
125
# Description     : Read in the build config information
124
#                   Read in build.cfg
126
#                   Read in build.cfg
125
#
127
#
126
# Inputs          : $interface              - Path to the interface directory
128
# Inputs          : $interface              - Path to the interface directory
127
#                   $platform               - Platform being processed
129
#                   $platform               - Platform being processed
128
#
130
#
129
# Returns         : Nothing
131
# Returns         : True - data has been loaded
130
#
132
#
131
sub ReadBuildConfig
133
sub ReadBuildConfig
132
{
134
{
133
    $interface = shift;
135
    $interface = shift;
134
    $platform = shift;
136
    $platform = shift;
135
 
137
 
136
    my $no_test;
138
    my $no_test;
-
 
139
    my $no_error;
137
    foreach  ( @_ )
140
    foreach  ( @_ )
138
    {
141
    {
139
        if ( m/^--NoTest/i ) {
142
        if ( m/^--NoTest/i ) {
140
            $no_test = 1;
143
            $no_test = 1;
-
 
144
        } elsif ( m/^--NoError/i ) {
-
 
145
             $no_error = 1;
141
        } else {
146
        } else {
142
            Warning ("ReadBuildConfig, Unknown option: $_");
147
            Warning ("ReadBuildConfig, Unknown option: $_");
143
        }
148
        }
144
    }
149
    }
145
 
150
 
-
 
151
    unless ($interface) {
-
 
152
        WarnError (!$no_error, "ReadBuildConfig. Interface directory is not defined");
-
 
153
        return 0;
-
 
154
    }
-
 
155
 
146
    Debug("BuildConfig::Reading config, $interface");
156
    Debug("BuildConfig::Reading config, $interface");
147
    my $cfgfile = "$interface/build.cfg";
157
    my $cfgfile = "$interface/build.cfg";
-
 
158
    unless ( -f $cfgfile ) {
148
    Error ("JATS internal file missing. Rebuild required",
159
        WarnError (!$no_error, "JATS internal file missing. Rebuild required",
149
           "BuildConfig: Cannot find file: $cfgfile" ) unless ( -f $cfgfile );
160
                                "BuildConfig: Cannot find file: $cfgfile" ) ;
-
 
161
        return 0;
-
 
162
    }
150
 
163
 
151
    #
164
    #
152
    #   Include the build.cfg data
165
    #   Include the build.cfg data
153
    #
166
    #
154
    require ( $cfgfile );
167
    require ( $cfgfile );
Line 162... Line 175...
162
    #
175
    #
163
    $ScmInterfaceVersion = '1.0' unless ( $ScmInterfaceVersion );
176
    $ScmInterfaceVersion = '1.0' unless ( $ScmInterfaceVersion );
164
    Debug ("ReadBuildConfig: Version: $ScmInterfaceVersion, Need: $InterfaceVersion");
177
    Debug ("ReadBuildConfig: Version: $ScmInterfaceVersion, Need: $InterfaceVersion");
165
    if ( int($ScmInterfaceVersion) != int($InterfaceVersion)  )
178
    if ( int($ScmInterfaceVersion) != int($InterfaceVersion)  )
166
    {
179
    {
167
        Error ("JATS interface files are not compatible with this version of JATS",
180
        WarnError (!$no_error, "JATS interface files are not compatible with this version of JATS",
168
               "Rebuild required.",
181
               "Rebuild required.",
169
               "Current Interface Version: $ScmInterfaceVersion",
182
               "Current Interface Version: $ScmInterfaceVersion",
170
               "JATS Interface Version   : $InterfaceVersion" );
183
               "JATS Interface Version   : $InterfaceVersion" );
-
 
184
        return 0;
171
    }
185
    }
172
 
186
 
173
    #
187
    #
174
    #   Ensure that this config file is designed for this machine type
188
    #   Ensure that this config file is designed for this machine type
175
    #   At make-time this test may not be valid. It should have been
189
    #   At make-time this test may not be valid. It should have been
Line 224... Line 238...
224
        foreach my $key (keys %::ScmBuildPlatforms) {
238
        foreach my $key (keys %::ScmBuildPlatforms) {
225
            my( @args ) = split( /$;/, $::ScmBuildPlatforms{ $key } );
239
            my( @args ) = split( /$;/, $::ScmBuildPlatforms{ $key } );
226
            Debug( " $key\t= @args" );
240
            Debug( " $key\t= @args" );
227
        }
241
        }
228
    }
242
    }
-
 
243
 
-
 
244
    return 1;
-
 
245
}
-
 
246
 
-
 
247
#-------------------------------------------------------------------------------
-
 
248
# Function        : isGenericBuild 
-
 
249
#
-
 
250
# Description     : Determine if this is a 'GENERIC' build
-
 
251
#                   ie: can be built on ANY build machine
-
 
252
#
-
 
253
# Inputs          : 
-
 
254
#
-
 
255
# Returns         : TRUE - Is generic
-
 
256
#
-
 
257
sub isGenericBuild
-
 
258
{
-
 
259
    return exists $ScmBuildMatrix{'GENERIC'} ? 1 : 0;
229
}
260
}
230
 
261
 
231
#-------------------------------------------------------------------------------
262
#-------------------------------------------------------------------------------
232
# Function        : getAliases 
263
# Function        : getAliases 
233
#
264
#