Re: [libvirt] [PATCH] Don't generate python bindings multiple times w/ parallel build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 16, 2009 at 06:39:35PM -0500, Cole Robinson wrote:
> The attached patch was posted by Michael Marineau at:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=472702
> 
> It prevents generating the python bindings multiple times in a parallel
> build. Works fine in my testing, so I figured I'd pass it along here for
> better exposure, since it has been languishing in bugzilla.

IMHO, the generator.py should be fixed so we can request which
individual file we want it to generate. So instead of having
it generated all files, it'd just genrate the file that make
actually asked for, 

eg, so if we wanted to generate   libvirt.py we'd invoke it
with

    generator.py $(srcdir) libvirt.py



> diff --git a/python/Makefile.am b/python/Makefile.am
> index 8d1462b..a7c342e 100644
> --- a/python/Makefile.am
> +++ b/python/Makefile.am
> @@ -51,8 +51,11 @@ GENERATED= libvirt-export.c \
>  	   libvirt-py.h \
>  	   libvirtclass.py
>  
> -$(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
> +generated.stamp: $(srcdir)/$(GENERATE) $(API_DESC)
>  	$(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)

So that would instead explicitly give the target file:

  	$(PYTHON) $(srcdir)/$(GENERATE) $(srcdir) $@

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]