]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson/man: allow man pages to use multiple conditions
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 5 Mar 2024 13:41:17 +0000 (17:41 +0400)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 6 Mar 2024 09:55:01 +0000 (09:55 +0000)
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.

man/meson.build
man/rules/meson.build
man/systemd-bless-boot.service.xml
man/systemd-bsod.service.xml
man/systemd-journal-gatewayd.service.xml
man/systemd-journal-remote.service.xml
man/systemd-journal-upload.service.xml
man/systemd-pcrlock.xml
man/systemd-pcrphase.service.xml

index 403098a8149cb484da46904aa3d4ab9f9a6fb450..488ff7022093e30b076e25427030fc254c033431 100644 (file)
@@ -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.')
index e6d714ba7d5555b5b612e5fa6ceb12617bcfdcab..de8fbcca684b6b08c910121617f12532888dc105 100644 (file)
@@ -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',
index 069b33c281b8becdbd95ab10a173047f0684058a..043ee712540e3da7017797ecff12a9e29d3d832a 100644 (file)
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
-<refentry id="systemd-bless-boot.service" conditional='ENABLE_BOOTLOADER'
+<refentry id="systemd-bless-boot.service" conditional='ENABLE_BOOTLOADER HAVE_BLKID'
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
index 1726b7b5d0590b53aec2d77891560f123587acda..12667844853d6d9ce1e99b1756c476d05b5c81b1 100644 (file)
@@ -3,7 +3,8 @@
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
-<refentry id="systemd-bsod.service" conditional='HAVE_QRENCODE' xmlns:xi="http://www.w3.org/2001/XInclude">
+<refentry id="systemd-bsod.service" conditional='HAVE_QRENCODE ENABLE_INITRD'
+          xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <title>systemd-bsod</title>
index 106d8a0fa3cd987d4231bdb42dd5e0e5032f48d6..38adfe6b4e8a5efeb47db655c7985a626664c043 100644 (file)
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
-<refentry id="systemd-journal-gatewayd.service" conditional='HAVE_MICROHTTPD'
+<refentry id="systemd-journal-gatewayd.service" conditional='ENABLE_REMOTE HAVE_MICROHTTPD'
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
index a8e83967181ada7a04f51ce4a133a3fb76310698..a49ca126b5f1c522887ab369ed1b99634bb85a82 100644 (file)
@@ -6,7 +6,7 @@
 ]>
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
-<refentry id="systemd-journal-remote" conditional='HAVE_MICROHTTPD'
+<refentry id="systemd-journal-remote" conditional='ENABLE_REMOTE HAVE_MICROHTTPD'
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
index b8ee645402d6a44cc5d2c314c4c5b548ad292fdd..5bc843cd749289694e7b7af8128a002618566593 100644 (file)
@@ -6,7 +6,7 @@
 ]>
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
-<refentry id="systemd-journal-upload" conditional='HAVE_MICROHTTPD'
+<refentry id="systemd-journal-upload" conditional='ENABLE_REMOTE HAVE_LIBCURL'
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
index 48a23dbf641bddf7d7bac5ddfd664a31c51ca0d5..58907f728c54f985c2a8e64dd9bc5e0941ed8788 100644 (file)
@@ -3,7 +3,8 @@
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
-<refentry id="systemd-pcrlock" xmlns:xi="http://www.w3.org/2001/XInclude" conditional='HAVE_TPM2'>
+<refentry id="systemd-pcrlock" conditional='ENABLE_BOOTLOADER HAVE_OPENSSL HAVE_TPM2'
+          xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <title>systemd-pcrlock</title>
index 03de35487698ab165dec95aa5bdaf231d8bae1c0..e4ee09412731acf9effe479e66dea30ae65b49f6 100644 (file)
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
-<refentry id="systemd-pcrphase.service" conditional='ENABLE_BOOTLOADER'
+<refentry id="systemd-pcrphase.service" conditional='ENABLE_BOOTLOADER HAVE_OPENSSL HAVE_TPM2'
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>