From fe2ce5ca913772817d26ce5463ee611b56e2d2f9 Mon Sep 17 00:00:00 2001 From: lacatoire Date: Thu, 16 Jul 2026 10:04:59 +0200 Subject: [PATCH] Use a language directory's manual.xml when present Let a language directory ship its own manual.xml to build a self-contained manual that references only its own books, instead of the main manual skeleton in doc-base. Falls back to the doc-base manual.xml when absent, so existing builds are unaffected. --- configure.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.php b/configure.php index 1a07591639..b14e2aa085 100755 --- a/configure.php +++ b/configure.php @@ -674,7 +674,19 @@ function dom_saveload( DOMDocument $dom , string $filename = "" ) : string echo "Creating monolithic temp/manual.xml... "; $dom = new DOMDocument(); -if ( dom_load( $dom , "{$ac['srcdir']}/{$ac["INPUT_FILENAME"]}" ) ) +// A language directory may ship its own manual.xml to build a self-contained +// manual (e.g. the third-party extension manual) that references only its own +// books, instead of the main manual skeleton in doc-base. When absent, the +// default doc-base manual.xml is used, so existing builds are unaffected. +$input_manual = "{$ac['srcdir']}/{$ac["INPUT_FILENAME"]}"; +$lang_manual = "{$LANGDIR}/{$ac["INPUT_FILENAME"]}"; +if ( file_exists( $lang_manual ) ) +{ + echo "using {$ac['LANG']}/{$ac["INPUT_FILENAME"]}... "; + $input_manual = $lang_manual; +} + +if ( dom_load( $dom , $input_manual ) ) { dom_saveload( $dom ); // correct file/line/column on error messages echo " done.\n";