|
0
|
1 |
/*
|
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
|
3 |
* All rights reserved.
|
|
|
4 |
* This component and the accompanying materials are made available
|
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
|
6 |
* which accompanies this distribution, and is available
|
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
|
8 |
*
|
|
|
9 |
* Initial Contributors:
|
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
|
11 |
*
|
|
|
12 |
* Contributors:
|
|
|
13 |
*
|
|
|
14 |
* Description:
|
|
|
15 |
*
|
|
|
16 |
*/
|
|
|
17 |
|
|
|
18 |
HeaderAnalyser
|
|
|
19 |
|
|
|
20 |
ACCEPTED PARAMETERS
|
|
|
21 |
-baseline <filename>
|
|
|
22 |
- required specifier: a filename with or without path
|
|
|
23 |
- "previous version" header files to analyse
|
|
|
24 |
- one of the next choices has to be set: -baseline or -baselinedir
|
|
|
25 |
- if used -current is mandatory
|
|
|
26 |
-baselinedir <path with filename>
|
|
|
27 |
- required specifier: a directory name with filename
|
|
|
28 |
- filename may be a wildcard (e.g. "*.h", "coe*.h", "*.*")
|
|
|
29 |
- if using file sets (-set parameter) then you can only give directory
|
|
|
30 |
- all files in this directory are subject to analysis
|
|
|
31 |
- one of the next choices has to be set: -baseline or -baselinedir
|
|
|
32 |
- if used -currentdir is mandatory
|
|
|
33 |
-baselineversion <string>
|
|
|
34 |
- required specifier: alphanumerical string, no whitespaces or newlines or other
|
|
|
35 |
"sensitive" characters
|
|
|
36 |
- version name of the "previous version" files that are subjected to analysis
|
|
|
37 |
- optional
|
|
|
38 |
-current <filename>
|
|
|
39 |
- same as -baseline, except for "current version" header files
|
|
|
40 |
- if used -baseline is mandatory
|
|
|
41 |
-currentdir <directory>
|
|
|
42 |
- same as -baselinedir, except for "current version" header files
|
|
|
43 |
- if used -baselinedir is mandatory
|
|
|
44 |
-currentversion <string>
|
|
|
45 |
- same as -baselineversion
|
|
|
46 |
-reportfile <filename>
|
|
|
47 |
- required specifier: filename
|
|
|
48 |
- output name of the XML-formatted analysis report file
|
|
|
49 |
- mandatory
|
|
|
50 |
-commandfile <filename>
|
|
|
51 |
- required specifier: filename of a text file containing more command switches
|
|
|
52 |
- contains more command-line switches
|
|
|
53 |
- overrides environment variables
|
|
|
54 |
- command-line parameters override command-file parameters
|
|
|
55 |
- optional
|
|
|
56 |
-baseplatformheaders <directory>
|
|
|
57 |
- required specifier: directory name
|
|
|
58 |
- points to the "base header set" that is to be used when analysing
|
|
|
59 |
"previous version" headers
|
|
|
60 |
- e.g. c:\symbian\s60_2nd_fp2\epoc32\include
|
|
|
61 |
- mandatory
|
|
|
62 |
-currentplatformheaders <directory>
|
|
|
63 |
- as -baseplatformroot, except for "current version" headers
|
|
|
64 |
- e.g. c:\symbian\s60_3rd_beta1\epoc32\include
|
|
|
65 |
- mandatory
|
|
|
66 |
-forcebaseinclude <path>
|
|
|
67 |
- specifies a file which is always included first in generated
|
|
|
68 |
temporary cpp file for baseline.
|
|
|
69 |
- optional
|
|
|
70 |
-forcecurrentinclude <path>
|
|
|
71 |
- specifies a file which is always included first in generated
|
|
|
72 |
temporary cpp file for current.
|
|
|
73 |
- optional
|
|
|
74 |
-set <file1[;file2]*>
|
|
|
75 |
- you can give file list which is separated with semicolon
|
|
|
76 |
- if given is used instead of wildcards in baselinedir-parameter
|
|
|
77 |
- optional; can only be used with -baselinedir/-currentdir
|
|
|
78 |
-replace <file newfile [file newfile]*>
|
|
|
79 |
- takes pairs of paths as parameters
|
|
|
80 |
- first of pair tells which file to replace, if directory is given it's trunkated away
|
|
|
81 |
- second of pair tells which path (directory + filename) to use instead
|
|
|
82 |
- optional; can only be used with -baselinedir/-currentdir
|
|
|
83 |
-recursive
|
|
|
84 |
- no specifiers allowed
|
|
|
85 |
- if recursive is defined, then subdirectories will be analysed as well
|
|
|
86 |
- optional; can only be used with -baselinedir/-currentdir
|
|
|
87 |
-baseplatformheaders <filename>
|
|
|
88 |
- required specifier: a file name or a list of file names, separated by semicolons
|
|
|
89 |
- forces the inclusion of these files during the "previous version" preprocessing phase
|
|
|
90 |
- may slow down the system significantly
|
|
|
91 |
- mandatory, in practice required when processing symbian files (many of the headers in
|
|
|
92 |
epoc32\include
|
|
|
93 |
make implicit assumptions about pre-included header files)
|
|
|
94 |
-currentplatformheaders <filename>
|
|
|
95 |
- same as -baseplatformheaders, except for "current version" files
|
|
|
96 |
-bundlesize <count>
|
|
|
97 |
- required specifier: integer between 0 and 9999
|
|
|
98 |
- specifies how large "header bundles" to use when running the analysis
|
|
|
99 |
- larger bundles lead to shorter preprocessing times
|
|
|
100 |
- actual analysis might take longer when the XML files are large
|
|
|
101 |
- default 1
|
|
|
102 |
- optional
|
|
|
103 |
-temp <directory>
|
|
|
104 |
- output location of temporary files
|
|
|
105 |
- optional
|
|
|
106 |
-docurl <url>
|
|
|
107 |
- tells where documentation can be found
|
|
|
108 |
- specifier added to end of url
|
|
|
109 |
- used for report
|
|
|
110 |
- optional
|
|
|
111 |
|
|
|
112 |
1. it's possible to compare two files
|
|
|
113 |
|
|
|
114 |
command -baseline c:\base\test.h -current c:\current\test.h -baseplatformheaders C:\Symbian\9.1\S60_3rd_Beta\Epoc32\include -currentplatformheaders C:\Symbian\9.1\S60_3rd_Beta\Epoc32\include
|
|
|
115 |
|
|
|
116 |
2. its possible to compare files of two directories (recursively)
|
|
|
117 |
|
|
|
118 |
command -baselinedir c:\base\*.h -current c:\current\*.h -baseplatformheaders C:\Symbian\9.1\S60_3rd_Beta\Epoc32\include -currentplatformheaders C:\Symbian\9.1\S60_3rd_Beta\Epoc32\include (-recursive)
|
|
|
119 |
|
|
|
120 |
3. its possible to compare two file sets (recursively)
|
|
|
121 |
|
|
|
122 |
command -baselinedir c:\base -current c:\current -baseplatformheaders c:\symbian\9.1\S60_3rd_Beta\Epoc32\include -currenplatformheaders
|
|
|
123 |
c:\symbian\9.1\S60_3rd_Beta\Epoc32\include (-recursive) -set file1.h;file2.h;file3.h;text.txt;file5.h
|
|
|
124 |
|
|
|
125 |
Q. How about situation when file name has been renamed?
|
|
|
126 |
|
|
|
127 |
A.
|
|
|
128 |
command -baselinedir c:\base\*.h -current c:\current\*.h -baseplatformheaders C:\Symbian\9.1\S60_3rd_Beta\Epoc32\include -currentplatformheaders C:\Symbian\9.1\S60_3rd_Beta\Epoc32\include -replace c:\base\old.h c:\base\new.h
|
|
|
129 |
|
|
|
130 |
Q. what if I have one hundred files which has been replaced?
|
|
|
131 |
|
|
|
132 |
A.
|
|
|
133 |
command -commandfile settings.txt
|
|
|
134 |
|
|
|
135 |
inside CommandFile:
|
|
|
136 |
-baselinedir c:\base\*.h
|
|
|
137 |
-current c:\current\*.h
|
|
|
138 |
-baseplatformheaders C:\Symbian\9.1\S60_3rd_Beta\Epoc32\include
|
|
|
139 |
-currentplatformheaders C:\Symbian\9.1\S60_3rd_Beta\Epoc32\include
|
|
|
140 |
-replace
|
|
|
141 |
c:\base\old.h c:\base\new.h
|
|
|
142 |
c:\base\test.h c:\base\test2.h
|
|
|
143 |
c:\base\filehandle.h c:\base\file.h
|
|
|
144 |
|