Index: trunk/phase3/maintenance/mwdocgen.php |
— | — | @@ -69,9 +69,15 @@ |
70 | 70 | $mwPathM = $mwPath . 'maintenance/'; |
71 | 71 | $mwPathS = $mwPath . 'skins/'; |
72 | 72 | |
| 73 | +/** Ignored paths relative to $mwPath */ |
| 74 | +$mwExcludePaths = array( |
| 75 | + 'images', |
| 76 | + 'static', |
| 77 | +); |
| 78 | + |
73 | 79 | /** Variable to get user input */ |
74 | 80 | $input = ''; |
75 | | -$exclude = ''; |
| 81 | +$exclude_patterns = ''; |
76 | 82 | |
77 | 83 | # |
78 | 84 | # Functions |
— | — | @@ -142,13 +148,18 @@ |
143 | 149 | * @param $currentVersion String: Version number of the software |
144 | 150 | * @param $svnstat String: path to the svnstat file |
145 | 151 | * @param $input String: Path to analyze. |
146 | | - * @param $exclude String: Additionals path regex to exclude |
| 152 | + * @param $exclude_patterns String: Additionals path regex to exclude |
147 | 153 | * (LocalSettings.php, AdminSettings.php, .svn and .git directories are always excluded) |
148 | 154 | */ |
149 | | -function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude ) { |
| 155 | +function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude_patterns ) { |
150 | 156 | |
151 | 157 | $template = file_get_contents( $doxygenTemplate ); |
152 | 158 | |
| 159 | + // Generate path exclusions |
| 160 | + global $mwExcludePaths, $mwPath; |
| 161 | + $excludedPaths = $mwPath . join( " $mwPath", $mwExcludePaths ); |
| 162 | + print "EXCLUDE: $excludedPaths\n\n"; |
| 163 | + |
153 | 164 | // Replace template placeholders by correct values. |
154 | 165 | $replacements = array( |
155 | 166 | '{{OUTPUT_DIRECTORY}}' => $outputDirectory, |
— | — | @@ -156,7 +167,8 @@ |
157 | 168 | '{{CURRENT_VERSION}}' => $currentVersion, |
158 | 169 | '{{SVNSTAT}}' => $svnstat, |
159 | 170 | '{{INPUT}}' => $input, |
160 | | - '{{EXCLUDE}}' => $exclude, |
| 171 | + '{{EXCLUDE}}' => $excludedPaths, |
| 172 | + '{{EXCLUDE_PATTERNS}}' => $exclude_patterns, |
161 | 173 | '{{HAVE_DOT}}' => `which dot` ? 'YES' : 'NO', |
162 | 174 | ); |
163 | 175 | $tmpCfg = str_replace( array_keys( $replacements ), array_values( $replacements ), $template ); |
— | — | @@ -224,7 +236,7 @@ |
225 | 237 | $input = $mwPath . $file; |
226 | 238 | case 6: |
227 | 239 | $input = $mwPath; |
228 | | - $exclude = 'extensions'; |
| 240 | + $exclude_patterns = 'extensions'; |
229 | 241 | } |
230 | 242 | |
231 | 243 | $versionNumber = getSvnRevision( $input ); |
— | — | @@ -235,7 +247,7 @@ |
236 | 248 | $version = "trunk (r$versionNumber)"; |
237 | 249 | } |
238 | 250 | |
239 | | -$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input, $exclude ); |
| 251 | +$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input, $exclude_patterns ); |
240 | 252 | $command = $doxygenBin . ' ' . $generatedConf; |
241 | 253 | |
242 | 254 | echo <<<TEXT |
Index: trunk/phase3/maintenance/Doxyfile |
— | — | @@ -134,9 +134,9 @@ |
135 | 135 | *.MM \ |
136 | 136 | *.PY |
137 | 137 | RECURSIVE = YES |
138 | | -EXCLUDE = |
| 138 | +EXCLUDE = {{EXCLUDE}} |
139 | 139 | EXCLUDE_SYMLINKS = YES |
140 | | -EXCLUDE_PATTERNS = LocalSettings.php AdminSettings.php StartProfiler.php .svn */.git/* {{EXCLUDE}} |
| 140 | +EXCLUDE_PATTERNS = LocalSettings.php AdminSettings.php StartProfiler.php .svn */.git/* {{EXCLUDE_PATTERNS}} |
141 | 141 | EXAMPLE_PATH = |
142 | 142 | EXAMPLE_PATTERNS = * |
143 | 143 | EXAMPLE_RECURSIVE = NO |