1 | #!/usr/bin/perl |
---|
2 | ########################################################################## |
---|
3 | # orxonox - the future of 3D-vertical-scrollers # |
---|
4 | # # |
---|
5 | # Copyright (C) 2004 orx # |
---|
6 | # # |
---|
7 | # This program is free software; you can redistribute it and/or modify # |
---|
8 | # it under the terms of the GNU General Public License as published by # |
---|
9 | # the Free Software Foundation; either version 2, or (at your option) # |
---|
10 | # any later version. # |
---|
11 | # # |
---|
12 | # ### File Specific: # |
---|
13 | # main-programmer: Benjamin Grauer # |
---|
14 | # co-programmer: ... # |
---|
15 | # # |
---|
16 | # This Script is for parsing single or multiple files for their # |
---|
17 | # doxygeb-tags, and outputs the warnings and errors, but prehibits # |
---|
18 | # the progress from being displayed. # |
---|
19 | # Usage: ./orxodox.checkFiles.pl [fileName1 [fileName2 [...]]] # |
---|
20 | # This script ignores file-extensions, and assumes that either # |
---|
21 | # .h, .cc or both may exist, and searches for them. # |
---|
22 | ########################################################################## |
---|
23 | |
---|
24 | $inputFiles = @ARGV[0]; |
---|
25 | $tempDoxFile = "TMPorxodox"; |
---|
26 | |
---|
27 | unless (open (DOXfile, ">$tempDoxFile")) |
---|
28 | { |
---|
29 | die("cannot open file\n"); |
---|
30 | } |
---|
31 | |
---|
32 | $processFiles = ""; |
---|
33 | $numberOfFiles = 0; |
---|
34 | foreach $inputFile (@ARGV) |
---|
35 | { |
---|
36 | $tmpNumber = $numberOfFiles; |
---|
37 | |
---|
38 | $inputFile =~ s/\.cc$//; |
---|
39 | $inputFile =~ s/\.h$//; |
---|
40 | |
---|
41 | print "checking file $inputFile: "; |
---|
42 | |
---|
43 | $inputFile =~ s/$/\.h/; |
---|
44 | if (-e $inputFile) |
---|
45 | { |
---|
46 | $processFiles = "$processFiles $inputFile"; |
---|
47 | $numberOfFiles++; |
---|
48 | print "found .h "; |
---|
49 | } |
---|
50 | $inputFile =~ s/\.h$/\.cc/; |
---|
51 | if (-e $inputFile) |
---|
52 | { |
---|
53 | $processFiles = "$processFiles $inputFile"; |
---|
54 | $numberOfFiles++; |
---|
55 | print "...found .cc "; |
---|
56 | } |
---|
57 | if ($tmpNumber == $numberOfFiles) {print "no matching files found";} |
---|
58 | print "\n"; |
---|
59 | } |
---|
60 | |
---|
61 | if ($numberOfFiles == 0 && @ARGV !=0){ |
---|
62 | die("no Files have been found\n");} |
---|
63 | |
---|
64 | print "==================================================================\n"; |
---|
65 | print "Generating temporary Documentation File\n"; |
---|
66 | print "==================================================================\n"; |
---|
67 | |
---|
68 | print DOXfile "# THIS IS A DEFAULT FILE FOR DOXYGEN DOCUMENTATION"; |
---|
69 | |
---|
70 | printf DOXfile "# Doxyfile 1.3.7 \ |
---|
71 | ## SAMPLE FILE (to be executed from orxonox/trunk/) \ |
---|
72 | \ |
---|
73 | #--------------------------------------------------------------------------- \ |
---|
74 | # Project related configuration options \ |
---|
75 | #--------------------------------------------------------------------------- \ |
---|
76 | PROJECT_NAME = Orxonox \ |
---|
77 | PROJECT_NUMBER = 1 \ |
---|
78 | OUTPUT_DIRECTORY = doxygen/ \ |
---|
79 | CREATE_SUBDIRS = YES \ |
---|
80 | OUTPUT_LANGUAGE = English \ |
---|
81 | USE_WINDOWS_ENCODING = YES \ |
---|
82 | BRIEF_MEMBER_DESC = YES \ |
---|
83 | REPEAT_BRIEF = YES \ |
---|
84 | ABBREVIATE_BRIEF = \ |
---|
85 | ALWAYS_DETAILED_SEC = NO \ |
---|
86 | INLINE_INHERITED_MEMB = NO \ |
---|
87 | FULL_PATH_NAMES = NO \ |
---|
88 | STRIP_FROM_PATH = \ |
---|
89 | STRIP_FROM_INC_PATH = \ |
---|
90 | SHORT_NAMES = NO \ |
---|
91 | JAVADOC_AUTOBRIEF = NO \ |
---|
92 | MULTILINE_CPP_IS_BRIEF = NO \ |
---|
93 | DETAILS_AT_TOP = NO \ |
---|
94 | INHERIT_DOCS = YES \ |
---|
95 | DISTRIBUTE_GROUP_DOC = NO \ |
---|
96 | TAB_SIZE = 8 \ |
---|
97 | ALIASES = \ |
---|
98 | OPTIMIZE_OUTPUT_FOR_C = NO \ |
---|
99 | OPTIMIZE_OUTPUT_JAVA = NO \ |
---|
100 | SUBGROUPING = YES \ |
---|
101 | #--------------------------------------------------------------------------- \ |
---|
102 | # Build related configuration options \ |
---|
103 | #--------------------------------------------------------------------------- \ |
---|
104 | EXTRACT_ALL = NO \ |
---|
105 | EXTRACT_PRIVATE = YES \ |
---|
106 | EXTRACT_STATIC = YES \ |
---|
107 | EXTRACT_LOCAL_CLASSES = YES \ |
---|
108 | EXTRACT_LOCAL_METHODS = NO \ |
---|
109 | HIDE_UNDOC_MEMBERS = NO \ |
---|
110 | HIDE_UNDOC_CLASSES = NO \ |
---|
111 | HIDE_FRIEND_COMPOUNDS = NO \ |
---|
112 | HIDE_IN_BODY_DOCS = NO \ |
---|
113 | INTERNAL_DOCS = NO \ |
---|
114 | CASE_SENSE_NAMES = YES \ |
---|
115 | HIDE_SCOPE_NAMES = NO \ |
---|
116 | SHOW_INCLUDE_FILES = YES \ |
---|
117 | INLINE_INFO = YES \ |
---|
118 | SORT_MEMBER_DOCS = YES \ |
---|
119 | SORT_BRIEF_DOCS = NO \ |
---|
120 | SORT_BY_SCOPE_NAME = NO \ |
---|
121 | GENERATE_TODOLIST = YES \ |
---|
122 | GENERATE_TESTLIST = YES \ |
---|
123 | GENERATE_BUGLIST = YES \ |
---|
124 | GENERATE_DEPRECATEDLIST= YES \ |
---|
125 | ENABLED_SECTIONS = \ |
---|
126 | MAX_INITIALIZER_LINES = 30 \ |
---|
127 | SHOW_USED_FILES = YES \ |
---|
128 | #--------------------------------------------------------------------------- \ |
---|
129 | # configuration options related to warning and progress messages \ |
---|
130 | #--------------------------------------------------------------------------- \ |
---|
131 | QUIET = YES \ |
---|
132 | WARNINGS = YES \ |
---|
133 | WARN_IF_UNDOCUMENTED = YES \ |
---|
134 | WARN_IF_DOC_ERROR = YES \ |
---|
135 | WARN_FORMAT = \"\$file:\$line: \$text\" \ |
---|
136 | WARN_LOGFILE = \ |
---|
137 | #--------------------------------------------------------------------------- \ |
---|
138 | # configuration options related to the input files \ |
---|
139 | #--------------------------------------------------------------------------- \ |
---|
140 | INPUT = $processFiles \ |
---|
141 | FILE_PATTERNS = \ |
---|
142 | RECURSIVE = NO \ |
---|
143 | EXCLUDE = \ |
---|
144 | EXCLUDE_SYMLINKS = NO \ |
---|
145 | EXCLUDE_PATTERNS = \ |
---|
146 | EXAMPLE_PATH = \ |
---|
147 | EXAMPLE_PATTERNS = \ |
---|
148 | EXAMPLE_RECURSIVE = NO \ |
---|
149 | IMAGE_PATH = \ |
---|
150 | INPUT_FILTER = \ |
---|
151 | FILTER_SOURCE_FILES = NO \ |
---|
152 | #--------------------------------------------------------------------------- \ |
---|
153 | # configuration options related to source browsing \ |
---|
154 | #--------------------------------------------------------------------------- \ |
---|
155 | SOURCE_BROWSER = NO \ |
---|
156 | INLINE_SOURCES = NO \ |
---|
157 | STRIP_CODE_COMMENTS = YES \ |
---|
158 | REFERENCED_BY_RELATION = YES \ |
---|
159 | REFERENCES_RELATION = YES \ |
---|
160 | VERBATIM_HEADERS = YES \ |
---|
161 | #--------------------------------------------------------------------------- \ |
---|
162 | # configuration options related to the alphabetical class index \ |
---|
163 | #--------------------------------------------------------------------------- \ |
---|
164 | ALPHABETICAL_INDEX = NO \ |
---|
165 | COLS_IN_ALPHA_INDEX = 5 \ |
---|
166 | IGNORE_PREFIX = \ |
---|
167 | #--------------------------------------------------------------------------- \ |
---|
168 | # configuration options related to the HTML output \ |
---|
169 | #--------------------------------------------------------------------------- \ |
---|
170 | GENERATE_HTML = YES \ |
---|
171 | HTML_OUTPUT = html \ |
---|
172 | HTML_FILE_EXTENSION = .html \ |
---|
173 | HTML_HEADER = \ |
---|
174 | HTML_FOOTER = \ |
---|
175 | HTML_STYLESHEET = \ |
---|
176 | HTML_ALIGN_MEMBERS = YES \ |
---|
177 | GENERATE_HTMLHELP = NO \ |
---|
178 | CHM_FILE = \ |
---|
179 | HHC_LOCATION = \ |
---|
180 | GENERATE_CHI = NO \ |
---|
181 | BINARY_TOC = NO \ |
---|
182 | TOC_EXPAND = NO \ |
---|
183 | DISABLE_INDEX = NO \ |
---|
184 | ENUM_VALUES_PER_LINE = 4 \ |
---|
185 | GENERATE_TREEVIEW = NO \ |
---|
186 | TREEVIEW_WIDTH = 250 \ |
---|
187 | #--------------------------------------------------------------------------- \ |
---|
188 | # configuration options related to the LaTeX output \ |
---|
189 | #--------------------------------------------------------------------------- \ |
---|
190 | GENERATE_LATEX = NO \ |
---|
191 | LATEX_OUTPUT = latex \ |
---|
192 | LATEX_CMD_NAME = latex \ |
---|
193 | MAKEINDEX_CMD_NAME = makeindex \ |
---|
194 | COMPACT_LATEX = NO \ |
---|
195 | PAPER_TYPE = a4wide \ |
---|
196 | EXTRA_PACKAGES = \ |
---|
197 | LATEX_HEADER = \ |
---|
198 | PDF_HYPERLINKS = NO \ |
---|
199 | USE_PDFLATEX = NO \ |
---|
200 | LATEX_BATCHMODE = NO \ |
---|
201 | LATEX_HIDE_INDICES = NO \ |
---|
202 | #--------------------------------------------------------------------------- \ |
---|
203 | # configuration options related to the RTF output \ |
---|
204 | #--------------------------------------------------------------------------- \ |
---|
205 | GENERATE_RTF = NO \ |
---|
206 | RTF_OUTPUT = rtf \ |
---|
207 | COMPACT_RTF = NO \ |
---|
208 | RTF_HYPERLINKS = NO \ |
---|
209 | RTF_STYLESHEET_FILE = \ |
---|
210 | RTF_EXTENSIONS_FILE = \ |
---|
211 | #--------------------------------------------------------------------------- \ |
---|
212 | # configuration options related to the man page output \ |
---|
213 | #--------------------------------------------------------------------------- \ |
---|
214 | GENERATE_MAN = NO \ |
---|
215 | MAN_OUTPUT = man \ |
---|
216 | MAN_EXTENSION = .3 \ |
---|
217 | MAN_LINKS = NO \ |
---|
218 | #--------------------------------------------------------------------------- \ |
---|
219 | # configuration options related to the XML output \ |
---|
220 | #--------------------------------------------------------------------------- \ |
---|
221 | GENERATE_XML = NO \ |
---|
222 | XML_OUTPUT = xml \ |
---|
223 | XML_SCHEMA = \ |
---|
224 | XML_DTD = \ |
---|
225 | XML_PROGRAMLISTING = YES \ |
---|
226 | #--------------------------------------------------------------------------- \ |
---|
227 | # configuration options for the AutoGen Definitions output \ |
---|
228 | #--------------------------------------------------------------------------- \ |
---|
229 | GENERATE_AUTOGEN_DEF = NO \ |
---|
230 | #--------------------------------------------------------------------------- \ |
---|
231 | # configuration options related to the Perl module output \ |
---|
232 | #--------------------------------------------------------------------------- \ |
---|
233 | GENERATE_PERLMOD = NO \ |
---|
234 | PERLMOD_LATEX = NO \ |
---|
235 | PERLMOD_PRETTY = YES \ |
---|
236 | PERLMOD_MAKEVAR_PREFIX = \ |
---|
237 | #--------------------------------------------------------------------------- \ |
---|
238 | # Configuration options related to the preprocessor \ |
---|
239 | #--------------------------------------------------------------------------- \ |
---|
240 | ENABLE_PREPROCESSING = YES \ |
---|
241 | MACRO_EXPANSION = NO \ |
---|
242 | EXPAND_ONLY_PREDEF = NO \ |
---|
243 | SEARCH_INCLUDES = YES \ |
---|
244 | INCLUDE_PATH = \ |
---|
245 | INCLUDE_FILE_PATTERNS = \ |
---|
246 | PREDEFINED = \ |
---|
247 | EXPAND_AS_DEFINED = \ |
---|
248 | SKIP_FUNCTION_MACROS = YES \ |
---|
249 | #--------------------------------------------------------------------------- \ |
---|
250 | # Configuration::additions related to external references \ |
---|
251 | #--------------------------------------------------------------------------- \ |
---|
252 | TAGFILES = \ |
---|
253 | GENERATE_TAGFILE = \ |
---|
254 | ALLEXTERNALS = NO \ |
---|
255 | EXTERNAL_GROUPS = YES \ |
---|
256 | PERL_PATH = /usr/bin/perl \ |
---|
257 | #--------------------------------------------------------------------------- \ |
---|
258 | # Configuration options related to the dot tool \ |
---|
259 | #--------------------------------------------------------------------------- \ |
---|
260 | CLASS_DIAGRAMS = YES \ |
---|
261 | HIDE_UNDOC_RELATIONS = YES \ |
---|
262 | HAVE_DOT = NO \ |
---|
263 | CLASS_GRAPH = YES \ |
---|
264 | COLLABORATION_GRAPH = YES \ |
---|
265 | UML_LOOK = NO \ |
---|
266 | TEMPLATE_RELATIONS = NO \ |
---|
267 | INCLUDE_GRAPH = YES \ |
---|
268 | INCLUDED_BY_GRAPH = YES \ |
---|
269 | CALL_GRAPH = NO \ |
---|
270 | GRAPHICAL_HIERARCHY = YES \ |
---|
271 | DOT_IMAGE_FORMAT = png \ |
---|
272 | DOT_PATH = \ |
---|
273 | DOTFILE_DIRS = \ |
---|
274 | MAX_DOT_GRAPH_WIDTH = 1024 \ |
---|
275 | MAX_DOT_GRAPH_HEIGHT = 1024 \ |
---|
276 | MAX_DOT_GRAPH_DEPTH = 0 \ |
---|
277 | GENERATE_LEGEND = YES \ |
---|
278 | DOT_CLEANUP = YES \ |
---|
279 | #--------------------------------------------------------------------------- \ |
---|
280 | # Configuration::additions related to the search engine \ |
---|
281 | #--------------------------------------------------------------------------- \ |
---|
282 | SEARCHENGINE = NO \ |
---|
283 | \ |
---|
284 | "; |
---|
285 | |
---|
286 | close DOXfile; |
---|
287 | |
---|
288 | print "==================================================================\n"; |
---|
289 | print "Generating Documentation of $processFiles\n"; |
---|
290 | print "==================================================================\n"; |
---|
291 | exec("doxygen $tempDoxFile"); |
---|
292 | |
---|
293 | |
---|
294 | unlink $tmpDoxFile; |
---|