doxygen filter need to use a full path
authorAntoine Musso <hashar@free.fr>
Thu, 2 Aug 2012 14:19:27 +0000 (16:19 +0200)
committerAntoine Musso <hashar@free.fr>
Thu, 2 Aug 2012 14:20:52 +0000 (16:20 +0200)
When running mwdocgen.php outside of maintenance, the input filter was
not found. Giving the full path fix the issue.

Issue introduced by I4ead1bd1 / ab59fad.

Change-Id: I5e28209eba1afd24d60b2dc940b9f5dfb1b4f34c

maintenance/Doxyfile
maintenance/mwdocgen.php

index e0868bf..b60a196 100644 (file)
@@ -182,7 +182,7 @@ EXAMPLE_PATH           =
 EXAMPLE_PATTERNS       = *
 EXAMPLE_RECURSIVE      = NO
 IMAGE_PATH             =
-INPUT_FILTER           = "php mwdoc-filter.php"
+INPUT_FILTER           = "{{INPUT_FILTER}}"
 FILTER_PATTERNS        =
 FILTER_SOURCE_FILES    = NO
 FILTER_SOURCE_PATTERNS =
index 2edeaba..a59ba17 100644 (file)
@@ -57,6 +57,9 @@ $doxygenBin = 'doxygen';
 /** doxygen configuration template for mediawiki */
 $doxygenTemplate = $mwPath . 'maintenance/Doxyfile';
 
+/** doxygen input filter to tweak source file before they are parsed */
+$doxygenInputFilter = "php {$mwPath}maintenance/mwdoc-filter.php";
+
 /** svnstat command, used to get the version of each file */
 $svnstat = $mwPath . 'bin/svnstat';
 
@@ -134,9 +137,9 @@ function getSvnRevision( $dir ) {
  * @return string
  */
 function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude, $excludePatterns, $doxyGenerateMan ) {
+       global $doxygenInputFilter;
 
        $template = file_get_contents( $doxygenTemplate );
-
        // Replace template placeholders by correct values.
        $replacements = array(
                '{{OUTPUT_DIRECTORY}}' => $outputDirectory,
@@ -148,6 +151,7 @@ function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath,
                '{{EXCLUDE_PATTERNS}}' => $excludePatterns,
                '{{HAVE_DOT}}'         => `which dot` ? 'YES' : 'NO',
                '{{GENERATE_MAN}}'     => $doxyGenerateMan ? 'YES' : 'NO',
+               '{{INPUT_FILTER}}'     => $doxygenInputFilter,
        );
        $tmpCfg = str_replace( array_keys( $replacements ), array_values( $replacements ), $template );
        $tmpFileName = tempnam( wfTempDir(), 'mwdocgen-' );