*(bug 26404) Enable call graphs for doxygen-generated doc
authorSam Reed <reedy@users.mediawiki.org>
Mon, 27 Dec 2010 16:56:50 +0000 (16:56 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 27 Dec 2010 16:56:50 +0000 (16:56 +0000)
maintenance/Doxyfile
maintenance/mwdocgen.php

index b1a1b7a..54af6e0 100644 (file)
@@ -255,7 +255,7 @@ PERL_PATH              = /usr/bin/perl
 #---------------------------------------------------------------------------
 CLASS_DIAGRAMS         = NO
 HIDE_UNDOC_RELATIONS   = YES
-HAVE_DOT               = NO
+HAVE_DOT               = {{HAVE_DOT}}
 CLASS_GRAPH            = YES
 COLLABORATION_GRAPH    = YES
 GROUP_GRAPHS           = YES
index a414e39..9fceeb2 100644 (file)
@@ -1,15 +1,13 @@
 <?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()),
@@ -46,7 +44,7 @@
 #
 
 if ( php_sapi_name() != 'cli' ) {
-       echo 'Run me from the command line.';
+       echo 'Run "' . __FILE__ . '" from the command line.';
        die( -1 );
 }
 
@@ -63,7 +61,6 @@ $doxygenTemplate = $mwPath . 'maintenance/Doxyfile';
 $svnstat = $mwPath . 'bin/svnstat';
 
 /** where Phpdoc should output documentation */
-# $doxyOutput = '/var/www/mwdoc/';
 $doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ;
 
 /** MediaWiki subpaths */
@@ -145,7 +142,7 @@ function getSvnRevision( $dir ) {
  * @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 ) {
@@ -160,6 +157,7 @@ function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath,
                '{{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-' );