Subversion Repositories DevTools

Rev

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

Rev 6511 Rev 7326
Line 127... Line 127...
127
#                   Read in build.cfg
127
#                   Read in build.cfg
128
#
128
#
129
# Inputs          : $interface              - Path to the interface directory
129
# Inputs          : $interface              - Path to the interface directory
130
#                   $platform               - Platform being processed
130
#                   $platform               - Platform being processed
131
#
131
#
132
# Returns         : Nothing
132
# Returns         : True - data has been loaded
133
#
133
#
134
sub ReadBuildConfig
134
sub ReadBuildConfig
135
{
135
{
136
    $interface = shift;
136
    $interface = shift;
137
    $platform = shift;
137
    $platform = shift;
138
 
138
 
139
    my $no_test;
139
    my $no_test;
-
 
140
    my $no_error;
140
    foreach  ( @_ )
141
    foreach  ( @_ )
141
    {
142
    {
142
        if ( m/^--NoTest/i ) {
143
        if ( m/^--NoTest/i ) {
143
            $no_test = 1;
144
            $no_test = 1;
-
 
145
        } elsif ( m/^--NoError/i ) {
-
 
146
             $no_error = 1;
144
        } else {
147
        } else {
145
            Warning ("ReadBuildConfig, Unknown option: $_");
148
            Warning ("ReadBuildConfig, Unknown option: $_");
146
        }
149
        }
147
    }
150
    }
148
 
151
 
-
 
152
    unless ($interface) {
-
 
153
        WarnError (!$no_error, "ReadBuildConfig. Interface directory is not defined");
-
 
154
        return 0;
-
 
155
    }
-
 
156
 
149
    Debug("BuildConfig::Reading config, $interface");
157
    Debug("BuildConfig::Reading config, $interface");
150
    my $cfgfile = "$interface/build.cfg";
158
    my $cfgfile = "$interface/build.cfg";
-
 
159
    unless ( -f $cfgfile ) {
151
    Error ("JATS internal file missing. Rebuild required",
160
        WarnError (!$no_error, "JATS internal file missing. Rebuild required",
152
           "BuildConfig: Cannot find file: $cfgfile" ) unless ( -f $cfgfile );
161
                                "BuildConfig: Cannot find file: $cfgfile" ) ;
-
 
162
        return 0;
-
 
163
    }
153
 
164
 
154
    #
165
    #
155
    #   Include the build.cfg data
166
    #   Include the build.cfg data
156
    #
167
    #
157
    require ( $cfgfile );
168
    require ( $cfgfile );
Line 165... Line 176...
165
    #
176
    #
166
    $ScmInterfaceVersion = '1.0' unless ( $ScmInterfaceVersion );
177
    $ScmInterfaceVersion = '1.0' unless ( $ScmInterfaceVersion );
167
    Debug ("ReadBuildConfig: Version: $ScmInterfaceVersion, Need: $InterfaceVersion");
178
    Debug ("ReadBuildConfig: Version: $ScmInterfaceVersion, Need: $InterfaceVersion");
168
    if ( int($ScmInterfaceVersion) != int($InterfaceVersion)  )
179
    if ( int($ScmInterfaceVersion) != int($InterfaceVersion)  )
169
    {
180
    {
170
        Error ("JATS interface files are not compatible with this version of JATS",
181
        WarnError (!$no_error, "JATS interface files are not compatible with this version of JATS",
171
               "Rebuild required.",
182
               "Rebuild required.",
172
               "Current Interface Version: $ScmInterfaceVersion",
183
               "Current Interface Version: $ScmInterfaceVersion",
173
               "JATS Interface Version   : $InterfaceVersion" );
184
               "JATS Interface Version   : $InterfaceVersion" );
-
 
185
        return 0;
174
    }
186
    }
175
 
187
 
176
    #
188
    #
177
    #   Ensure that this config file is designed for this machine type
189
    #   Ensure that this config file is designed for this machine type
178
    #   At make-time this test may not be valid. It should have been
190
    #   At make-time this test may not be valid. It should have been
Line 227... Line 239...
227
        foreach my $key (keys %::ScmBuildPlatforms) {
239
        foreach my $key (keys %::ScmBuildPlatforms) {
228
            my( @args ) = split( /$;/, $::ScmBuildPlatforms{ $key } );
240
            my( @args ) = split( /$;/, $::ScmBuildPlatforms{ $key } );
229
            Debug( " $key\t= @args" );
241
            Debug( " $key\t= @args" );
230
        }
242
        }
231
    }
243
    }
-
 
244
 
-
 
245
    return 1;
232
}
246
}
233
 
247
 
234
#-------------------------------------------------------------------------------
248
#-------------------------------------------------------------------------------
235
# Function        : isGenericBuild 
249
# Function        : isGenericBuild 
236
#
250
#