author | Mike Kinghan <mikek@symbian.org> |
Wed, 01 Dec 2010 12:02:41 +0000 | |
changeset 42 | cf609178ac39 |
parent 40 | 68f68128601f |
permissions | -rw-r--r-- |
40
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
1 |
#!/usr/bin/perl |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
2 |
# Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
3 |
# All rights reserved. |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
4 |
# This component and the accompanying materials are made available |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
5 |
# under the terms of "Eclipse Public License v1.0" |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
6 |
# which accompanies this distribution, and is available |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
7 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
8 |
# |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
9 |
# Initial Contributors: |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
10 |
# Nokia Corporation - initial contribution. |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
11 |
# |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
12 |
# Contributors: |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
13 |
# |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
14 |
# Description: |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
15 |
# all variables called *Path* are set up to end with a backslash |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
16 |
# all variables called *Path or *File are stored as absolute (file)paths |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
17 |
# all variables called UpPath* are stored as relative paths |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
18 |
# |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
19 |
# |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
20 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
21 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
22 |
use FindBin; # for FindBin::Bin |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
23 |
use Getopt::Long; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
24 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
25 |
my $PerlLibPath; # fully qualified pathname of the directory containing our Perl modules |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
26 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
27 |
BEGIN { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
28 |
# check user has a version of perl that will cope |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
29 |
require 5.005_03; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
30 |
# establish the path to the Perl libraries: currently the same directory as this script |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
31 |
$PerlLibPath = $FindBin::Bin; # X:/epoc32/tools |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
32 |
# do not convert slashes for linux |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
33 |
if ($^O eq "MSWin32") { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
34 |
$PerlLibPath =~ s/\//\\/g; # X:\epoc32\tools |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
35 |
$PerlLibPath .= "\\"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
36 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
37 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
38 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
39 |
# Version |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
40 |
my $MajorVersion = 1; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
41 |
my $MinorVersion = 1; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
42 |
my $PatchVersion = 1; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
43 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
44 |
use lib $PerlLibPath; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
45 |
use Defutl; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
46 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
47 |
# THE MAIN PROGRAM SECTION |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
48 |
########################## |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
49 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
50 |
{ |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
51 |
my %Options; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
52 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
53 |
# process the command-line |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
54 |
unless (GetOptions(\%Options, 'compare', 'remove')) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
55 |
exit 1; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
56 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
57 |
unless (@ARGV==2) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
58 |
&Usage; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
59 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
60 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
61 |
my $FRZFILE; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
62 |
my $GENFILE; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
63 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
64 |
($FRZFILE,$GENFILE)=(@ARGV); |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
65 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
66 |
# check the file exists |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
67 |
unless (-e $FRZFILE) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
68 |
warn "WARNING: $FRZFILE: File not found - OK if freezing for first time\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
69 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
70 |
unless (-e $GENFILE) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
71 |
die "EFREEZE ERROR: $GENFILE: File not found\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
72 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
73 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
74 |
# Read the Frozen .DEF file if it exists |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
75 |
my @FrzDataStruct; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
76 |
my $FrzExportsOn=0; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
77 |
if (-e $FRZFILE) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
78 |
eval { &Def_ReadFileL(\@FrzDataStruct, $FRZFILE, $FrzExportsOn); }; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
79 |
die $@ if $@; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
80 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
81 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
82 |
# Read the New .DEF file |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
83 |
my @GenDataStruct; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
84 |
my $Dummy; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
85 |
if ($GENFILE) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
86 |
eval { &Def_ReadFileL(\@GenDataStruct, $GENFILE, $Dummy, ($Options{compare} or $Options{remove})); }; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
87 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
88 |
die $@ if $@; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
89 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
90 |
# Compare the frozen .DEF data with the new .DEF file |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
91 |
my (@NewDataStruct, @MissingDataStruct, @BadDataStruct); |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
92 |
eval { &CompareFrzGenL (\@NewDataStruct, \@MissingDataStruct, \@BadDataStruct, \@FrzDataStruct, \@GenDataStruct, $Options{remove}); }; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
93 |
die $@ if $@; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
94 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
95 |
# check for errors |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
96 |
my $NumRemoved; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
97 |
my $Ref; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
98 |
my @Errors; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
99 |
my $Title='EFREEZE ERROR:'; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
100 |
if ($Options{compare}) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
101 |
$Title='EFREEZE:'; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
102 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
103 |
if (@MissingDataStruct and $Options{remove}) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
104 |
# Mark missing exports as ABSENT in DEF file |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
105 |
$NumRemoved=@MissingDataStruct; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
106 |
if ($Options{compare}) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
107 |
print "EFREEZE: Marking $NumRemoved Export(s) as ABSENT :\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
108 |
} else { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
109 |
print "EFREEZE: Marking $NumRemoved Export(s) as ABSENT in $FRZFILE :\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
110 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
111 |
foreach (@MissingDataStruct) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
112 |
$$_{Absent} = 1; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
113 |
my $Comment=''; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
114 |
if ($$_{Comment}) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
115 |
$Comment=" ; $$_{Comment}"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
116 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
117 |
my $r3unused = $$_{R3Unused} ? " R3UNUSED" : ""; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
118 |
print " $$_{Name} \@ $$_{Ordinal} NONAME$r3unused$Comment\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
119 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
120 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
121 |
elsif (@MissingDataStruct) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
122 |
my $Num=@MissingDataStruct; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
123 |
push @Errors, "$Title $FRZFILE: $Num Frozen Export(s) missing from $GENFILE (POSSIBLE COMPATIBILITY BREAK):\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
124 |
foreach $Ref (@MissingDataStruct) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
125 |
my $r3unused = $$Ref{R3Unused} ? " R3UNUSED" : ""; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
126 |
push @Errors, " $$Ref{LineNum}: $$Ref{Name} \@ $$Ref{Ordinal} NONAME$r3unused\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
127 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
128 |
push @Errors, "\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
129 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
130 |
if (@BadDataStruct) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
131 |
my $Num=@BadDataStruct; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
132 |
push @Errors, "$Title $GENFILE: $Num function(s) exported at wrong ordinal:\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
133 |
foreach $Ref (@BadDataStruct) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
134 |
my $r3unused = $$Ref{R3Unused} ? " R3UNUSED" : ""; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
135 |
push @Errors, " $$Ref{LineNum}: $$Ref{Name} \@ $$Ref{Ordinal} NONAME$r3unused\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
136 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
137 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
138 |
if (@Errors) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
139 |
unless ($Options{compare}) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
140 |
die @Errors; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
141 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
142 |
else { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
143 |
print @Errors; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
144 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
145 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
146 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
147 |
# Update the frozen .DEF file |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
148 |
eval { &UpdateFrzFileL(\@NewDataStruct, \@FrzDataStruct, $FRZFILE, $FrzExportsOn, $Options{compare}, $NumRemoved); }; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
149 |
die $@ if $@; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
150 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
151 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
152 |
exit; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
153 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
154 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
155 |
####################################################################### |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
156 |
# SUBROUTINES |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
157 |
####################################################################### |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
158 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
159 |
sub Usage () { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
160 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
161 |
print( |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
162 |
"\n", |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
163 |
"EFREEZE - .DEF file maintenance utility V$MajorVersion.$MinorVersion.$PatchVersion\n", |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
164 |
"\n", |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
165 |
"EFREEZE {options} [frozen .DEF file] [new .DEF file]\n", |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
166 |
"\n", |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
167 |
"options: (case-insensitive)\n", |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
168 |
" -Compare\n", |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
169 |
" -Remove\n", |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
170 |
"\n" |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
171 |
); |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
172 |
exit 1; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
173 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
174 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
175 |
sub CompareFrzGenL ($$$$$$) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
176 |
my ($NewStructRef, $MissingStructRef, $BadStructRef, $FrzStructRef, $GenStructRef, $remove)=@_; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
177 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
178 |
# compare the input export data with the frozen data |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
179 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
180 |
# take a copy of the frozen .DEF file structure that we can trash |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
181 |
my @TmpStruct=@$FrzStructRef; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
182 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
183 |
# remove any entries not containing export data and get the highest ordinal value used |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
184 |
my $LastOrdinal=0; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
185 |
foreach (@TmpStruct) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
186 |
if ($$_{Name}) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
187 |
if ($LastOrdinal<$$_{Ordinal}) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
188 |
$LastOrdinal=$$_{Ordinal}; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
189 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
190 |
next; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
191 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
192 |
undef $_; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
193 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
194 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
195 |
my $GenRef; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
196 |
my $TmpRef; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
197 |
GENLOOP: foreach $GenRef (@$GenStructRef) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
198 |
next unless $$GenRef{Name}; # ignore lines in the .DEF file not containing an export |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
199 |
foreach $TmpRef (@TmpStruct) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
200 |
next unless defined $TmpRef; # ignore nullified entries in the temporary array |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
201 |
# does the function name match? |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
202 |
if ($$GenRef{Name} eq $$TmpRef{Name}) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
203 |
# check the names have the same ordinals |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
204 |
if ($remove or $$GenRef{Ordinal}==$$TmpRef{Ordinal}) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
205 |
undef $TmpRef; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
206 |
next GENLOOP; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
207 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
208 |
# store exports with the wrong ordinals |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
209 |
push @$BadStructRef, $GenRef; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
210 |
undef $TmpRef; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
211 |
next GENLOOP; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
212 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
213 |
# Absent export? |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
214 |
if ($$TmpRef{Absent} and $$TmpRef{Ordinal}==$$GenRef{Ordinal}) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
215 |
next GENLOOP; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
216 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
217 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
218 |
# store new exports not found in the frozen .DEF file with the right ordinal value |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
219 |
$LastOrdinal++; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
220 |
$$GenRef{Ordinal}=$LastOrdinal; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
221 |
push @$NewStructRef, $GenRef; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
222 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
223 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
224 |
# all the exports left in the frozen .DEF file weren't found |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
225 |
foreach $TmpRef (@TmpStruct) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
226 |
next unless defined $TmpRef; # ignore nullified entries in the temporary array |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
227 |
next if $$TmpRef{Absent}; # skip entries marked as ABSENT in the DEF file |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
228 |
push @$MissingStructRef, $TmpRef; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
229 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
230 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
231 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
232 |
sub UpdateFrzFileL ($$$$$$) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
233 |
my ($NewStructRef, $FrzStructRef, $FILE, $ExportsOn, $Compare, $NumRemoved)=@_; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
234 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
235 |
# add the exports to the frozen .DEF file text |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
236 |
unless (@$NewStructRef or $NumRemoved) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
237 |
print "EFREEZE: DEF file up to date\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
238 |
return; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
239 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
240 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
241 |
my $NumNewExports=@$NewStructRef; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
242 |
unless ($Compare) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
243 |
# abort the operation unless the frozen .DEF file is writeable |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
244 |
if (-e $FILE and not -w $FILE) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
245 |
die |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
246 |
"EFREEZE ERROR: Can't append $NumNewExports New Export(s) to $FILE\n", |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
247 |
" as file is not writeable. Check source code control system.\n" |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
248 |
; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
249 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
250 |
print "EFREEZE: Appending $NumNewExports New Export(s) to $FILE:\n" if ($NumNewExports); |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
251 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
252 |
else { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
253 |
print "EFREEZE: $NumNewExports New Export(s):\n" if ($NumNewExports); |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
254 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
255 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
256 |
my @Text; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
257 |
my $ExportsDeclared; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
258 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
259 |
# Process the frozen .DEF file |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
260 |
if (@$FrzStructRef) { # there is already a frozen .DEF file |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
261 |
my $FrzRef; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
262 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
263 |
# get the lines of text from the frozen .DEF file |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
264 |
foreach $FrzRef (@$FrzStructRef) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
265 |
next if (!$FrzRef); |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
266 |
if (!defined($$FrzRef{Ordinal})) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
267 |
push @Text, $$FrzRef{Line}; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
268 |
$ExportsDeclared = 1 if ($$FrzRef{Line} =~ /^\s*EXPORTS\s*(\s+\S+.*)?$/io); |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
269 |
next; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
270 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
271 |
my $Comment=''; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
272 |
if ($$FrzRef{Comment}) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
273 |
$Comment=" ; $$FrzRef{Comment}"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
274 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
275 |
my $r3unused = $$FrzRef{R3Unused} ? " R3UNUSED" : ""; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
276 |
my $absent = $$FrzRef{Absent} ? " ABSENT" : ""; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
277 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
278 |
my $data = ""; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
279 |
if( !($$FrzRef{Name} =~ /^(_ZTI|_ZTV|_ZTT)/)) |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
280 |
{ |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
281 |
# A symbol name with the above pattern indicates that it is a Data symbol. |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
282 |
# Mark symbols as DATA only when it cannot be found from the name alone (i.e., |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
283 |
# explicitly exported data symbols). |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
284 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
285 |
if(($$FrzRef{Data}) and ($$FrzRef{Size}) ){ |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
286 |
$data = " DATA $$FrzRef{Size}"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
287 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
288 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
289 |
push @Text, "\t$$FrzRef{Name} \@ $$FrzRef{Ordinal} NONAME$data$r3unused$absent$Comment\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
290 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
291 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
292 |
# strip any blank lines at the end of the frozen .DEF file text |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
293 |
foreach (reverse @Text) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
294 |
if (/^\s*$/o) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
295 |
$_=''; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
296 |
next; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
297 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
298 |
last; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
299 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
300 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
301 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
302 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
303 |
# Add an EXPORTS section header if there aren't already exports |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
304 |
unshift @Text, "EXPORTS\n" unless ($ExportsDeclared); |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
305 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
306 |
my $NewRef; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
307 |
foreach $NewRef (@$NewStructRef) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
308 |
my $Comment=''; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
309 |
if ($$NewRef{Comment}) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
310 |
$Comment=" ; $$NewRef{Comment}"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
311 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
312 |
my $r3unused = $$NewRef{R3Unused} ? " R3UNUSED" : ""; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
313 |
my $absent = $$NewRef{Absent} ? " ABSENT" : ""; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
314 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
315 |
my $data = ""; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
316 |
if( !($$NewRef{Name} =~ /^(_ZTV|_ZTI|_ZTT)/)) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
317 |
# A symbol name with the above pattern indicates that it is a Data symbol. |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
318 |
# Mark symbols as DATA only when it cannot be found from the name alone (i.e., |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
319 |
# explicitly exported data symbols). |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
320 |
if(($$NewRef{Data}) and ($$NewRef{Size}) ){ |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
321 |
$data = " DATA $$NewRef{Size}"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
322 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
323 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
324 |
print " $$NewRef{Name} \@ $$NewRef{Ordinal} NONAME$r3unused$Comment\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
325 |
push @Text, "\t$$NewRef{Name} \@ $$NewRef{Ordinal} NONAME$data$r3unused$absent$Comment\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
326 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
327 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
328 |
# add a terminating newline |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
329 |
push @Text, "\n"; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
330 |
|
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
331 |
unless ($Compare) { |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
332 |
# write the new frozen .DEF file |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
333 |
eval { &Def_WriteFileL(\@Text, $FILE); }; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
334 |
die $@ if $@; |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
335 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
336 |
} |
68f68128601f
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package.
Mike Kinghan <mikek@symbian.org>
parents:
diff
changeset
|
337 |