[libvirt] [PATCH] Avoid autogen loop in VPATH builds

Eric Blake eblake at redhat.com
Tue Aug 10 15:15:26 UTC 2010


On 08/10/2010 09:09 AM, Eric Blake wrote:
> On 08/10/2010 08:59 AM, Jiri Denemark wrote:
>> ---
>>  cfg.mk |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/cfg.mk b/cfg.mk
>> index 7226828..e7fd63c 100644
>> --- a/cfg.mk
>> +++ b/cfg.mk
>> @@ -459,7 +459,7 @@ ifeq (0,$(MAKELEVEL))
>>    # b653eda3ac4864de205419d9f41eec267cb89eeb
>>    _submodule_hash = sed 's/^[ +-]//;s/ .*//'
>>    _update_required := $(shell						\
>> -      test -f po/Makevars || { echo 1; exit; };				\
>> +      test -f $(srcdir)/po/Makevars || { echo 1; exit; };		\
>>        cd '$(srcdir)';							\
> 
> My apologies for not properly testing VPATH builds; my regression was
> commit 5f211d4b.  It turns out that gettext creates po/Makevars in
> $(srcdir) unconditionally, even for VPATH builds.
> 
> This patch is one way to do it, but the other, simpler way, would be to
> swap the two lines, and check for po/Makevars after the cd:
> 
>    _update_required := $(shell						\
> -      test -f po/Makevars || { echo 1; exit; };				\
>        cd '$(srcdir)';							\
> +      test -f po/Makevars || { echo 1; exit; };				\
> 
> ACK to whichever version you think looks nicer.

Oops - incomplete.  You also have to touch autogen.sh:

s,$THEDIR/po/Makevars,po/Makevars,

so that autogen.sh also looks in $(srcdir) instead of $(builddir) when
invoked from a VPATH make.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100810/a6531136/attachment-0001.sig>


More information about the libvir-list mailing list