From: Zbigniew Jędrzejewski-Szmek Date: Tue, 5 Mar 2024 13:41:17 +0000 (+0400) Subject: meson/man: allow man pages to use multiple conditions X-Git-Tag: v256-rc1~629 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec3cf73f303cf99ba73c91b734401b3ad2c218e9;p=thirdparty%2Fsystemd.git meson/man: allow man pages to use multiple conditions This way the man pages are installed only when the corresponding binary is installed. The conditions in man pages and man/rules/meson.build are adjusted to match the conditions for units in units/meson.build. --- diff --git a/man/meson.build b/man/meson.build index 403098a8149..488ff702209 100644 --- a/man/meson.build +++ b/man/meson.build @@ -59,7 +59,15 @@ foreach tuple : manpages mandirn = get_option('mandir') / ('man' + section) - if condition == '' or conf.get(condition) == 1 + have = true + foreach word : condition.split() + if conf.get(word) != 1 + have = false + break + endif + endforeach + + if have file = files(tuple[0] + '.xml') source_xml_files += file if tuple[0].startswith('org.freedesktop.') diff --git a/man/rules/meson.build b/man/rules/meson.build index e6d714ba7d5..de8fbcca684 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -900,14 +900,14 @@ manpages = [ ['systemd-bless-boot.service', '8', ['systemd-bless-boot'], - 'ENABLE_BOOTLOADER'], + 'ENABLE_BOOTLOADER HAVE_BLKID'], ['systemd-boot-check-no-failures.service', '8', ['systemd-boot-check-no-failures'], ''], ['systemd-boot-random-seed.service', '8', [], 'ENABLE_BOOTLOADER'], ['systemd-boot', '7', ['sd-boot'], 'ENABLE_BOOTLOADER'], - ['systemd-bsod.service', '8', ['systemd-bsod'], 'HAVE_QRENCODE'], + ['systemd-bsod.service', '8', ['systemd-bsod'], 'HAVE_QRENCODE ENABLE_INITRD'], ['systemd-cat', '1', [], ''], ['systemd-cgls', '1', [], ''], ['systemd-cgtop', '1', [], ''], @@ -962,15 +962,15 @@ manpages = [ ['systemd-journal-gatewayd.service', '8', ['systemd-journal-gatewayd', 'systemd-journal-gatewayd.socket'], - 'HAVE_MICROHTTPD'], + 'ENABLE_REMOTE HAVE_MICROHTTPD'], ['systemd-journal-remote.service', '8', ['systemd-journal-remote', 'systemd-journal-remote.socket'], - 'HAVE_MICROHTTPD'], + 'ENABLE_REMOTE HAVE_MICROHTTPD'], ['systemd-journal-upload.service', '8', ['systemd-journal-upload'], - 'HAVE_MICROHTTPD'], + 'ENABLE_REMOTE HAVE_LIBCURL'], ['systemd-journald.service', '8', ['systemd-journald', @@ -1016,7 +1016,7 @@ manpages = [ 'systemd-pcrlock-make-policy.service', 'systemd-pcrlock-secureboot-authority.service', 'systemd-pcrlock-secureboot-policy.service'], - 'HAVE_TPM2'], + 'ENABLE_BOOTLOADER HAVE_OPENSSL HAVE_TPM2'], ['systemd-pcrphase.service', '8', ['systemd-pcrextend', @@ -1025,7 +1025,7 @@ manpages = [ 'systemd-pcrmachine.service', 'systemd-pcrphase-initrd.service', 'systemd-pcrphase-sysinit.service'], - 'ENABLE_BOOTLOADER'], + 'ENABLE_BOOTLOADER HAVE_OPENSSL HAVE_TPM2'], ['systemd-portabled.service', '8', ['systemd-portabled'], 'ENABLE_PORTABLED'], ['systemd-poweroff.service', '8', diff --git a/man/systemd-bless-boot.service.xml b/man/systemd-bless-boot.service.xml index 069b33c281b..043ee712540 100644 --- a/man/systemd-bless-boot.service.xml +++ b/man/systemd-bless-boot.service.xml @@ -3,7 +3,7 @@ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> - diff --git a/man/systemd-bsod.service.xml b/man/systemd-bsod.service.xml index 1726b7b5d05..12667844853 100644 --- a/man/systemd-bsod.service.xml +++ b/man/systemd-bsod.service.xml @@ -3,7 +3,8 @@ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> - + systemd-bsod diff --git a/man/systemd-journal-gatewayd.service.xml b/man/systemd-journal-gatewayd.service.xml index 106d8a0fa3c..38adfe6b4e8 100644 --- a/man/systemd-journal-gatewayd.service.xml +++ b/man/systemd-journal-gatewayd.service.xml @@ -3,7 +3,7 @@ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> - diff --git a/man/systemd-journal-remote.service.xml b/man/systemd-journal-remote.service.xml index a8e83967181..a49ca126b5f 100644 --- a/man/systemd-journal-remote.service.xml +++ b/man/systemd-journal-remote.service.xml @@ -6,7 +6,7 @@ ]> - diff --git a/man/systemd-journal-upload.service.xml b/man/systemd-journal-upload.service.xml index b8ee645402d..5bc843cd749 100644 --- a/man/systemd-journal-upload.service.xml +++ b/man/systemd-journal-upload.service.xml @@ -6,7 +6,7 @@ ]> - diff --git a/man/systemd-pcrlock.xml b/man/systemd-pcrlock.xml index 48a23dbf641..58907f728c5 100644 --- a/man/systemd-pcrlock.xml +++ b/man/systemd-pcrlock.xml @@ -3,7 +3,8 @@ - + systemd-pcrlock diff --git a/man/systemd-pcrphase.service.xml b/man/systemd-pcrphase.service.xml index 03de3548769..e4ee0941273 100644 --- a/man/systemd-pcrphase.service.xml +++ b/man/systemd-pcrphase.service.xml @@ -3,7 +3,7 @@ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> -