]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
various: check meson feature flag early
authorMike Yuan <me@yhndnzj.com>
Tue, 12 Nov 2024 18:30:38 +0000 (19:30 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 12 Nov 2024 23:21:33 +0000 (08:21 +0900)
Prompted by https://github.com/systemd/systemd/pull/35110#discussion_r1835885340

20 files changed:
src/binfmt/meson.build
src/cryptenroll/meson.build
src/cryptsetup/meson.build
src/dissect/meson.build
src/environment-d-generator/meson.build
src/hibernate-resume/meson.build
src/home/meson.build
src/hostname/meson.build
src/integritysetup/meson.build
src/modules-load/meson.build
src/mountfsd/meson.build
src/nsresourced/meson.build
src/pcrlock/meson.build
src/portable/meson.build
src/pstore/meson.build
src/repart/meson.build
src/sysusers/meson.build
src/tpm2-setup/meson.build
src/veritysetup/meson.build
src/vmspawn/meson.build

index 44963409bc84b48426610464767c89d570b82b2c..fc8385b2c06e84aaefb07c78ca5104441c60f234 100644 (file)
@@ -1,17 +1,18 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('ENABLE_BINFMT') != 1
+        subdir_done()
+endif
+
 executables += [
         libexec_template + {
                 'name' : 'systemd-binfmt',
                 'public' : true,
-                'conditions' : ['ENABLE_BINFMT'],
                 'sources' : files('binfmt.c'),
         },
 ]
 
-if conf.get('ENABLE_BINFMT') == 1
-        install_emptydir(binfmtdir)
-        if install_sysconfdir
-                install_emptydir(sysconfdir / 'binfmt.d')
-        endif
+install_emptydir(binfmtdir)
+if install_sysconfdir
+        install_emptydir(sysconfdir / 'binfmt.d')
 endif
index 5374d65aba6cb41c37577d28de37742d158ec0bc..902d91cb9431375d478431640ba3a9b5fcce9e2d 100644 (file)
@@ -1,5 +1,9 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('HAVE_LIBCRYPTSETUP') != 1
+        subdir_done()
+endif
+
 systemd_cryptenroll_sources = files(
         'cryptenroll-list.c',
         'cryptenroll-password.c',
@@ -24,7 +28,6 @@ executables += [
         executable_template + {
                 'name' : 'systemd-cryptenroll',
                 'public' : true,
-                'conditions' : ['HAVE_LIBCRYPTSETUP'],
                 'sources' : systemd_cryptenroll_sources,
                 'dependencies' : [
                         libcryptsetup,
index 9ccc0982b59c347d4ff9894a4a678d9cad006cd9..ad60190e7442e2d38964446b3fdb628e66fa7ff1 100644 (file)
@@ -1,5 +1,9 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('HAVE_LIBCRYPTSETUP') != 1
+        subdir_done()
+endif
+
 subdir('cryptsetup-tokens')
 
 systemd_cryptsetup_sources = files(
@@ -15,7 +19,6 @@ executables += [
         executable_template + {
                 'name' : 'systemd-cryptsetup',
                 'public' : true,
-                'conditions' : ['HAVE_LIBCRYPTSETUP'],
                 'sources' : systemd_cryptsetup_sources,
                 'dependencies' : [
                         libcryptsetup,
@@ -25,14 +28,11 @@ executables += [
         },
         generator_template + {
                 'name' : 'systemd-cryptsetup-generator',
-                'conditions' : ['HAVE_LIBCRYPTSETUP'],
                 'sources' : files('cryptsetup-generator.c'),
         },
 ]
 
-if conf.get('HAVE_LIBCRYPTSETUP') == 1
-        # symlink for backwards compatibility after rename
-        meson.add_install_script(sh, '-c',
-                                 ln_s.format(bindir / 'systemd-cryptsetup',
-                                             libexecdir / 'systemd-cryptsetup'))
-endif
+# symlink for backwards compatibility after rename
+meson.add_install_script(sh, '-c',
+                         ln_s.format(bindir / 'systemd-cryptsetup',
+                                     libexecdir / 'systemd-cryptsetup'))
index e422dbdd27b22d591602b5f1153426447e3ccf1f..7e7a089b443c9d28ba786c4613deed8c2c367a2a 100644 (file)
@@ -1,17 +1,18 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('HAVE_BLKID') != 1
+        subdir_done()
+endif
+
 executables += [
         executable_template + {
                 'name' : 'systemd-dissect',
                 'public' : true,
-                'conditions' : ['HAVE_BLKID'],
                 'sources' : files('dissect.c'),
         },
 ]
 
-if conf.get('HAVE_BLKID') == 1
-        install_emptydir(sbindir)
-        meson.add_install_script(sh, '-c',
-                                 ln_s.format(bindir / 'systemd-dissect',
-                                             sbindir / 'mount.ddi'))
-endif
+install_emptydir(sbindir)
+meson.add_install_script(sh, '-c',
+                         ln_s.format(bindir / 'systemd-dissect',
+                                     sbindir / 'mount.ddi'))
index 346be05bd0204f53d34747bc122e5848586ab566..cc41b6b334ddbf44097a7029653646b203a35f52 100644 (file)
@@ -1,17 +1,18 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('ENABLE_ENVIRONMENT_D') != 1
+        subdir_done()
+endif
+
 executables += [
         executable_template + {
                 'name' : '30-systemd-environment-d-generator',
-                'conditions' : ['ENABLE_ENVIRONMENT_D'],
                 'sources' : files('environment-d-generator.c'),
                 'install_dir' : userenvgeneratordir,
         },
 ]
 
-if conf.get('ENABLE_ENVIRONMENT_D') == 1
-        install_emptydir(environmentdir)
-        meson.add_install_script(sh, '-c',
-                                 ln_s.format(sysconfdir / 'environment',
-                                             environmentdir / '99-environment.conf'))
-endif
+install_emptydir(environmentdir)
+meson.add_install_script(sh, '-c',
+                         ln_s.format(sysconfdir / 'environment',
+                                     environmentdir / '99-environment.conf'))
index 5bcd8e02a8983ed902dea7487c32d6472da0261e..ce3430d2c3c579d64954e13af84fc49bfd454444 100644 (file)
@@ -1,9 +1,12 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('ENABLE_HIBERNATE') != 1
+        subdir_done()
+endif
+
 executables += [
         generator_template + {
                 'name' : 'systemd-hibernate-resume-generator',
-                'conditions' : ['ENABLE_HIBERNATE'],
                 'sources' : files(
                         'hibernate-resume-generator.c',
                         'hibernate-resume-config.c',
@@ -11,7 +14,6 @@ executables += [
         },
         libexec_template + {
                 'name' : 'systemd-hibernate-resume',
-                'conditions' : ['ENABLE_HIBERNATE'],
                 'sources' : files(
                         'hibernate-resume.c',
                         'hibernate-resume-config.c',
index f573c5fb15af69ac57f25f45373293a75d768750..da34c418fa7efdaa4f2a7cb11f90ef09a5b6d486 100644 (file)
@@ -1,5 +1,9 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('ENABLE_HOMED') != 1
+        subdir_done()
+endif
+
 systemd_homework_sources = files(
         'home-util.c',
         'homework-blob.c',
@@ -64,7 +68,6 @@ pam_systemd_home_sources = files(
 executables += [
         libexec_template + {
                 'name' : 'systemd-homework',
-                'conditions' : ['ENABLE_HOMED'],
                 'sources' : systemd_homework_sources,
                 'link_with' : [
                         libshared,
@@ -82,7 +85,6 @@ executables += [
         libexec_template + {
                 'name' : 'systemd-homed',
                 'dbus' : true,
-                'conditions' : ['ENABLE_HOMED'],
                 'sources' : systemd_homed_sources,
                 'include_directories' : includes +
                                         include_directories('.'),
@@ -96,7 +98,6 @@ executables += [
         executable_template + {
                 'name' : 'homectl',
                 'public' : true,
-                'conditions' : ['ENABLE_HOMED'],
                 'sources' : homectl_sources,
                 'dependencies' : [
                         libcrypt,
@@ -108,7 +109,6 @@ executables += [
         },
         test_template + {
                 'sources' : files('test-homed-regression-31896.c'),
-                'conditions' : ['ENABLE_HOMED'],
                 'type' : 'manual',
         },
 ]
@@ -116,10 +116,7 @@ executables += [
 modules += [
         pam_template + {
                 'name' : 'pam_systemd_home',
-                'conditions' : [
-                        'ENABLE_HOMED',
-                        'HAVE_PAM',
-                ],
+                'conditions' : ['HAVE_PAM'],
                 'sources' : pam_systemd_home_sources,
                 'dependencies' : [
                         libcrypt,
@@ -131,20 +128,18 @@ modules += [
         },
 ]
 
-if conf.get('ENABLE_HOMED') == 1
-        install_data('org.freedesktop.home1.conf',
-                     install_dir : dbuspolicydir)
-        install_data('org.freedesktop.home1.service',
-                     install_dir : dbussystemservicedir)
-        install_data('org.freedesktop.home1.policy',
-                     install_dir : polkitpolicydir)
+install_data('org.freedesktop.home1.conf',
+             install_dir : dbuspolicydir)
+install_data('org.freedesktop.home1.service',
+             install_dir : dbussystemservicedir)
+install_data('org.freedesktop.home1.policy',
+             install_dir : polkitpolicydir)
 
-        if install_sysconfdir_samples
-                install_data('homed.conf',
-                             install_dir : pkgconfigfiledir)
-        endif
-
-        meson.add_install_script(sh, '-c',
-                                 ln_s.format(bindir / 'homectl',
-                                             bindir / 'systemd-home-fallback-shell'))
+if install_sysconfdir_samples
+        install_data('homed.conf',
+                     install_dir : pkgconfigfiledir)
 endif
+
+meson.add_install_script(sh, '-c',
+                         ln_s.format(bindir / 'homectl',
+                                     bindir / 'systemd-home-fallback-shell'))
index 27c9b842099ee1461444b726e1b90f660e67f05a..6c8ae854c496da8929c4cf2cd10e48e8de2069ba 100644 (file)
@@ -1,25 +1,25 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('ENABLE_HOSTNAMED') != 1
+        subdir_done()
+endif
+
 executables += [
         libexec_template + {
                 'name' : 'systemd-hostnamed',
                 'dbus' : true,
-                'conditions' : ['ENABLE_HOSTNAMED'],
                 'sources' : files('hostnamed.c'),
         },
         executable_template + {
                 'name' : 'hostnamectl',
                 'public' : true,
-                'conditions' : ['ENABLE_HOSTNAMED'],
                 'sources' : files('hostnamectl.c'),
         },
 ]
 
-if conf.get('ENABLE_HOSTNAMED') == 1
-        install_data('org.freedesktop.hostname1.conf',
-                     install_dir : dbuspolicydir)
-        install_data('org.freedesktop.hostname1.service',
-                     install_dir : dbussystemservicedir)
-        install_data('org.freedesktop.hostname1.policy',
-                     install_dir : polkitpolicydir)
-endif
+install_data('org.freedesktop.hostname1.conf',
+             install_dir : dbuspolicydir)
+install_data('org.freedesktop.hostname1.service',
+             install_dir : dbussystemservicedir)
+install_data('org.freedesktop.hostname1.policy',
+             install_dir : polkitpolicydir)
index 6b9d78d4e8c6d0f8ffbec8d160967dc37046b772..d72474a2a22fe224131f1f8b75b73997534baf2e 100644 (file)
@@ -1,9 +1,12 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('HAVE_LIBCRYPTSETUP') != 1
+        subdir_done()
+endif
+
 executables += [
         libexec_template + {
                 'name' : 'systemd-integritysetup',
-                'conditions' : ['HAVE_LIBCRYPTSETUP'],
                 'sources' : files(
                         'integrity-util.c',
                         'integritysetup.c',
@@ -12,7 +15,6 @@ executables += [
         },
         generator_template + {
                 'name' : 'systemd-integritysetup-generator',
-                'conditions' : ['HAVE_LIBCRYPTSETUP'],
                 'sources' : files(
                         'integrity-util.c',
                         'integritysetup-generator.c',
index d6375a63a32594a2b0ef7252050fd84091e9a8b2..23707c172b9f8c51f226584f2e79014aa9934bf5 100644 (file)
@@ -1,17 +1,18 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('HAVE_KMOD') != 1
+        subdir_done()
+endif
+
 executables += [
         libexec_template + {
                 'name' : 'systemd-modules-load',
-                'conditions' : ['HAVE_KMOD'],
                 'sources' : files('modules-load.c'),
                 'dependencies' : libkmod_cflags,
         },
 ]
 
-if conf.get('HAVE_KMOD') == 1
-        install_emptydir(modulesloaddir)
-        if install_sysconfdir
-                install_emptydir(sysconfdir / 'modules-load.d')
-        endif
+install_emptydir(modulesloaddir)
+if install_sysconfdir
+        install_emptydir(sysconfdir / 'modules-load.d')
 endif
index 53fc3d368c8115cdb39f0c225359f57082069795..7b31fdc91f8b2daffae02e02b7d1b0fdd4d29f78 100644 (file)
@@ -1,5 +1,9 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('ENABLE_MOUNTFSD') != 1
+        subdir_done()
+endif
+
 systemd_mountwork_sources = files(
         'mountwork.c',
 )
@@ -12,12 +16,10 @@ systemd_mountfsd_sources = files(
 executables += [
         libexec_template + {
                 'name' : 'systemd-mountfsd',
-                'conditions' : ['ENABLE_MOUNTFSD'],
                 'sources' : systemd_mountfsd_sources,
         },
         libexec_template + {
                 'name' : 'systemd-mountwork',
-                'conditions' : ['ENABLE_MOUNTFSD'],
                 'sources' : systemd_mountwork_sources,
         },
 ]
index cb131f0b9dc79466b0bda07a8cd9fc6fa708b716..d8524d52bf62896b22c54e603cb78ef5e6e2f0f5 100644 (file)
@@ -1,5 +1,9 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('ENABLE_NSRESOURCED') != 1
+        subdir_done()
+endif
+
 subdir('bpf/userns_restrict')
 
 systemd_nsresourcework_sources = files(
@@ -24,7 +28,7 @@ if conf.get('HAVE_VMLINUX_H') == 1
         executables += [
                 test_template + {
                         'sources' : files('test-userns-restrict.c', 'userns-restrict.c') + userns_restrict_skel_h,
-                        'conditions' : ['ENABLE_NSRESOURCED', 'HAVE_VMLINUX_H'],
+                        'conditions' : ['HAVE_VMLINUX_H'],
                         'include_directories' : [ includes, userns_restrict_include ],
                 },
         ]
@@ -33,14 +37,12 @@ endif
 executables += [
         libexec_template + {
                 'name' : 'systemd-nsresourcework',
-                'conditions' : ['ENABLE_NSRESOURCED'],
                 'sources' : systemd_nsresourcework_sources,
                 'dependencies' : threads,
                 'include_directories' : [ includes, userns_restrict_include ],
         },
         libexec_template + {
                 'name' : 'systemd-nsresourced',
-                'conditions' : ['ENABLE_NSRESOURCED'],
                 'sources' : systemd_nsresourced_sources,
                 'dependencies' : threads,
                 'include_directories' : [ includes, userns_restrict_include ],
index 8c8728a3a0e68451c8e3e93fdef8f232796cabde..6533ef3ab8f178a1b5920dd04c65f59dbde93e19 100644 (file)
@@ -1,12 +1,12 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('HAVE_OPENSSL') != 1 or conf.get('HAVE_TPM2') != 1
+        subdir_done()
+endif
+
 executables += [
         libexec_template + {
                 'name' : 'systemd-pcrlock',
-                'conditions' : [
-                        'HAVE_OPENSSL',
-                        'HAVE_TPM2'
-                ],
                 'sources' : files(
                         'pcrlock.c',
                         'pcrlock-firmware.c',
@@ -19,18 +19,16 @@ executables += [
         },
 ]
 
-if conf.get('HAVE_OPENSSL') == 1 and conf.get('HAVE_TPM2') == 1
-        install_data('pcrlock.d/350-action-efi-application.pcrlock', install_dir : pcrlockdir)
-        install_data('pcrlock.d/400-secureboot-separator.pcrlock.d/300-0x00000000.pcrlock', install_dir : pcrlockdir / '400-secureboot-separator.pcrlock.d')
-        install_data('pcrlock.d/400-secureboot-separator.pcrlock.d/600-0xffffffff.pcrlock', install_dir : pcrlockdir / '400-secureboot-separator.pcrlock.d')
-        install_data('pcrlock.d/500-separator.pcrlock.d/300-0x00000000.pcrlock', install_dir : pcrlockdir / '500-separator.pcrlock.d')
-        install_data('pcrlock.d/500-separator.pcrlock.d/600-0xffffffff.pcrlock', install_dir : pcrlockdir / '500-separator.pcrlock.d')
-        install_data('pcrlock.d/700-action-efi-exit-boot-services.pcrlock.d/300-present.pcrlock', install_dir : pcrlockdir / '700-action-efi-exit-boot-services.pcrlock.d')
-        install_data('pcrlock.d/700-action-efi-exit-boot-services.pcrlock.d/600-absent.pcrlock', install_dir : pcrlockdir / '700-action-efi-exit-boot-services.pcrlock.d')
-        install_data('pcrlock.d/750-enter-initrd.pcrlock', install_dir : pcrlockdir)
-        install_data('pcrlock.d/800-leave-initrd.pcrlock', install_dir : pcrlockdir)
-        install_data('pcrlock.d/850-sysinit.pcrlock', install_dir : pcrlockdir)
-        install_data('pcrlock.d/900-ready.pcrlock', install_dir : pcrlockdir)
-        install_data('pcrlock.d/950-shutdown.pcrlock', install_dir : pcrlockdir)
-        install_data('pcrlock.d/990-final.pcrlock', install_dir : pcrlockdir)
-endif
+install_data('pcrlock.d/350-action-efi-application.pcrlock', install_dir : pcrlockdir)
+install_data('pcrlock.d/400-secureboot-separator.pcrlock.d/300-0x00000000.pcrlock', install_dir : pcrlockdir / '400-secureboot-separator.pcrlock.d')
+install_data('pcrlock.d/400-secureboot-separator.pcrlock.d/600-0xffffffff.pcrlock', install_dir : pcrlockdir / '400-secureboot-separator.pcrlock.d')
+install_data('pcrlock.d/500-separator.pcrlock.d/300-0x00000000.pcrlock', install_dir : pcrlockdir / '500-separator.pcrlock.d')
+install_data('pcrlock.d/500-separator.pcrlock.d/600-0xffffffff.pcrlock', install_dir : pcrlockdir / '500-separator.pcrlock.d')
+install_data('pcrlock.d/700-action-efi-exit-boot-services.pcrlock.d/300-present.pcrlock', install_dir : pcrlockdir / '700-action-efi-exit-boot-services.pcrlock.d')
+install_data('pcrlock.d/700-action-efi-exit-boot-services.pcrlock.d/600-absent.pcrlock', install_dir : pcrlockdir / '700-action-efi-exit-boot-services.pcrlock.d')
+install_data('pcrlock.d/750-enter-initrd.pcrlock', install_dir : pcrlockdir)
+install_data('pcrlock.d/800-leave-initrd.pcrlock', install_dir : pcrlockdir)
+install_data('pcrlock.d/850-sysinit.pcrlock', install_dir : pcrlockdir)
+install_data('pcrlock.d/900-ready.pcrlock', install_dir : pcrlockdir)
+install_data('pcrlock.d/950-shutdown.pcrlock', install_dir : pcrlockdir)
+install_data('pcrlock.d/990-final.pcrlock', install_dir : pcrlockdir)
index 210829b851456e7e0f13a26d09da2413d0a52704..06ffa6259a1c48fd04de94bdefb95655bef54218 100644 (file)
@@ -1,5 +1,9 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('ENABLE_PORTABLED') != 1
+        subdir_done()
+endif
+
 systemd_portabled_sources = files(
         'portable.c',
         'portabled-bus.c',
@@ -22,7 +26,6 @@ executables += [
         libexec_template + {
                 'name' : 'systemd-portabled',
                 'dbus' : true,
-                'conditions' : ['ENABLE_PORTABLED'],
                 'sources' : systemd_portabled_sources,
                 'link_with' : portabled_link_with,
                 'dependencies' : [
@@ -33,23 +36,20 @@ executables += [
         executable_template + {
                 'name' : 'portablectl',
                 'public' : true,
-                'conditions' : ['ENABLE_PORTABLED'],
                 'sources' : files('portablectl.c'),
                 'link_with' : portabled_link_with,
                 'dependencies' : threads,
         },
 ]
 
-if conf.get('ENABLE_PORTABLED') == 1
-        install_data('org.freedesktop.portable1.conf',
-                     install_dir : dbuspolicydir)
-        install_data('org.freedesktop.portable1.service',
-                     install_dir : dbussystemservicedir)
-        install_data('org.freedesktop.portable1.policy',
-                     install_dir : polkitpolicydir)
+install_data('org.freedesktop.portable1.conf',
+             install_dir : dbuspolicydir)
+install_data('org.freedesktop.portable1.service',
+             install_dir : dbussystemservicedir)
+install_data('org.freedesktop.portable1.policy',
+             install_dir : polkitpolicydir)
 
-        install_data('profile/default/service.conf', install_dir : profiledir / 'default')
-        install_data('profile/nonetwork/service.conf', install_dir : profiledir / 'nonetwork')
-        install_data('profile/strict/service.conf', install_dir : profiledir / 'strict')
-        install_data('profile/trusted/service.conf', install_dir : profiledir / 'trusted')
-endif
+install_data('profile/default/service.conf', install_dir : profiledir / 'default')
+install_data('profile/nonetwork/service.conf', install_dir : profiledir / 'nonetwork')
+install_data('profile/strict/service.conf', install_dir : profiledir / 'strict')
+install_data('profile/trusted/service.conf', install_dir : profiledir / 'trusted')
index 27c2855fb8a2dc7e9aa185891df076914b913aa6..31670c62745f03beccd91fcdbb9db57aafbfaf81 100644 (file)
@@ -1,9 +1,12 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('ENABLE_PSTORE') != 1
+        subdir_done()
+endif
+
 executables += [
         libexec_template + {
                 'name' : 'systemd-pstore',
-                'conditions' : ['ENABLE_PSTORE'],
                 'sources' : files('pstore.c'),
                 'dependencies' : [
                         libacl,
@@ -15,7 +18,7 @@ executables += [
         },
 ]
 
-if conf.get('ENABLE_PSTORE') == 1 and install_sysconfdir_samples
+if install_sysconfdir_samples
         install_data('pstore.conf',
                      install_dir : pkgconfigfiledir)
 endif
index bbf2584597ee5795eb174e316335e0ed42beee91..9c5778dffdc9d230cd87bd716e9a9fa4b10f08c2 100644 (file)
@@ -1,10 +1,13 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('ENABLE_REPART') != 1
+        subdir_done()
+endif
+
 executables += [
         executable_template + {
                 'name' : 'systemd-repart',
                 'public' : true,
-                'conditions' : ['ENABLE_REPART'],
                 'sources' : files('repart.c'),
                 'link_with' : [
                         libshared,
@@ -20,7 +23,6 @@ executables += [
         executable_template + {
                 'name' : 'systemd-repart.standalone',
                 'public' : have_standalone_binaries,
-                'conditions' : ['ENABLE_REPART'],
                 'sources' : files('repart.c'),
                 'c_args' : '-DSTANDALONE',
                 'link_with' : [
@@ -40,14 +42,12 @@ executables += [
         },
 ]
 
-if conf.get('ENABLE_REPART') == 1
-        install_data('definitions/confext.repart.d/10-root.conf',             install_dir : repartdefinitionsdir / 'confext.repart.d')
-        install_data('definitions/confext.repart.d/20-root-verity.conf',      install_dir : repartdefinitionsdir / 'confext.repart.d')
-        install_data('definitions/confext.repart.d/30-root-verity-sig.conf',  install_dir : repartdefinitionsdir / 'confext.repart.d')
-        install_data('definitions/portable.repart.d/10-root.conf',            install_dir : repartdefinitionsdir / 'portable.repart.d')
-        install_data('definitions/portable.repart.d/20-root-verity.conf',     install_dir : repartdefinitionsdir / 'portable.repart.d')
-        install_data('definitions/portable.repart.d/30-root-verity-sig.conf', install_dir : repartdefinitionsdir / 'portable.repart.d')
-        install_data('definitions/sysext.repart.d/10-root.conf',              install_dir : repartdefinitionsdir / 'sysext.repart.d')
-        install_data('definitions/sysext.repart.d/20-root-verity.conf',       install_dir : repartdefinitionsdir / 'sysext.repart.d')
-        install_data('definitions/sysext.repart.d/30-root-verity-sig.conf',   install_dir : repartdefinitionsdir / 'sysext.repart.d')
-endif
+install_data('definitions/confext.repart.d/10-root.conf',             install_dir : repartdefinitionsdir / 'confext.repart.d')
+install_data('definitions/confext.repart.d/20-root-verity.conf',      install_dir : repartdefinitionsdir / 'confext.repart.d')
+install_data('definitions/confext.repart.d/30-root-verity-sig.conf',  install_dir : repartdefinitionsdir / 'confext.repart.d')
+install_data('definitions/portable.repart.d/10-root.conf',            install_dir : repartdefinitionsdir / 'portable.repart.d')
+install_data('definitions/portable.repart.d/20-root-verity.conf',     install_dir : repartdefinitionsdir / 'portable.repart.d')
+install_data('definitions/portable.repart.d/30-root-verity-sig.conf', install_dir : repartdefinitionsdir / 'portable.repart.d')
+install_data('definitions/sysext.repart.d/10-root.conf',              install_dir : repartdefinitionsdir / 'sysext.repart.d')
+install_data('definitions/sysext.repart.d/20-root-verity.conf',       install_dir : repartdefinitionsdir / 'sysext.repart.d')
+install_data('definitions/sysext.repart.d/30-root-verity-sig.conf',   install_dir : repartdefinitionsdir / 'sysext.repart.d')
index 403d82a3405e49f056c42250ef51c78998bebecb..123ff41d3f7383240e24a37301de1d8defdd43bc 100644 (file)
@@ -1,16 +1,18 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('ENABLE_SYSUSERS') != 1
+        subdir_done()
+endif
+
 executables += [
         executable_template + {
                 'name' : 'systemd-sysusers',
                 'public' : true,
-                'conditions' : ['ENABLE_SYSUSERS'],
                 'sources' : files('sysusers.c'),
         },
         executable_template + {
                 'name' : 'systemd-sysusers.standalone',
                 'public' : have_standalone_binaries,
-                'conditions' : ['ENABLE_SYSUSERS'],
                 'sources' : files('sysusers.c'),
                 'c_args' : '-DSTANDALONE',
                 'link_with' : [
index 77fad97b7fa1714d8f28aa66bb267fbf1c9b4456..11427d5e3ad73987e06a5e7203908e7a0ce23fad 100644 (file)
@@ -13,7 +13,6 @@ executables += [
                         libopenssl,
                 ],
         },
-
         generator_template + {
                 'name' : 'systemd-tpm2-generator',
                 'sources' : files('tpm2-generator.c'),
index a7468dfe0692f8bfe1a419830216bb1667f2ecce..cc9ac80a6155490baa856577ea8fbed922493195 100644 (file)
@@ -1,15 +1,17 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('HAVE_LIBCRYPTSETUP') != 1
+        subdir_done()
+endif
+
 executables += [
         libexec_template + {
                 'name' : 'systemd-veritysetup',
-                'conditions' : ['HAVE_LIBCRYPTSETUP'],
                 'sources' : files('veritysetup.c'),
                 'dependencies' : libcryptsetup,
         },
         generator_template + {
                 'name' : 'systemd-veritysetup-generator',
-                'conditions' : ['HAVE_LIBCRYPTSETUP'],
                 'sources' : files('veritysetup-generator.c'),
         },
 ]
index 3cd9a3b69e67b5e0de4cee40d715fdca98686c15..c4decd84344e05fa7714e1daaa8acf02d19b48d9 100644 (file)
@@ -1,5 +1,9 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+if conf.get('ENABLE_VMSPAWN') != 1
+        subdir_done()
+endif
+
 libvmspawn_core_sources = files(
         'vmspawn-settings.c',
         'vmspawn-util.c',
@@ -7,6 +11,7 @@ libvmspawn_core_sources = files(
         'vmspawn-mount.c',
         'vmspawn-register.c',
 )
+
 libvmspawn_core = static_library(
         'vmspawn-core',
         libvmspawn_core_sources,
@@ -27,13 +32,11 @@ executables += [
         executable_template + {
                 'name' : 'systemd-vmspawn',
                 'public' : true,
-                'conditions': ['ENABLE_VMSPAWN'],
                 'sources' : files('vmspawn.c'),
                 'link_with' : vmspawn_libs,
                 'dependencies' : [libblkid]
         },
         vmspawn_test_template + {
-                'conditions': ['ENABLE_VMSPAWN'],
                 'sources' : files('test-vmspawn-util.c'),
         },
 ]