dcavalca / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone
8d419f
From 9cfc2fd3c58609252b3fd203af95bec1aab1b832 Mon Sep 17 00:00:00 2001
8d419f
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
8d419f
Date: Thu, 23 Dec 2021 12:55:40 +0100
8d419f
Subject: [PATCH] meson: move efi file lists closer to where they are used
8d419f
8d419f
The goal is to have the detection of features and paths done first, and
8d419f
then the build target constructions second.
8d419f
8d419f
(cherry picked from commit 65dcf9f9a0d877de0dc53558547462a7f1750c78)
8d419f
8d419f
Related: #2017035
8d419f
---
8d419f
 src/boot/efi/meson.build | 104 +++++++++++++++++++--------------------
8d419f
 1 file changed, 51 insertions(+), 53 deletions(-)
8d419f
8d419f
diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
8d419f
index e10e51cf4e..1125c64ea3 100644
8d419f
--- a/src/boot/efi/meson.build
8d419f
+++ b/src/boot/efi/meson.build
8d419f
@@ -99,59 +99,6 @@ if efi_lds == ''
8d419f
         subdir_done()
8d419f
 endif
8d419f
 
8d419f
-efi_headers = files('''
8d419f
-        bcd.h
8d419f
-        console.h
8d419f
-        cpio.h
8d419f
-        devicetree.h
8d419f
-        disk.h
8d419f
-        drivers.h
8d419f
-        graphics.h
8d419f
-        linux.h
8d419f
-        measure.h
8d419f
-        missing_efi.h
8d419f
-        pe.h
8d419f
-        random-seed.h
8d419f
-        shim.h
8d419f
-        splash.h
8d419f
-        util.h
8d419f
-        xbootldr.h
8d419f
-'''.split())
8d419f
-
8d419f
-common_sources = '''
8d419f
-        assert.c
8d419f
-        devicetree.c
8d419f
-        disk.c
8d419f
-        graphics.c
8d419f
-        measure.c
8d419f
-        pe.c
8d419f
-        secure-boot.c
8d419f
-        util.c
8d419f
-'''.split()
8d419f
-
8d419f
-systemd_boot_sources = '''
8d419f
-        bcd.c
8d419f
-        boot.c
8d419f
-        console.c
8d419f
-        drivers.c
8d419f
-        random-seed.c
8d419f
-        shim.c
8d419f
-        xbootldr.c
8d419f
-'''.split()
8d419f
-
8d419f
-stub_sources = '''
8d419f
-        cpio.c
8d419f
-        initrd.c
8d419f
-        splash.c
8d419f
-        stub.c
8d419f
-'''.split()
8d419f
-
8d419f
-if efi_arch[1] in ['ia32', 'x86_64']
8d419f
-        stub_sources += 'linux_x86.c'
8d419f
-else
8d419f
-        stub_sources += 'linux.c'
8d419f
-endif
8d419f
-
8d419f
 conf.set10('HAVE_GNU_EFI', true)
8d419f
 conf.set_quoted('EFI_MACHINE_TYPE_NAME', efi_arch[0])
8d419f
 
8d419f
@@ -332,6 +279,57 @@ if efi_cc_version.contains('clang') and efi_cc_version.split('.')[0].split(' ')[
8d419f
         efi_ldflags += ['-Wl,-T,' + efi_lds, '-Wno-unused-command-line-argument']
8d419f
 endif
8d419f
 
8d419f
+############################################################
8d419f
+
8d419f
+efi_headers = files(
8d419f
+        'bcd.h',
8d419f
+        'console.h',
8d419f
+        'cpio.h',
8d419f
+        'devicetree.h',
8d419f
+        'disk.h',
8d419f
+        'drivers.h',
8d419f
+        'graphics.h',
8d419f
+        'linux.h',
8d419f
+        'measure.h',
8d419f
+        'missing_efi.h',
8d419f
+        'pe.h',
8d419f
+        'random-seed.h',
8d419f
+        'shim.h',
8d419f
+        'splash.h',
8d419f
+        'util.h',
8d419f
+        'xbootldr.h')
8d419f
+
8d419f
+common_sources = [
8d419f
+        'assert.c',
8d419f
+        'devicetree.c',
8d419f
+        'disk.c',
8d419f
+        'graphics.c',
8d419f
+        'measure.c',
8d419f
+        'pe.c',
8d419f
+        'secure-boot.c',
8d419f
+        'util.c']
8d419f
+
8d419f
+systemd_boot_sources = [
8d419f
+        'bcd.c',
8d419f
+        'boot.c',
8d419f
+        'console.c',
8d419f
+        'drivers.c',
8d419f
+        'random-seed.c',
8d419f
+        'shim.c',
8d419f
+        'xbootldr.c']
8d419f
+
8d419f
+stub_sources = [
8d419f
+        'cpio.c',
8d419f
+        'initrd.c',
8d419f
+        'splash.c',
8d419f
+        'stub.c']
8d419f
+
8d419f
+if efi_arch[1] in ['ia32', 'x86_64']
8d419f
+        stub_sources += 'linux_x86.c'
8d419f
+else
8d419f
+        stub_sources += 'linux.c'
8d419f
+endif
8d419f
+
8d419f
 systemd_boot_objects = []
8d419f
 stub_objects = []
8d419f
 foreach file : fundamental_source_paths + common_sources + systemd_boot_sources + stub_sources