#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
-GENERATE_MAN = NO
+GENERATE_MAN = {{GENERATE_MAN}}
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
help:
@echo "Run 'make test' to run the parser tests."
@echo "Run 'make doc' to run the doxygen generation."
+ @echo "Run 'make man' to run the doxygen generation with man pages."
test:
php tests/parserTests.php --quiet
doc:
php mwdocgen.php --all
@echo 'Doc generation done. Look at ./docs/html/'
+
+man:
+ php mwdocgen.php --all --generate-man
+ @echo 'Doc generation done. Look at ./docs/html/ and ./docs/man'
+ @echo 'You might want to update your MANPATH currently:'
+ @echo 'MANPATH: $(MANPATH)'
*/
function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude, $exclude_patterns ) {
+ global $wgDoxyGenerateMan;
+
$template = file_get_contents( $doxygenTemplate );
// Replace template placeholders by correct values.
'{{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-' );
$doxyOutput = realpath( $argv[$i] );
}
break;
+ case '--generate-man':
+ $wgDoxyGenerateMan = true;
+ break;
case '--help':
print <<<END
Usage: php mwdocgen.php [<command>] [<options>]
Other options:
--output <dir> Set output directory (default $doxyOutput)
+ --generate-man Generates man page documentation
--help Show this help and exit.