diff mbox series

[130/142] meson: install edk2 json descriptors

Message ID 20200128175342.9066-131-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                        | 17 -----------------
 pc-bios/descriptors/meson.build | 14 ++++++++++++++
 pc-bios/meson.build             |  2 ++
 3 files changed, 16 insertions(+), 17 deletions(-)
 create mode 100644 pc-bios/descriptors/meson.build
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index af635a3939..11e87a0c77 100644
--- a/Makefile
+++ b/Makefile
@@ -219,13 +219,6 @@  ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
 de-ch  es     fo  fr-ca  hu     ja  mk  pt  sl     tr \
 bepo    cz
 
-ifdef INSTALL_BLOBS
-DESCS=50-edk2-i386-secure.json 50-edk2-x86_64-secure.json \
-60-edk2-aarch64.json 60-edk2-arm.json 60-edk2-i386.json 60-edk2-x86_64.json
-else
-DESCS=
-endif
-
 install-datadir:
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)"
 
@@ -239,16 +232,6 @@  endif
 ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512
 
 install: all install-datadir install-localstatedir
-ifneq ($(DESCS),)
-	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/firmware"
-	set -e; tmpf=$$(mktemp); trap 'rm -f -- "$$tmpf"' EXIT; \
-	for x in $(DESCS); do \
-		sed -e 's,@DATADIR@,$(qemu_datadir),' \
-			"$(SRC_PATH)/pc-bios/descriptors/$$x" > "$$tmpf"; \
-		$(INSTALL_DATA) "$$tmpf" \
-			"$(DESTDIR)$(qemu_datadir)/firmware/$$x"; \
-	done
-endif
 	for s in $(ICON_SIZES); do \
 		mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/$${s}/apps"; \
 		$(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_$${s}.png \
diff --git a/pc-bios/descriptors/meson.build b/pc-bios/descriptors/meson.build
new file mode 100644
index 0000000000..7c715bace8
--- /dev/null
+++ b/pc-bios/descriptors/meson.build
@@ -0,0 +1,14 @@ 
+foreach f: [
+  '50-edk2-i386-secure.json',
+  '50-edk2-x86_64-secure.json',
+  '60-edk2-aarch64.json',
+  '60-edk2-arm.json',
+  '60-edk2-i386.json',
+  '60-edk2-x86_64.json'
+]
+  configure_file(input: files(f),
+                 output: f,
+                 configuration: {'DATADIR': config_host['qemu_datadir']},
+                 install: install_blobs,
+                 install_dir: config_host['qemu_datadir'] / 'firmware')
+endforeach
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index 6988c81f51..e53a7ae521 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -25,6 +25,8 @@  if 'DECOMPRESS_EDK2_BLOBS' in config_host
   endforeach
 endif
 
+subdir('descriptors')
+
 blobs = files(
   'QEMU,cgthree.bin',
   'QEMU,tcx.bin',