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
pull/137/head
Andres Freund 2 years ago
parent f13eb16485
commit e522049f23
  1. 76
      meson.build
  2. 2
      src/backend/po/meson.build
  3. 2
      src/bin/initdb/po/meson.build
  4. 2
      src/bin/pg_amcheck/po/meson.build
  5. 2
      src/bin/pg_archivecleanup/po/meson.build
  6. 2
      src/bin/pg_basebackup/po/meson.build
  7. 2
      src/bin/pg_checksums/po/meson.build
  8. 2
      src/bin/pg_config/po/meson.build
  9. 2
      src/bin/pg_controldata/po/meson.build
  10. 2
      src/bin/pg_ctl/po/meson.build
  11. 2
      src/bin/pg_dump/po/meson.build
  12. 2
      src/bin/pg_resetwal/po/meson.build
  13. 2
      src/bin/pg_rewind/po/meson.build
  14. 2
      src/bin/pg_test_fsync/po/meson.build
  15. 2
      src/bin/pg_test_timing/po/meson.build
  16. 2
      src/bin/pg_upgrade/po/meson.build
  17. 2
      src/bin/pg_verifybackup/po/meson.build
  18. 2
      src/bin/pg_waldump/po/meson.build
  19. 2
      src/bin/psql/po/meson.build
  20. 2
      src/bin/scripts/po/meson.build
  21. 2
      src/interfaces/ecpg/ecpglib/po/meson.build
  22. 2
      src/interfaces/ecpg/preproc/po/meson.build
  23. 2
      src/interfaces/libpq/po/meson.build
  24. 4
      src/interfaces/libpq/test/meson.build
  25. 2
      src/pl/plperl/po/meson.build
  26. 2
      src/pl/plpgsql/src/po/meson.build
  27. 2
      src/pl/plpython/po/meson.build
  28. 2
      src/pl/tcl/po/meson.build

@ -2543,6 +2543,7 @@ bin_targets = []
pl_targets = [] pl_targets = []
contrib_targets = [] contrib_targets = []
testprep_targets = [] testprep_targets = []
nls_targets = []
# Define the tests to distribute them to the correct test styles later # Define the tests to distribute them to the correct test styles later
@ -2846,21 +2847,6 @@ generated_sources_ac += {'': ['GNUmakefile']}
testprep_targets += test_install_libs testprep_targets += test_install_libs
# command to install files used for tests, which aren't installed by default
install_test_files_args = [
install_files,
'--prefix', dir_prefix,
'--install', contrib_data_dir, test_install_data,
'--install', dir_lib_pkg, test_install_libs,
]
# Target installing files required for installcheck of various modules
run_target('install-test-files',
command: [python] + install_test_files_args,
depends: testprep_targets,
)
# If there are any files in the source directory that we also generate in the # If there are any files in the source directory that we also generate in the
# build directory, they might get preferred over the newly generated files, # build directory, they might get preferred over the newly generated files,
# e.g. because of a #include "file", which always will search in the current # e.g. because of a #include "file", which always will search in the current
@ -2915,6 +2901,64 @@ endif
###############################################################
# Install targets
###############################################################
# We want to define additional install targets beyond what meson provides. For
# that we need to define targets depending on nearly everything. We collected
# the results of i18n.gettext() invocations into nls_targets, that also
# includes maintainer targets though. Collect the ones we want as a dependency.
#
# i18n.gettext() doesn't return the dependencies before 0.60 - but the gettext
# generation happens during install, so that's not a real issue.
nls_mo_targets = []
if libintl.found() and meson.version().version_compare('>=0.60')
# use range() to avoid the flattening of the list that forech() would do
foreach off : range(0, nls_targets.length())
# i18n.gettext() list containing 1) list of built .mo files 2) maintainer
# -pot target 3) maintainer -pot target
nls_mo_targets += nls_targets[off][0]
endforeach
alias_target('nls', nls_mo_targets)
endif
all_built = [
backend_targets,
bin_targets,
libpq_st,
pl_targets,
contrib_targets,
nls_mo_targets,
testprep_targets,
ecpg_targets,
]
# Meson's default install target is quite verbose. Provide one that is quiet.
install_quiet = custom_target('install-quiet',
output: 'install-quiet',
build_always_stale: true,
build_by_default: false,
command: meson_args + ['install', '--quiet', '--no-rebuild'],
depends: all_built,
)
# Target to install files used for tests, which aren't installed by default
install_test_files_args = [
install_files,
'--prefix', dir_prefix,
'--install', contrib_data_dir, test_install_data,
'--install', dir_lib_pkg, test_install_libs,
]
run_target('install-test-files',
command: [python] + install_test_files_args,
depends: testprep_targets,
)
############################################################### ###############################################################
# Test prep # Test prep
############################################################### ###############################################################
@ -3185,6 +3229,7 @@ if meson.version().version_compare('>=0.57')
endif endif
############################################################### ###############################################################
# Pseudo targets # Pseudo targets
############################################################### ###############################################################
@ -3194,6 +3239,7 @@ alias_target('bin', bin_targets + [libpq_st])
alias_target('pl', pl_targets) alias_target('pl', pl_targets)
alias_target('contrib', contrib_targets) alias_target('contrib', contrib_targets)
alias_target('testprep', testprep_targets) alias_target('testprep', testprep_targets)
alias_target('install-world', install_quiet, installdocs)

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('postgres-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('postgres-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('initdb-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('initdb-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_amcheck-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_amcheck-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_archivecleanup-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_archivecleanup-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_basebackup-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_basebackup-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_checksums-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_checksums-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_config-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_config-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_controldata-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_controldata-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_ctl-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_ctl-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_dump-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_dump-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_resetwal-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_resetwal-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_rewind-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_rewind-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_test_fsync-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_test_fsync-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_test_timing-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_test_timing-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_upgrade-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_upgrade-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_verifybackup-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_verifybackup-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pg_waldump-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pg_waldump-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('psql-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('psql-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pgscripts-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pgscripts-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('ecpglib' + '6' + '-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('ecpglib' + '6' + '-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('ecpg-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('ecpg-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('libpq' + '5' + '-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('libpq' + '5' + '-' + pg_version_major.to_string())]

@ -10,7 +10,7 @@ if host_system == 'windows'
'--FILEDESC', 'libpq test program',]) '--FILEDESC', 'libpq test program',])
endif endif
executable('libpq_uri_regress', testprep_targets += executable('libpq_uri_regress',
libpq_uri_regress_sources, libpq_uri_regress_sources,
dependencies: [frontend_code, libpq], dependencies: [frontend_code, libpq],
kwargs: default_bin_args + { kwargs: default_bin_args + {
@ -29,7 +29,7 @@ if host_system == 'windows'
'--FILEDESC', 'libpq test program',]) '--FILEDESC', 'libpq test program',])
endif endif
executable('libpq_testclient', testprep_targets += executable('libpq_testclient',
libpq_testclient_sources, libpq_testclient_sources,
dependencies: [frontend_code, libpq], dependencies: [frontend_code, libpq],
kwargs: default_bin_args + { kwargs: default_bin_args + {

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('plperl-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('plperl-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('plpgsql-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('plpgsql-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('plpython-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('plpython-' + pg_version_major.to_string())]

@ -1,3 +1,3 @@
# Copyright (c) 2022-2023, PostgreSQL Global Development Group # Copyright (c) 2022-2023, PostgreSQL Global Development Group
i18n.gettext('pltcl-' + pg_version_major.to_string()) nls_targets += [i18n.gettext('pltcl-' + pg_version_major.to_string())]

Loading…
Cancel
Save