On 3/10/19 10:10 AM, Philippe Mathieu-Daudé wrote: > Hi Laszlo, > > On 3/9/19 5:48 PM, Philippe Mathieu-Daudé wrote: >> On 3/9/19 1:48 AM, Laszlo Ersek wrote: >>> Add the "efi" target to "Makefile". >>>
>>> + >>> +toolchain = $(shell source ./edk2-funcs.sh && qemu_edk2_get_toolchain $(1)) > > Well I finally figured out why building on Ubuntu fails. It default > shell is dash, and 'source' is a bash builtin command. The portable > equivalent is '.' (dot). > > The fix is: > > -- >8 -- > -toolchain = $(shell source ./edk2-funcs.sh && qemu_edk2_get_toolchain $(1)) > +toolchain = $(shell . ./edk2-funcs.sh && qemu_edk2_get_toolchain $(1)) Ouch - this changes my analysis in 1/10, where I argued that since the file was only ever sourced by a bash script, its use of 'local' was okay. Now that you are also sourcing it from /bin/sh via Makefile, you HAVE to make edk2-funcs.sh portable to POSIX shell, by eliminating use of 'local'. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature