Thread: pgsql: meson: add install-{quiet, world} targets
meson: add install-{quiet, world} targets To define our own install target, we need dependencies on the i18n targets, which we did not collect so far. Discussion: https://postgr.es/m/3fc3bb9b-f7f8-d442-35c1-ec82280c564a@enterprisedb.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e522049f23998e64fd0b88cd66de8e8f42100bf1 Modified Files -------------- meson.build | 76 ++++++++++++++++++++++++------ src/backend/po/meson.build | 2 +- src/bin/initdb/po/meson.build | 2 +- src/bin/pg_amcheck/po/meson.build | 2 +- src/bin/pg_archivecleanup/po/meson.build | 2 +- src/bin/pg_basebackup/po/meson.build | 2 +- src/bin/pg_checksums/po/meson.build | 2 +- src/bin/pg_config/po/meson.build | 2 +- src/bin/pg_controldata/po/meson.build | 2 +- src/bin/pg_ctl/po/meson.build | 2 +- src/bin/pg_dump/po/meson.build | 2 +- src/bin/pg_resetwal/po/meson.build | 2 +- src/bin/pg_rewind/po/meson.build | 2 +- src/bin/pg_test_fsync/po/meson.build | 2 +- src/bin/pg_test_timing/po/meson.build | 2 +- src/bin/pg_upgrade/po/meson.build | 2 +- src/bin/pg_verifybackup/po/meson.build | 2 +- src/bin/pg_waldump/po/meson.build | 2 +- src/bin/psql/po/meson.build | 2 +- src/bin/scripts/po/meson.build | 2 +- src/interfaces/ecpg/ecpglib/po/meson.build | 2 +- src/interfaces/ecpg/preproc/po/meson.build | 2 +- src/interfaces/libpq/po/meson.build | 2 +- src/interfaces/libpq/test/meson.build | 4 +- src/pl/plperl/po/meson.build | 2 +- src/pl/plpgsql/src/po/meson.build | 2 +- src/pl/plpython/po/meson.build | 2 +- src/pl/tcl/po/meson.build | 2 +- 28 files changed, 89 insertions(+), 43 deletions(-)
On 2023-03-24 Fr 00:30, Andres Freund wrote:
meson: add install-{quiet, world} targets To define our own install target, we need dependencies on the i18n targets, which we did not collect so far. Discussion: https://postgr.es/m/3fc3bb9b-f7f8-d442-35c1-ec82280c564a@enterprisedb.com
For some reason that's not clear to me, this appears to have upset drongo, which complains like this:
pgsql\\meson.build:2941:0: ERROR: Program 'install' not found or not executable cheers andrew
-- Andrew Dunstan EDB: https://www.enterprisedb.com
Hi, On 2023-03-24 09:21:40 -0400, Andrew Dunstan wrote: > On 2023-03-24 Fr 00:30, Andres Freund wrote: > > meson: add install-{quiet, world} targets > > > > To define our own install target, we need dependencies on the i18n targets, > > which we did not collect so far. > > > > Discussion:https://postgr.es/m/3fc3bb9b-f7f8-d442-35c1-ec82280c564a@enterprisedb.com > > > > For some reason that's not clear to me, this appears to have upset drongo, > which complains like this: > > > pgsql\\meson.build:2941:0: ERROR: Program 'install' not found or not executable Oh - that's a legit bug on my side. Oops. It's only an accident it worked on other platforms. I forgot to add meson_bin to the command, which worked on other platforms because that'll commonly be just python (with the path to meson.py in the arguments), but on drongo it's meson.exe (leaving 'install' as the command). Pushed a fix. Greetings, Andres Freund
On Fri, Mar 24, 2023 at 04:30:52AM +0000, Andres Freund wrote: > meson: add install-{quiet, world} targets if docs.length() == 0 run_target('docs', command: [missing, 'xsltproc']) else alias_target('docs', docs) + alias_target('install-docs', installdocs) endif This fails to handle installdocs.length() == 0
Hi, On 2023-03-25 12:51:32 -0500, Justin Pryzby wrote: > On Fri, Mar 24, 2023 at 04:30:52AM +0000, Andres Freund wrote: > > meson: add install-{quiet, world} targets > > if docs.length() == 0 > run_target('docs', command: [missing, 'xsltproc']) > else > alias_target('docs', docs) > + alias_target('install-docs', installdocs) > endif > > This fails to handle installdocs.length() == 0 You mean in the sense of causing a failure in meson, or not providing the install-docs target? For the latter: Yea. I wasn't sure what the behaviour we'd want there. Should install-docs succeed if we don't have any of the tools? There's also an subdir_done() earlier on that we should probably remove... Greetings, Andres Freund
On Sat, Mar 25, 2023 at 11:03:10AM -0700, Andres Freund wrote: > Hi, > > On 2023-03-25 12:51:32 -0500, Justin Pryzby wrote: > > On Fri, Mar 24, 2023 at 04:30:52AM +0000, Andres Freund wrote: > > > meson: add install-{quiet, world} targets > > > > if docs.length() == 0 > > run_target('docs', command: [missing, 'xsltproc']) > > else > > alias_target('docs', docs) > > + alias_target('install-docs', installdocs) > > endif > > > > This fails to handle installdocs.length() == 0 > > You mean in the sense of causing a failure in meson, or not providing the > install-docs target? For the latter: Yea. I wasn't sure what the behaviour The former, I guess. I was going to look into the windows python header warnings, but the configure step failed like: [17:27:16.781] doc\src\sgml\meson.build:327:2: ERROR: alias_target takes at least 2 arguments, but got 1.
Hi, On 2023-03-25 13:05:19 -0500, Justin Pryzby wrote: > On Sat, Mar 25, 2023 at 11:03:10AM -0700, Andres Freund wrote: > > Hi, > > > > On 2023-03-25 12:51:32 -0500, Justin Pryzby wrote: > > > On Fri, Mar 24, 2023 at 04:30:52AM +0000, Andres Freund wrote: > > > > meson: add install-{quiet, world} targets > > > > > > if docs.length() == 0 > > > run_target('docs', command: [missing, 'xsltproc']) > > > else > > > alias_target('docs', docs) > > > + alias_target('install-docs', installdocs) > > > endif > > > > > > This fails to handle installdocs.length() == 0 > > > > You mean in the sense of causing a failure in meson, or not providing the > > install-docs target? For the latter: Yea. I wasn't sure what the behaviour > > The former, I guess. I was going to look into the windows python header > warnings, but the configure step failed like: > > [17:27:16.781] doc\src\sgml\meson.build:327:2: ERROR: alias_target takes at least 2 arguments, but got 1. Huh - I thought that wouldn't be possible, because docs would also be empty in that case. But it's not, because I added postgres-full.xml to docs (probably so you can see docs xml validity issues with just xmllint available). So "your" error happens if just xmllint, but not xsltproc is available. I think the easiest "fix" might be to just define install-docs to also include docs - that way install-docs at least checks the validity of xml, even if we can't build any docs. Greetings, Andres Freund