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

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



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.

Thanks,
Cole
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)
+	touch $@
+
+$(GENERATED): generated.stamp
 
 libvirt.py: $(srcdir)/libvir.py $(GENERATED) $(CLASSES_EXTRA)
 	cat $(srcdir)/libvir.py libvirtclass.py > $ -t
@@ -70,7 +73,7 @@ install-data-local:
 uninstall-local:
 	rm -f $(DESTDIR)$(pythondir)/libvirt.py
 
-CLEANFILES= $(GENERATED) libvirt.py
+CLEANFILES= $(GENERATED) generated.stamp libvirt.py
 
 else
 all:

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