Message ID | 1576155176-2464-33-git-send-email-pbonzini@redhat.com |
---|---|
State | New |
Headers | show |
Series | Proof of concept for Meson integration | expand |
On 12/12/19 1:51 PM, Paolo Bonzini wrote: > From: Marc-André Lureau <marcandre.lureau@redhat.com> > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > Makefile | 4 ---- > meson.build | 2 ++ > pc-bios/meson.build | 21 +++++++++++++++++++++ > 3 files changed, 23 insertions(+), 4 deletions(-) > create mode 100644 pc-bios/meson.build > > diff --git a/Makefile b/Makefile > index 0a6615c..b880265 100644 > --- a/Makefile > +++ b/Makefile > @@ -103,9 +103,6 @@ generated-files-y += module_block.h > generated-files-y += .git-submodule-status > > edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2)) > -pc-bios/edk2-%.fd: pc-bios/edk2-%.fd.bz2 > - $(call quiet-command,bzip2 -d -c $< > $@,"BUNZIP2",$<) > - > # Don't try to regenerate Makefile or configure > # We don't generate any of them > Makefile: ; > @@ -226,7 +223,6 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y) > $(SOFTMMU_ALL_RULES): $(crypto-obj-y) > $(SOFTMMU_ALL_RULES): $(io-obj-y) > $(SOFTMMU_ALL_RULES): config-all-devices.mak > -$(SOFTMMU_ALL_RULES): $(edk2-decompressed) > > .PHONY: $(TARGET_DIRS_RULES) > # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that > diff --git a/meson.build b/meson.build > index de5a26e..00c0767 100644 > --- a/meson.build > +++ b/meson.build > @@ -312,3 +312,5 @@ if have_tools > subdir('contrib/ivshmem-server') > endif > endif > + > +subdir('pc-bios') > diff --git a/pc-bios/meson.build b/pc-bios/meson.build > new file mode 100644 > index 0000000..5524b95 > --- /dev/null > +++ b/pc-bios/meson.build > @@ -0,0 +1,21 @@ > +bzip2 = find_program('bzip2') > + > +fds = [ > + 'edk2-aarch64-code.fd', > + 'edk2-arm-code.fd', > + 'edk2-arm-vars.fd', Can we split this in 2 arrays ... > + 'edk2-i386-code.fd', > + 'edk2-i386-secure-code.fd', > + 'edk2-i386-vars.fd', > + 'edk2-x86_64-code.fd', > + 'edk2-x86_64-secure-code.fd', > +] > + ... then for each array ... > +foreach f : fds > + custom_target(f, > + output: f, > + input: '@0@.bz2'.format(f), > + capture: true, > + build_by_default: true, ... use: build_by_default: if 'i386' in target_arch or if 'x86_64' in target_arch, Ah, different that this patch intent, so for later. > + command: [ bzip2, '-dc', '@INPUT0@' ]) > +endforeach >
On 12/12/19 1:51 PM, Paolo Bonzini wrote: > From: Marc-André Lureau <marcandre.lureau@redhat.com> > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > Makefile | 4 ---- > meson.build | 2 ++ > pc-bios/meson.build | 21 +++++++++++++++++++++ > 3 files changed, 23 insertions(+), 4 deletions(-) > create mode 100644 pc-bios/meson.build > > diff --git a/Makefile b/Makefile > index 0a6615c..b880265 100644 > --- a/Makefile > +++ b/Makefile > @@ -103,9 +103,6 @@ generated-files-y += module_block.h > generated-files-y += .git-submodule-status > > edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2)) > -pc-bios/edk2-%.fd: pc-bios/edk2-%.fd.bz2 > - $(call quiet-command,bzip2 -d -c $< > $@,"BUNZIP2",$<) > - > # Don't try to regenerate Makefile or configure > # We don't generate any of them > Makefile: ; > @@ -226,7 +223,6 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y) > $(SOFTMMU_ALL_RULES): $(crypto-obj-y) > $(SOFTMMU_ALL_RULES): $(io-obj-y) > $(SOFTMMU_ALL_RULES): config-all-devices.mak > -$(SOFTMMU_ALL_RULES): $(edk2-decompressed) > > .PHONY: $(TARGET_DIRS_RULES) > # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that > diff --git a/meson.build b/meson.build > index de5a26e..00c0767 100644 > --- a/meson.build > +++ b/meson.build > @@ -312,3 +312,5 @@ if have_tools > subdir('contrib/ivshmem-server') > endif > endif > + > +subdir('pc-bios') > diff --git a/pc-bios/meson.build b/pc-bios/meson.build > new file mode 100644 > index 0000000..5524b95 > --- /dev/null > +++ b/pc-bios/meson.build > @@ -0,0 +1,21 @@ > +bzip2 = find_program('bzip2') > + > +fds = [ > + 'edk2-aarch64-code.fd', > + 'edk2-arm-code.fd', > + 'edk2-arm-vars.fd', > + 'edk2-i386-code.fd', > + 'edk2-i386-secure-code.fd', > + 'edk2-i386-vars.fd', > + 'edk2-x86_64-code.fd', > + 'edk2-x86_64-secure-code.fd', > +] > + > +foreach f : fds Can strip space between f/column. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> > + custom_target(f, > + output: f, > + input: '@0@.bz2'.format(f), > + capture: true, > + build_by_default: true, > + command: [ bzip2, '-dc', '@INPUT0@' ]) > +endforeach >
On 03/01/20 11:52, Philippe Mathieu-Daudé wrote: > > +foreach f : fds > Can strip space between f/column. Could, but it seems like other meson.build files usually leave a space in. Paolo
diff --git a/Makefile b/Makefile index 0a6615c..b880265 100644 --- a/Makefile +++ b/Makefile @@ -103,9 +103,6 @@ generated-files-y += module_block.h generated-files-y += .git-submodule-status edk2-decompressed = $(basename $(wildcard pc-bios/edk2-*.fd.bz2)) -pc-bios/edk2-%.fd: pc-bios/edk2-%.fd.bz2 - $(call quiet-command,bzip2 -d -c $< > $@,"BUNZIP2",$<) - # Don't try to regenerate Makefile or configure # We don't generate any of them Makefile: ; @@ -226,7 +223,6 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y) $(SOFTMMU_ALL_RULES): $(crypto-obj-y) $(SOFTMMU_ALL_RULES): $(io-obj-y) $(SOFTMMU_ALL_RULES): config-all-devices.mak -$(SOFTMMU_ALL_RULES): $(edk2-decompressed) .PHONY: $(TARGET_DIRS_RULES) # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that diff --git a/meson.build b/meson.build index de5a26e..00c0767 100644 --- a/meson.build +++ b/meson.build @@ -312,3 +312,5 @@ if have_tools subdir('contrib/ivshmem-server') endif endif + +subdir('pc-bios') diff --git a/pc-bios/meson.build b/pc-bios/meson.build new file mode 100644 index 0000000..5524b95 --- /dev/null +++ b/pc-bios/meson.build @@ -0,0 +1,21 @@ +bzip2 = find_program('bzip2') + +fds = [ + 'edk2-aarch64-code.fd', + 'edk2-arm-code.fd', + 'edk2-arm-vars.fd', + 'edk2-i386-code.fd', + 'edk2-i386-secure-code.fd', + 'edk2-i386-vars.fd', + 'edk2-x86_64-code.fd', + 'edk2-x86_64-secure-code.fd', +] + +foreach f : fds + custom_target(f, + output: f, + input: '@0@.bz2'.format(f), + capture: true, + build_by_default: true, + command: [ bzip2, '-dc', '@INPUT0@' ]) +endforeach