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

[libvirt] avoid "make rpm" failure in doc/



"make rpm" fails like this:

    Rebuilding the HTML pages from the XML API
    make[3]: *** No rule to make target `html/libvirt-libvirt.html', needed by `distdir'.  Stop.
    make[3]: *** Waiting for unfinished jobs....
    Validating the resulting XHTML pages

These two patches fix that:
(though "make rpm" still fails for me:

  extracting debug info from /j/rpmbuild/BUILDROOT/libvirt-0.7.6-1.fc12.x86_6h..
  *** ERROR: No build ID note found in /j/rpmbuild/BUILDROOT/libvirt-0.7.6-1.h..

The first (1/2) change is not officially required to solve this problem,
but it overlapped, and does fix a non-distdir build failure.

>From ace4dca5dfbc022b057ce1d9f3d2770ad3a34716 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Wed, 24 Feb 2010 22:51:47 +0100
Subject: [PATCH 1/2] build: teach apibuild.py to work in a non-srcdir build

* docs/Makefile.am (libvirt-api.xml libvirt-refs.xml): Generalize
apibuild.py to work in a non-srcdir build.  Pass "srcdir" to it.
* docs/apibuild.py (rebuild): Honor the $srcdir envvar.
---
 docs/Makefile.am |    2 +-
 docs/apibuild.py |   10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/docs/Makefile.am b/docs/Makefile.am
index e47b668..dbbd1ef 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -132,7 +132,7 @@ devhelp/index.html devhelp/libvirt.devhelp: libvirt-api.xml $(devhelpxsl)
 libvirt-api.xml libvirt-refs.xml: apibuild.py \
 		$(srcdir)/../include/libvirt/*.h \
 		$(srcdir)/../src/libvirt.c $(srcdir)/../src/util/virterror.c
-	-$(srcdir)/apibuild.py
+	-srcdir=$(srcdir) $(srcdir)/apibuild.py

 clean-local:
 	rm -f *~ *.bak *.hierarchy *.signals *-unused.txt
diff --git a/docs/apibuild.py b/docs/apibuild.py
index e233c8b..0ab5db2 100755
--- a/docs/apibuild.py
+++ b/docs/apibuild.py
@@ -2102,10 +2102,14 @@ class docBuilder:

 def rebuild():
     builder = None
-    if glob.glob("../src/libvirt.c") != [] :
+    srcdir = os.environ["srcdir"]
+    if glob.glob(srcdir + "/../src/libvirt.c") != [] :
         print "Rebuilding API description for libvirt"
-	builder = docBuilder("libvirt", ["../src", "../src/util", "../include/libvirt"],
-	                     [])
+	builder = docBuilder("libvirt",
+                             [srcdir + "/../src",
+                              srcdir + "/../src/util",
+                              srcdir + "/../include/libvirt"],
+                             [])
     elif glob.glob("src/libvirt.c") != [] :
         print "Rebuilding API description for libvir"
 	builder = docBuilder("libvirt", ["src", "src/util", "include/libvirt"],
--
1.7.0.401.g84adb


>From a79fb1c491197a91094cd2345c3d7bbba40da2fd Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Thu, 25 Feb 2010 10:35:20 +0100
Subject: [PATCH 2/2] build: avoid "make rpm" failure in docs/

Add missing rule to build html/libvirt-libvirt.html.
Use a GNU Make pattern rule to avoid running apibuild.py once
for each out-of-date target, in a parallel build.
* docs/Makefile.am
---
 docs/Makefile.am |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/docs/Makefile.am b/docs/Makefile.am
index dbbd1ef..edf6fc8 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -123,17 +123,20 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
 	  $(XMLLINT) --nonet --valid --noout html/*.html ; \
 	  else echo "missing XHTML1 DTD" ; fi ; fi );

-devhelp/index.html devhelp/libvirt.devhelp: libvirt-api.xml $(devhelpxsl)
+$(devhelphtml): libvirt-api.xml $(devhelpxsl)
 	-@(echo Rebuilding devhelp files)
 	-@(if [ -x $(XSLTPROC) ] ; then \
-	  $(XSLTPROC) --nonet -o devhelp/libvirt.devhelp $(top_srcdir)/docs/devhelp/devhelp.xsl $(top_srcdir)/docs/libvirt-api.xml ; fi );
+	  $(XSLTPROC) --nonet -o devhelp/libvirt.devhelp \
+          $(top_srcdir)/docs/devhelp/devhelp.xsl libvirt-api.xml ; fi );

-
-libvirt-api.xml libvirt-refs.xml: apibuild.py \
-		$(srcdir)/../include/libvirt/*.h \
-		$(srcdir)/../src/libvirt.c $(srcdir)/../src/util/virterror.c
+html/%-%.html html/%-virterror.html %-api.xml %-refs.xml: $(srcdir)/apibuild.py
 	-srcdir=$(srcdir) $(srcdir)/apibuild.py

+html/%-%.html html/%-virterror.html %-api.xml %-refs.xml: \
+		$(srcdir)/../include/%/*.h \
+		$(srcdir)/../src/%.c \
+		$(srcdir)/../src/util/virterror.c
+
 clean-local:
 	rm -f *~ *.bak *.hierarchy *.signals *-unused.txt

--
1.7.0.401.g84adb


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