<?php
/**
- * Script to easily generate the mediawiki documentation using doxygen.
+ * Generate class and file reference documentation for MediaWiki using doxygen.
*
- * By default it will generate the whole documentation but you will be able to
- * generate just some parts.
+ * If the dot DOT language processor is available, attempt call graph
+ * generation.
*
* Usage:
* php mwdocgen.php
*
- * Then make a selection from the menu
- *
* KNOWN BUGS:
*
* - pass_thru seems to always use buffering (even with ob_implicit_flush()),
#
if ( php_sapi_name() != 'cli' ) {
- echo 'Run me from the command line.';
+ echo 'Run "' . __FILE__ . '" from the command line.';
die( -1 );
}
$svnstat = $mwPath . 'bin/svnstat';
/** where Phpdoc should output documentation */
-# $doxyOutput = '/var/www/mwdoc/';
$doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ;
/** MediaWiki subpaths */
* @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 exlcude
+ * @param $exclude 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 ) {
'{{SVNSTAT}}' => $svnstat,
'{{INPUT}}' => $input,
'{{EXCLUDE}}' => $exclude,
+ '{{HAVE_DOT}}' => `which dot` ? 'YES' : 'NO',
);
$tmpCfg = str_replace( array_keys( $replacements ), array_values( $replacements ), $template );
$tmpFileName = tempnam( wfTempDir(), 'mwdocgen-' );