diff mbox series

[128/142] meson: install edk2

Message ID 20200128175342.9066-129-pbonzini@redhat.com
State New
Headers show
Series Proof of concept for Meson integration | expand

Commit Message

Paolo Bonzini Jan. 28, 2020, 5:53 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 Makefile            | 9 +--------
 pc-bios/meson.build | 3 +++
 2 files changed, 4 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 98582518a8..e4b3470b36 100644
--- a/Makefile
+++ b/Makefile
@@ -107,7 +107,6 @@  CONFIG_BLOCK := $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS))
 
 generated-files-y += .git-submodule-status
 
-edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2))
 # Don't try to regenerate Makefile or configure
 # We don't generate any of them
 Makefile: ;
@@ -263,18 +262,12 @@  endif
 
 ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512
 
-install: all install-datadir install-localstatedir \
-	$(if $(INSTALL_BLOBS),$(edk2-decompressed))
+install: all install-datadir install-localstatedir
 ifneq ($(BLOBS),)
 	set -e; for x in $(BLOBS); do \
 		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \
 	done
 endif
-ifdef INSTALL_BLOBS
-	set -e; for x in $(edk2-decompressed); do \
-		$(INSTALL_DATA) $$x "$(DESTDIR)$(qemu_datadir)"; \
-	done
-endif
 ifneq ($(DESCS),)
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/firmware"
 	set -e; tmpf=$$(mktemp); trap 'rm -f -- "$$tmpf"' EXIT; \
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index 8a3d335545..792679d396 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -1,5 +1,6 @@ 
 bzip2 = find_program('bzip2')
 
+install_blobs = 'INSTALL_BLOBS' in config_host
 if 'DECOMPRESS_EDK2_BLOBS' in config_host
   fds = [
     'edk2-aarch64-code.fd',
@@ -18,6 +19,8 @@  if 'DECOMPRESS_EDK2_BLOBS' in config_host
                   input: '@0@.bz2'.format(f),
                   capture: true,
                   build_by_default: true,
+                  install: install_blobs,
+                  install_dir: config_host['qemu_datadir'],
                   command: [ bzip2, '-dc', '@INPUT0@' ])
   endforeach
 endif