From daf72e8df1edc1ea1f7ec6330294dcafc1e2f6a5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 7 Nov 2024 12:28:42 +0100 Subject: [PATCH] Move bless-boot components to their own source subdirectory --- meson.build | 1 + .../bless-boot-generator.c | 0 src/{boot => bless-boot}/bless-boot.c | 0 .../boot-check-no-failures.c | 0 src/bless-boot/meson.build | 37 +++++++++++++++++++ src/boot/meson.build | 33 ----------------- 6 files changed, 38 insertions(+), 33 deletions(-) rename src/{boot => bless-boot}/bless-boot-generator.c (100%) rename src/{boot => bless-boot}/bless-boot.c (100%) rename src/{boot => bless-boot}/boot-check-no-failures.c (100%) create mode 100644 src/bless-boot/meson.build diff --git a/meson.build b/meson.build index 2624bd363bd..e76115a619b 100644 --- a/meson.build +++ b/meson.build @@ -2344,6 +2344,7 @@ subdir('src/ask-password') subdir('src/backlight') subdir('src/battery-check') subdir('src/binfmt') +subdir('src/bless-boot') subdir('src/boot') subdir('src/boot/efi') subdir('src/bootctl') diff --git a/src/boot/bless-boot-generator.c b/src/bless-boot/bless-boot-generator.c similarity index 100% rename from src/boot/bless-boot-generator.c rename to src/bless-boot/bless-boot-generator.c diff --git a/src/boot/bless-boot.c b/src/bless-boot/bless-boot.c similarity index 100% rename from src/boot/bless-boot.c rename to src/bless-boot/bless-boot.c diff --git a/src/boot/boot-check-no-failures.c b/src/bless-boot/boot-check-no-failures.c similarity index 100% rename from src/boot/boot-check-no-failures.c rename to src/bless-boot/boot-check-no-failures.c diff --git a/src/bless-boot/meson.build b/src/bless-boot/meson.build new file mode 100644 index 00000000000..003f110664d --- /dev/null +++ b/src/bless-boot/meson.build @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +if get_option('link-boot-shared') + boot_link_with = [libshared] +else + boot_link_with = [ + libshared_static, + libsystemd_static, + ] +endif + +executables += [ + libexec_template + { + 'name' : 'systemd-bless-boot', + 'public' : true, + 'conditions' : [ + 'HAVE_BLKID', + 'ENABLE_BOOTLOADER', + ], + 'sources' : files('bless-boot.c'), + 'link_with' : boot_link_with, + 'dependencies' : libblkid, + }, + generator_template + { + 'name' : 'systemd-bless-boot-generator', + 'conditions' : [ + 'HAVE_BLKID', + 'ENABLE_BOOTLOADER', + ], + 'sources' : files('bless-boot-generator.c'), + 'link_with' : boot_link_with, + }, + libexec_template + { + 'name' : 'systemd-boot-check-no-failures', + 'sources' : files('boot-check-no-failures.c'), + }, +] diff --git a/src/boot/meson.build b/src/boot/meson.build index 95e3c786fcd..095387384e2 100644 --- a/src/boot/meson.build +++ b/src/boot/meson.build @@ -1,35 +1,6 @@ # SPDX-License-Identifier: LGPL-2.1-or-later -if get_option('link-boot-shared') - boot_link_with = [libshared] -else - boot_link_with = [ - libshared_static, - libsystemd_static, - ] -endif - executables += [ - libexec_template + { - 'name' : 'systemd-bless-boot', - 'public' : true, - 'conditions' : [ - 'HAVE_BLKID', - 'ENABLE_BOOTLOADER', - ], - 'sources' : files('bless-boot.c'), - 'link_with' : boot_link_with, - 'dependencies' : libblkid, - }, - generator_template + { - 'name' : 'systemd-bless-boot-generator', - 'conditions' : [ - 'HAVE_BLKID', - 'ENABLE_BOOTLOADER', - ], - 'sources' : files('bless-boot-generator.c'), - 'link_with' : boot_link_with, - }, libexec_template + { 'name' : 'systemd-measure', 'conditions' : [ @@ -48,8 +19,4 @@ executables += [ 'sources' : files('sbsign.c'), 'dependencies' : libopenssl, }, - libexec_template + { - 'name' : 'systemd-boot-check-no-failures', - 'sources' : files('boot-check-no-failures.c'), - }, ] -- 2.47.3