releasing/cbrtools/perl/CheckBc
author Zheng Shen <zheng.shen@nokia.com>
Wed, 13 Oct 2010 16:27:55 +0800
changeset 647 53d1ab72f5bc
parent 602 3145852acc89
permissions -rw-r--r--
ROM Tools 13.1.0.4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
602
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     1
#!perl
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     2
# Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     3
# All rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     4
# This component and the accompanying materials are made available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     6
# which accompanies this distribution, and is available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     8
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     9
# Initial Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    11
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    12
# Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    13
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    14
# Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    15
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    16
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    17
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    18
require 5.006_001;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    19
use strict;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    20
use FindBin;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    21
use Pod::Usage;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    22
use lib "$FindBin::Bin";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    23
use Getopt::Long;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    24
use CheckBc;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    25
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    26
$|++;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    27
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    28
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    29
# Main.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    30
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    31
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    32
ProcessCommandLine();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    33
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    34
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    35
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    36
# Subs.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    37
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    38
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    39
sub ProcessCommandLine {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    40
  Getopt::Long::Configure ("bundling");
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    41
  my $help;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    42
  my $verbose;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    43
  my @additionalHeaders;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    44
  my @additionalIncludePaths;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    45
  my @ignoreClasses;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    46
  my $ignoreR3Unused = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    47
  my $whichChecks = { noClassSize => 0, noDef => 0, noVtable => 0 };
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    48
  GetOptions('h' => \$help, 'v+' => \$verbose, 'c' => \$whichChecks->{noClassSize}, 'd' => \$whichChecks->{noDef}, 't' => \$whichChecks->{noVtable}, 'header=s' => \@additionalHeaders, 'include=s' => \@additionalIncludePaths, 'ignore=s' => \@ignoreClasses, 'ignoreR3UNUSED+' => \$ignoreR3Unused);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    49
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    50
  if ($help) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    51
    Usage($verbose);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    52
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    53
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    54
  my $allNo = 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    55
  foreach my $thisCheck (keys %{$whichChecks}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    56
    unless ($whichChecks->{$thisCheck}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    57
      $allNo = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    58
      last;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    59
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    60
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    61
  if ($allNo) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    62
    print "\nError: Specified options have disabled all the checks\n\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    63
    Usage();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    64
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    65
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    66
  if (scalar(@ARGV) == 1) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    67
    my $descriptionFile = shift @ARGV;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    68
    HandleDescriptionFile($descriptionFile, $ignoreR3Unused, $whichChecks, $verbose);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    69
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    70
  elsif (scalar(@ARGV) == 2) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    71
    my $bldInfDir1 = shift @ARGV;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    72
    my $bldInfDir2 = shift @ARGV;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    73
    HandleBldInfPair($bldInfDir1, $bldInfDir2, \@additionalHeaders, \@additionalIncludePaths, \@ignoreClasses, $ignoreR3Unused, $whichChecks, $verbose);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    74
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    75
  else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    76
    print "Error: Invalid arguments\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    77
    Usage();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    78
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    79
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    80
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    81
sub Usage {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    82
  my $verbose = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    83
  if ($verbose) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    84
    system("perldoc $0");
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    85
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    86
  else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    87
    pod2usage(-verbose => 1);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    88
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    89
  die ("\n");
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    90
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    91
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    92
sub HandleBldInfPair {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    93
  my $bldInfDir1 = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    94
  my $bldInfDir2 = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    95
  my $additionalHeaders = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    96
  my $additionalIncludePaths = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    97
  my $ignoreClasses = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    98
  my $ignoreR3Unused = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    99
  my $whichChecks = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   100
  my $verbose = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   101
  my $checkBc = CheckBc->New($bldInfDir1, $bldInfDir2, $verbose, undef, $additionalHeaders, $additionalIncludePaths, $ignoreClasses, $ignoreR3Unused);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   102
  if (DoCheck($checkBc, $whichChecks)) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   103
    print "Check passed\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   104
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   105
  else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   106
    print "Check failed\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   107
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   108
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   109
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   110
sub HandleDescriptionFile {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   111
  my $descriptionFile = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   112
  my $ignoreR3Unused = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   113
  my $whichChecks = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   114
  my $verbose = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   115
  open (DESC, $descriptionFile) or die "Error: Couldn't open \"$descriptionFile\": $!\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   116
  my $lineNum = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   117
  while (my $thisLine = <DESC>) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   118
    ++$lineNum;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   119
    chomp $thisLine;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   120
    $thisLine =~ s/^\s*$//;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   121
    $thisLine =~ s/#.*//;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   122
    next if ($thisLine eq '');
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   123
    $thisLine =~ s/^\s+//;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   124
    @ARGV = split (/\s+/, $thisLine);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   125
    my @additionalHeaders;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   126
    my @additionalIncludePaths;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   127
    my @ignoreClasses;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   128
    GetOptions('header=s' => \@additionalHeaders, 'include=s' => \@additionalIncludePaths, 'ignore=s' => \@ignoreClasses);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   129
    my $component = shift @ARGV;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   130
    my $bldInfDir1 = shift @ARGV;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   131
    my $bldInfDir2 = shift @ARGV;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   132
    unless ($component and $bldInfDir1 and $bldInfDir2) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   133
      die "Error: Invalid line in $descriptionFile($lineNum)\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   134
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   135
    print "=== $component\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   136
    eval {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   137
      my $checkBc = CheckBc->New($bldInfDir1, $bldInfDir2, $verbose, $component, \@additionalHeaders, \@additionalIncludePaths, \@ignoreClasses, $ignoreR3Unused);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   138
      if (DoCheck($checkBc, $whichChecks)) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   139
	print "=== $component passed ===\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   140
      }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   141
      else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   142
	print "=== $component failed ===\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   143
      }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   144
    };
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   145
    if ($@) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   146
      print $@;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   147
      print "===\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   148
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   149
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   150
  close (DESC);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   151
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   152
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   153
sub DoCheck {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   154
  my $checkBc = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   155
  my $whichChecks = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   156
  my $passed = 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   157
  unless ($whichChecks->{noDef}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   158
    unless ($checkBc->CheckDefFiles() and $passed) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   159
      $passed = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   160
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   161
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   162
  unless ($whichChecks->{noClassSize}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   163
    unless ($checkBc->CheckClassSizes() and $passed) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   164
      $passed = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   165
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   166
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   167
  unless ($whichChecks->{noVtable}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   168
    unless ($checkBc->CheckVTables() and $passed) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   169
      $passed = 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   170
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   171
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   172
  return $passed;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   173
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   174
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   175
__END__
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   176
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   177
=head1 NAME
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   178
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   179
CheckBc - Runs some simple tests to see if one component source tree is backwards compatible another.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   180
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   181
=head1 SYNOPSIS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   182
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   183
  checkbc [options] (<bld_inf_dir_1> <bld_inf_dir_2>) | <description_file>
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   184
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   185
Options:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   186
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   187
  -h  help
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   188
  -c  don't check class sizes
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   189
  -d  don't check def files
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   190
  -t  don't check vtables
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   191
  -v  verbose output (-vv very verbose)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   192
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   193
Additional options for use on a per component basis:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   194
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   195
  --ignoreR3UNUSED
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   196
  --ignore  <class_to_ignore>
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   197
  --header  <additional_header_file>
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   198
  --include <additional_include_path>
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   199
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   200
=head1 DESCRIPTION
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   201
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   202
C<CheckBc> is a tool that attempts to discover if one release of a component has broken backwards compatibility with another. It is currently able to perform the following checks:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   203
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   204
=over 4
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   205
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   206
=item 1
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   207
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   208
Compares the ARM F<.def> files to ensure that only new lines have been added to the end of the file.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   209
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   210
=item 2
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   211
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   212
Compares the sizes of any classes that have an exported C++ constructor. This is done by compiling some generated C++ code that uses the C<sizeof> operator to print the relevant class sizes to C<STDOUT>.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   213
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   214
=item 3
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   215
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   216
Compares the v-table layouts of any classes that have an exported C++ constructor. This is done by compiling each source code set to ARM4 assembler listings, comparing the v-table sections.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   217
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   218
=back
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   219
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   220
There are two ways of envoking C<CheckBc>:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   221
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   222
=over 4
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   223
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   224
=item 1 By specifying a pair of F<bld.inf> directories
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   225
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   226
Given the location of two F<bld.inf> files (say, C<bld_inf_1> and C<bld_inf_2>), C<CheckBc> attempts to discover if the source code referred by by C<bld_inf_2> is backwards compatible with C<bld_inf_1>.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   227
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   228
=item 2 By specifying a list of F<bld.inf> directory pairs in a text file
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   229
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   230
The text file must have the following line format:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   231
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   232
  <component_name>  <bld_inf_dir_1>  <bld_inf_dir_2> [options]
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   233
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   234
Any text following a 'C<#>' character will be ignored.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   235
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   236
=back
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   237
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   238
Using either invokation method, the following options can be specified as many times as required:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   239
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   240
=over 4
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   241
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   242
=item * --ignoreR3UNUSED
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   243
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   244
Indicates that differences between F<.def> files relating to the R3UNUSED export stub optimisation should be ignored.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   245
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   246
=item * --header <additional_header>
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   247
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   248
Specifies an additional #include statement to be included in the generated C++. This option can be used to get headers that don't include all the headers they need to compile. Common headers are automatically included (e32std.h, e32def.h and e32base.h), but occasionally others are also required.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   249
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   250
=item * --include <additional_include_path>
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   251
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   252
Specifies an additional path that the pre-processor should use to find header files.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   253
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   254
=item * --ignore <class_to_ignore>
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   255
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   256
Specifies the name of a class that should be ignored from a class size point of view. This option can be useful if components release librarys that are intended for debugging purposes only and so are not required to maintain backwards compatibility.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   257
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   258
=back
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   259
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   260
=head1 LIMITATIONS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   261
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   262
=over 4
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   263
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   264
=item 1
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   265
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   266
The component's headers must compile using Microsoft's Visual C++ compiler.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   267
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   268
=item 2
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   269
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   270
The component's exported headers must compile when they are all #include'd into a single F<.cpp> file. If this isn't the case, then the C<--header> option can be used to add additional headers.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   271
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   272
=item 3
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   273
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   274
Declarations of the component's exported C++ constructors must be found in one of the exported headers.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   275
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   276
=item 4
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   277
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   278
F<.def> file lines are expected to be identical. This can lead to checks failing falsely because, for example, the name of a function may be changed without breaking BC provided the F<.def> file is carefully edited.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   279
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   280
=item 5
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   281
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   282
The components must compile as ARM4. This is likely to mean that each set of source code needs to be accompanied with a suitable F<\epoc32> tree that allows it to be built. The simplest way to acheive this is to prepare a pair of subst'd drives.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   283
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   284
=back
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   285
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   286
=head1 KNOWN BUGS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   287
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   288
F<bld.inf>, F<.mmp> and F<.def> file parsing is probably not as industrial strength as it should be.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   289
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   290
=head1 COPYRIGHT
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   291
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   292
 Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   293
 All rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   294
 This component and the accompanying materials are made available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   295
 under the terms of the License "Eclipse Public License v1.0"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   296
 which accompanies this distribution, and is available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   297
 at the URL "http://www.eclipse.org/legal/epl-v10.html".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   298
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   299
 Initial Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   300
 Nokia Corporation - initial contribution.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   301
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   302
 Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   303
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   304
 Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   305
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   306
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   307
=cut