On 05/16/2016 10:25 AM, Paolo Bonzini wrote: > > > On 16/05/2016 18:20, Eric Blake wrote: >>> +QEMU_CFLAGS=$(sed -n s/^QEMU_CFLAGS=//p config-host.mak) >>> +QEMU_INCLUDES=$(sed -n s/^QEMU_INCLUDES=//p config-host.mak | \ >>> + sed 's/$(SRC_PATH)/../g' ) >> >> Could avoid a 'sed | sed' by doing: >> >> QEMU_INCLUDES=$(sed -n '/^QEMU_INCLUDES=/ s/$(SRC_PATH)/../gp' \ >> config-host.mak) >> > > Not quite, I'm removing the "QEMU_INCLUDES=" part even if it doesn't > match $(SRC_PATH).
Serves me write for not testing. QEMU_INCLUDES=$(sed -n '/^QEMU_INCLUDES=/ { s///; s/$(SRC_PATH)/../g; p }' config-host.mak) at which point maybe yours is more legible after all (especially since there are portability worries about {} used without newlines). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature