]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix rebuilding of devhelp files
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 2 Oct 2009 11:29:15 +0000 (12:29 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 6 Oct 2009 10:12:53 +0000 (11:12 +0100)
The devhelp/ directory files depend on libvirt-api.xml being
uptodate, but automake always processes SUBDIRS before the
current directory. So devhelp would be built and then the
libvirt-api.xml re-build, invalidating the devhelp data again.

To fix this all the rules for devhelp are moved directly
into the docs/Makefile.am allowing make to see the global
dependancy chain and thus build things in the correct order

* docs/Makefile.am: Add rules for devhelp rebuild
* docs/devhelp/Makefile.am: Remove devhelp rebuild
* configure.in: Remove docs/devhelp/Makefile.am

configure.in
docs/Makefile.am
docs/devhelp/Makefile.am [deleted file]

index 1d122378469735297473636186abde736aa9ec1a..27737b43b52299246d55a6b858c44c8f06b1b2f4 100644 (file)
@@ -1688,7 +1688,6 @@ test "x$srcdir" = x. && ! test -f COPYING &&
 cp -f COPYING.LIB COPYING
 
 AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
-          docs/devhelp/Makefile \
          docs/schemas/Makefile \
          gnulib/lib/Makefile \
          gnulib/tests/Makefile \
index 5b049514edc29a6c77befdf06bbb91c296f18c74..8832b72798273d364188ec0f8b24f689ce40c4c2 100644 (file)
@@ -1,9 +1,11 @@
 ## Process this file with automake to produce Makefile.in
-SUBDIRS= schemas devhelp
+SUBDIRS= schemas
 
 # The directory containing the source code (if it contains documentation).
 DOC_SOURCE_DIR=../src
 
+DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt
+
 apihtml =                      \
   html/index.html              \
   html/libvirt-libvirt.html    \
@@ -15,6 +17,23 @@ apipng =     \
   html/home.png        \
   html/right.png
 
+devhelphtml =                  \
+  devhelp/libvirt.devhelp      \
+  devhelp/index.html           \
+  devhelp/general.html         \
+  devhelp/libvirt-libvirt.html \
+  devhelp/libvirt-virterror.html
+
+devhelppng =           \
+  devhelp/home.png     \
+  devhelp/left.png     \
+  devhelp/right.png    \
+  devhelp/up.png
+
+devhelpcss = devhelp/style.css
+
+devhelpxsl = devhelp/devhelp.xsl devhelp/html.xsl
+
 png = \
   32favicon.png \
   footer_corner.png \
@@ -54,17 +73,18 @@ EXTRA_DIST=                                 \
   libvirt-api.xml libvirt-refs.xml apibuild.py \
   site.xsl newapi.xsl news.xsl page.xsl        ChangeLog.xsl   \
   $(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
+  $(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \
   $(xml) $(fig) $(png) \
   $(patches) \
   ChangeLog.awk
 
-CLEANFILES = $(dot_html) $(apihtml)
+CLEANFILES = $(dot_html) $(apihtml) $(devhelphtml)
 
 all: web $(top_builddir)/NEWS
 
 api: libvirt-api.xml libvirt-refs.xml
 
-web: $(dot_html) html/index.html
+web: $(dot_html) html/index.html devhelp/index.html
 
 ChangeLog.xml: ../ChangeLog ChangeLog.awk
        awk -f ChangeLog.awk < $< > $@
@@ -102,6 +122,12 @@ 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: 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 );
+
+
 libvirt-api.xml libvirt-refs.xml: apibuild.py \
                $(srcdir)/../include/libvirt/*.h \
                $(srcdir)/../src/libvirt.c $(srcdir)/../src/util/virterror.c
@@ -132,7 +158,13 @@ install-data-local:
          $(INSTALL) -m 0644 $(srcdir)/$$h $(DESTDIR)$(HTML_DIR)/html; done
        for p in $(apipng); do \
          $(INSTALL) -m 0644 $(srcdir)/$$p $(DESTDIR)$(HTML_DIR)/html; done
+       $(mkinstalldirs) $(DESTDIR)$(DEVHELP_DIR)
+       for file in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
+           @INSTALL@ -m 0644 $(srcdir)/$${file} $(DESTDIR)$(DEVHELP_DIR) ; \
+       done
 
 uninstall-local:
        for h in $(apihtml); do rm $(DESTDIR)$(HTML_DIR)/$$h; done
        for p in $(apipng); do rm $(DESTDIR)$(HTML_DIR)/$$p; done
+       for f in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
+               rm $(DESTDIR)$(DEVHELP_DIR)$$f ; done
\ No newline at end of file
diff --git a/docs/devhelp/Makefile.am b/docs/devhelp/Makefile.am
deleted file mode 100644 (file)
index dbf47c7..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt
-HTML_FILES=index.html general.html $(HTML_MODULES)
-HTML_MODULES=                          \
-       libvirt-libvirt.html            \
-       libvirt-virterror.html
-
-EXTRA_FORMAT=                          \
-       home.png                        \
-       left.png                        \
-       right.png                       \
-       up.png                          \
-       style.css
-
-EXTRA_DIST=devhelp.xsl html.xsl libvirt.devhelp $(HTML_FILES) $(EXTRA_FORMAT)
-
-all: libvirt.devhelp $(HTML_FILES)
-
-CLEANFILES = libvirt.devhelp $(HTML_FILES)
-
-libvirt.devhelp $(HTML_FILES): $(srcdir)/devhelp.xsl html.xsl $(top_srcdir)/docs/libvirt-api.xml
-       -@(echo Rebuilding devhelp files)
-       -@(if [ -x $(XSLTPROC) ] ; then \
-         $(XSLTPROC) --nonet -o libvirt.devhelp $(srcdir)/devhelp.xsl $(top_srcdir)/docs/libvirt-api.xml ; fi );
-
-install-data-local: libvirt.devhelp $(HTML_FILES)
-       $(mkinstalldirs) $(DESTDIR)$(DEVHELP_DIR)
-       -@INSTALL@ -m 0644 libvirt.devhelp $(DESTDIR)$(DEVHELP_DIR)
-       -@INSTALL@ -m 0644 $(HTML_FILES) $(DESTDIR)$(DEVHELP_DIR)
-       -for file in $(EXTRA_FORMAT); do \
-           @INSTALL@ -m 0644 $(srcdir)/$${file} $(DESTDIR)$(DEVHELP_DIR) ; \
-       done