Index: trunk/phase3/maintenance/mwdocgen.php |
— | — | @@ -156,6 +156,8 @@ |
157 | 157 | */ |
158 | 158 | function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude, $exclude_patterns ) { |
159 | 159 | |
| 160 | + global $wgDoxyGenerateMan; |
| 161 | + |
160 | 162 | $template = file_get_contents( $doxygenTemplate ); |
161 | 163 | |
162 | 164 | // Replace template placeholders by correct values. |
— | — | @@ -168,6 +170,7 @@ |
169 | 171 | '{{EXCLUDE}}' => $exclude, |
170 | 172 | '{{EXCLUDE_PATTERNS}}' => $exclude_patterns, |
171 | 173 | '{{HAVE_DOT}}' => `which dot` ? 'YES' : 'NO', |
| 174 | + '{{GENERATE_MAN}}' => $wgDoxyGenerateMan ? 'YES' : 'NO', |
172 | 175 | ); |
173 | 176 | $tmpCfg = str_replace( array_keys( $replacements ), array_values( $replacements ), $template ); |
174 | 177 | $tmpFileName = tempnam( wfTempDir(), 'mwdocgen-' ); |
— | — | @@ -204,6 +207,9 @@ |
205 | 208 | $doxyOutput = realpath( $argv[$i] ); |
206 | 209 | } |
207 | 210 | break; |
| 211 | + case '--generate-man': |
| 212 | + $wgDoxyGenerateMan = true; |
| 213 | + break; |
208 | 214 | case '--help': |
209 | 215 | print <<<END |
210 | 216 | Usage: php mwdocgen.php [<command>] [<options>] |
— | — | @@ -220,6 +226,7 @@ |
221 | 227 | |
222 | 228 | Other options: |
223 | 229 | --output <dir> Set output directory (default $doxyOutput) |
| 230 | + --generate-man Generates man page documentation |
224 | 231 | --help Show this help and exit. |
225 | 232 | |
226 | 233 | |
Index: trunk/phase3/maintenance/Doxyfile |
— | — | @@ -207,7 +207,7 @@ |
208 | 208 | #--------------------------------------------------------------------------- |
209 | 209 | # configuration options related to the man page output |
210 | 210 | #--------------------------------------------------------------------------- |
211 | | -GENERATE_MAN = NO |
| 211 | +GENERATE_MAN = {{GENERATE_MAN}} |
212 | 212 | MAN_OUTPUT = man |
213 | 213 | MAN_EXTENSION = .3 |
214 | 214 | MAN_LINKS = NO |
Index: trunk/phase3/maintenance/Makefile |
— | — | @@ -1,6 +1,7 @@ |
2 | 2 | help: |
3 | 3 | @echo "Run 'make test' to run the parser tests." |
4 | 4 | @echo "Run 'make doc' to run the doxygen generation." |
| 5 | + @echo "Run 'make man' to run the doxygen generation with man pages." |
5 | 6 | |
6 | 7 | test: |
7 | 8 | php tests/parserTests.php --quiet |
— | — | @@ -8,3 +9,9 @@ |
9 | 10 | doc: |
10 | 11 | php mwdocgen.php --all |
11 | 12 | @echo 'Doc generation done. Look at ./docs/html/' |
| 13 | + |
| 14 | +man: |
| 15 | + php mwdocgen.php --all --generate-man |
| 16 | + @echo 'Doc generation done. Look at ./docs/html/ and ./docs/man' |
| 17 | + @echo 'You might want to update your MANPATH currently:' |
| 18 | + @echo 'MANPATH: $(MANPATH)' |