$mwPathM = $mwPath . 'maintenance/';
$mwPathS = $mwPath . 'skins/';
+/** Ignored paths relative to $mwPath */
+$mwExcludePaths = array(
+ 'images',
+ 'static',
+);
+
/** Variable to get user input */
$input = '';
-$exclude = '';
+$exclude_patterns = '';
#
# Functions
* @param $currentVersion String: Version number of the software
* @param $svnstat String: path to the svnstat file
* @param $input String: Path to analyze.
- * @param $exclude String: Additionals path regex to exclude
+ * @param $exclude_patterns String: Additionals path regex to exclude
* (LocalSettings.php, AdminSettings.php, .svn and .git directories are always excluded)
*/
-function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude ) {
+function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude_patterns ) {
$template = file_get_contents( $doxygenTemplate );
+ // Generate path exclusions
+ global $mwExcludePaths, $mwPath;
+ $excludedPaths = $mwPath . join( " $mwPath", $mwExcludePaths );
+ print "EXCLUDE: $excludedPaths\n\n";
+
// Replace template placeholders by correct values.
$replacements = array(
'{{OUTPUT_DIRECTORY}}' => $outputDirectory,
'{{CURRENT_VERSION}}' => $currentVersion,
'{{SVNSTAT}}' => $svnstat,
'{{INPUT}}' => $input,
- '{{EXCLUDE}}' => $exclude,
+ '{{EXCLUDE}}' => $excludedPaths,
+ '{{EXCLUDE_PATTERNS}}' => $exclude_patterns,
'{{HAVE_DOT}}' => `which dot` ? 'YES' : 'NO',
);
$tmpCfg = str_replace( array_keys( $replacements ), array_values( $replacements ), $template );
$input = $mwPath . $file;
case 6:
$input = $mwPath;
- $exclude = 'extensions';
+ $exclude_patterns = 'extensions';
}
$versionNumber = getSvnRevision( $input );
$version = "trunk (r$versionNumber)";
}
-$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input, $exclude );
+$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input, $exclude_patterns );
$command = $doxygenBin . ' ' . $generatedConf;
echo <<<TEXT