Message ID | 1576758232-12439-30-git-send-email-pbonzini@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Proof of concept for Meson integration | expand |
On 12/19/19 1:23 PM, Paolo Bonzini wrote: > From: Marc-André Lureau <marcandre.lureau@redhat.com> > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > Makefile | 7 ------- > pc-bios/meson.build | 8 ++++++-- > 2 files changed, 6 insertions(+), 9 deletions(-) > > diff --git a/Makefile b/Makefile > index d64e481..e961286 100644 > --- a/Makefile > +++ b/Makefile > @@ -99,7 +99,6 @@ generated-files-y = config-host.h > > 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: ; > @@ -267,7 +266,6 @@ endif > ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 > > install: all install-datadir install-localstatedir \ > - $(if $(INSTALL_BLOBS),$(edk2-decompressed)) \ > recurse-install > ifneq ($(vhost-user-json-y),) > $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/vhost-user/" > @@ -280,11 +278,6 @@ ifneq ($(BLOBS),) > $(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 5524b95..18201b0 100644 > --- a/pc-bios/meson.build > +++ b/pc-bios/meson.build > @@ -11,11 +11,15 @@ fds = [ > 'edk2-x86_64-secure-code.fd', > ] > > -foreach f : fds > +install_blobs = 'INSTALL_BLOBS' in config_host > + > +foreach f: fds > custom_target(f, > output: f, > input: '@0@.bz2'.format(f), > capture: true, > build_by_default: true, > - command: [ bzip2, '-dc', '@INPUT0@' ]) > + command: [ bzip2, '-dc', '@INPUT0@' ], > + install: install_blobs, > + install_dir: config_host['qemu_datadir']) > endforeach >
diff --git a/Makefile b/Makefile index d64e481..e961286 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,6 @@ generated-files-y = config-host.h 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: ; @@ -267,7 +266,6 @@ endif ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 install: all install-datadir install-localstatedir \ - $(if $(INSTALL_BLOBS),$(edk2-decompressed)) \ recurse-install ifneq ($(vhost-user-json-y),) $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/vhost-user/" @@ -280,11 +278,6 @@ ifneq ($(BLOBS),) $(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 5524b95..18201b0 100644 --- a/pc-bios/meson.build +++ b/pc-bios/meson.build @@ -11,11 +11,15 @@ fds = [ 'edk2-x86_64-secure-code.fd', ] -foreach f : fds +install_blobs = 'INSTALL_BLOBS' in config_host + +foreach f: fds custom_target(f, output: f, input: '@0@.bz2'.format(f), capture: true, build_by_default: true, - command: [ bzip2, '-dc', '@INPUT0@' ]) + command: [ bzip2, '-dc', '@INPUT0@' ], + install: install_blobs, + install_dir: config_host['qemu_datadir']) endforeach