Hi, On Mon, 16 Feb 2026 at 13:49, Hayato Kuroda (Fujitsu) <[email protected]> wrote: > > Dear Nazir, > > > I see your point but the suggested change actually doesn't affect C > > files' compilation. They are still built although you make this > > change, AFAIK this is how meson build works. > > Did you say that C files would be anyway built even after applying my change? > I don't think so - I have verified that only needed documents were built with > the `meson test --suite doc` command after I modified meson.build. > > ``` > $ ninja clean > [2/2] Cleaning > Cleaning... 8 files. > $ meson test --suite doc > ninja: Entering directory `/home/hayato/builddir' > [8/8] Generating doc/src/sgml/postgres-full.xml with a custom command > // only 8 files are generated > 1/1 postgresql:doc / doc/sgml_syntax_check OK 0.38s > > Ok: 1 > Expected Fail: 0 > Fail: 0 > Unexpected Pass: 0 > Skipped: 0 > Timeout: 0 > > Full log written to /home/hayato/builddir/meson-logs/testlog.txt > ```
I think we might be using different meson versions, which could explain the difference. I am currently using meson v1.7.0. 1) With meson v1.7.0, it builds all files regardless of whether "depends: postgres_full_xml" is added. 2) I also tested this manually and noticed a different behavior starting from meson v1.9.2. In these versions, meson does not build unnecessary files, whether "depends: postgres_full_xml" is added: meson v1.9.1 without "depends: postgres_full_xml": ``` $ ninja clean && meson test --suite doc [2/2] Cleaning Cleaning... 0 files. ninja: Entering directory `/home/nbyavuz/Desktop/projects/postgres/build' [2551/2551] Linking target src/backend/postgres 1/1 postgresql:doc / doc/sgml_syntax_check OK 0.61s Ok: 1 Fail: 0 ``` ------------------------------ meson v1.9.1 with "depends: postgres_full_xml", please note that 8 extra files are compiled because of postgres_full_xml [1]: ``` $ ninja clean && meson test --suite doc [2/2] Cleaning Cleaning... 0 files. ninja: Entering directory `/home/nbyavuz/Desktop/projects/postgres/build' [2559/2559] Linking target src/backend/postgres 1/1 postgresql:doc / doc/sgml_syntax_check OK 0.18s Ok: 1 Fail: 0 ``` ------------------------------ meson v1.9.2 without "depends: postgres_full_xml": ``` $ ninja clean && meson test --suite doc [2/2] Cleaning Cleaning... 8 files. 1/1 doc - postgresql:doc/sgml_syntax_check OK 0.61s Ok: 1 Fail: 0 ``` ------------------------------ $ meson v1.9.2 with "depends: postgres_full_xml", please note that 8 extra files are compiled because of postgres_full_xml [1]: `` ninja clean && meson test --suite doc [2/2] Cleaning Cleaning... 8 files. ninja: Entering directory `/home/nbyavuz/Desktop/projects/postgres/build' [8/8] Generating doc/src/sgml/postgres-full.xml with a custom command <- The difference [1] 1/1 doc - postgresql:doc/sgml_syntax_check OK 0.18s Ok: 1 Fail: 0 ``` ------------------------------ If my observation is correct, it seems there may be no need to add "depends: postgres_full_xml", since the test itself is about compiling 'postgres_full_xml', and it doesn’t need to be built separately beforehand [1]. Please let me know if you are seeing something different on your side. -- Regards, Nazir Bilal Yavuz Microsoft
