[libvirt] [PATCH 2/2] Fix rebuilding of devhelp files

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

 



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             |    1 -
 docs/Makefile.am         |   38 +++++++++++++++++++++++++++++++++++---
 docs/devhelp/Makefile.am |   31 -------------------------------
 3 files changed, 35 insertions(+), 35 deletions(-)
 delete mode 100644 docs/devhelp/Makefile.am

diff --git a/configure.in b/configure.in
index cb5ce55..02ca282 100644
--- a/configure.in
+++ b/configure.in
@@ -1685,7 +1685,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 \
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 5b04951..8832b72 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -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
index dbf47c7..0000000
--- a/docs/devhelp/Makefile.am
+++ /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
-- 
1.6.2.5

--
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]