man page help pages generation
[lhc/web/wiklou.git] / maintenance / mwdocgen.php
index 24d63c5..c68e426 100644 (file)
@@ -156,6 +156,8 @@ function getSvnRevision( $dir ) {
  */
 function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude, $exclude_patterns ) {
 
+       global $wgDoxyGenerateMan;
+
        $template = file_get_contents( $doxygenTemplate );
 
        // Replace template placeholders by correct values.
@@ -168,6 +170,7 @@ function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath,
                '{{EXCLUDE}}'          => $exclude,
                '{{EXCLUDE_PATTERNS}}' => $exclude_patterns,
                '{{HAVE_DOT}}'         => `which dot` ? 'YES' : 'NO',
+               '{{GENERATE_MAN}}'     => $wgDoxyGenerateMan ? 'YES' : 'NO',
        );
        $tmpCfg = str_replace( array_keys( $replacements ), array_values( $replacements ), $template );
        $tmpFileName = tempnam( wfTempDir(), 'mwdocgen-' );
@@ -204,6 +207,9 @@ if ( is_array( $argv ) ) {
                                $doxyOutput = realpath( $argv[$i] );
                        }
                        break;
+               case '--generate-man':
+                       $wgDoxyGenerateMan = true;
+                       break;
                case '--help':
                        print <<<END
 Usage: php mwdocgen.php [<command>] [<options>]
@@ -220,6 +226,7 @@ If no command is given, you will be prompted.
 
 Other options:
     --output <dir>  Set output directory (default $doxyOutput)
+    --generate-man  Generates man page documentation
     --help          Show this help and exit.