Makefile.am 3.1 KB
Newer Older
1
## Process this file with automake to produce Makefile.in
2
SUBDIRS= . examples devhelp
3 4 5 6

# The directory containing the source code (if it contains documentation).
DOC_SOURCE_DIR=../src

7
PAGES= index.html bugs.html FAQ.html remote.html
8 9 10

man_MANS=

J
Jim Meyering 已提交
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
html =			\
  book1.html		\
  index.html		\
  libvirt-conf.html	\
  libvirt-lib.html	\
  libvirt-libvirt.html	\
  libvirt-virterror.html

png =		\
  left.png	\
  up.png	\
  home.png	\
  right.png

gif = \
  Libxml2-Logo-90x34.gif \
  architecture.gif \
  node.gif \
  redhat.gif

dot_html = \
  FAQ.html \
  architecture.html \
  bugs.html \
  downloads.html \
  errors.html \
  format.html \
  hvsupport.html \
  index.html \
  intro.html \
  libvir.html \
  news.html \
  python.html \
  remote.html \
  uri.html

xml = \
  libvirt-api.xml \
  libvirt-refs.xml \
  testdomfc4.xml \
  testdomfv0.xml \
  testnetdef.xml \
  testnetpriv.xml \
  testnode.xml

rng = \
  libvirt.rng \
  network.rng

EXTRA_DIST=					\
  libvirt-api.xml libvirt-refs.xml apibuild.py	\
D
Daniel Veillard 已提交
62
  site.xsl newapi.xsl news.xsl		\
J
Jim Meyering 已提交
63
  $(dot_html) $(gif) html			\
R
Richard W.M. Jones 已提交
64 65
  $(xml) $(rng) \
  virsh.pod
J
Jim Meyering 已提交
66

67
all: web $(top_builddir)/NEWS $(man_MANS)
68

69
virsh.1: virsh.pod
J
Jim Meyering 已提交
70 71 72
	pod2man -c "Virtualization Support" $(srcdir)/virsh.pod > $@-t
	mv $@-t $@
	cp $@ $(top_builddir)
73

D
Daniel Veillard 已提交
74
api: libvirt-api.xml libvirt-refs.xml $(srcdir)/html/index.html
75 76 77

web: $(PAGES)

78 79 80 81 82 83 84
$(PAGES): libvir.html site.xsl
	-@(if [ -x $(XSLTPROC) ] ; then \
	  echo "Rebuilding the HTML Web pages from libvir.html" ; \
	  $(XSLTPROC) --nonet --html $(top_srcdir)/docs/site.xsl $(top_srcdir)/docs/libvir.html > index.html ; fi );
	-@(if [ -x $(XMLLINT) ] ; then \
	  echo "Validating the HTML Web pages" ; \
	  $(XMLLINT) --nonet --valid --noout $(PAGES) ; fi );
85 86


87
$(srcdir)/html/index.html: libvirt-api.xml $(srcdir)/newapi.xsl
88 89
	-@(if [ -x $(XSLTPROC) ] ; then \
	  echo "Rebuilding the HTML pages from the XML API" ; \
90
	  $(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi )
91 92 93
	-@(if [ -x $(XMLLINT) ] ; then \
	  echo "Validating the resulting XHTML pages" ; \
	  $(XMLLINT) --nonet --valid --noout html/*.html ; fi );
94

J
Jim Meyering 已提交
95 96 97
libvirt-api.xml libvirt-refs.xml: apibuild.py \
		$(srcdir)/../include/libvirt/*.h \
		$(srcdir)/../src/*.h $(srcdir)/../src/*.c
98 99
	-(./apibuild.py)

100 101 102 103
$(top_builddir)/NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html
	-@(if [ -x $(XSLTPROC) ] ; then \
	  $(XSLTPROC) --nonet $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html > $(top_builddir)/NEWS ; fi );

104 105 106 107
clean-local:
	rm -f *~ *.bak *.hierarchy *.signals *-unused.txt

maintainer-clean-local: clean-local
108
	rm -rf libvirt-api.xml libvirt-refs.xml
109 110 111

rebuild: api all

112
install-data-local:
113
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
J
Jim Meyering 已提交
114 115 116
	-@INSTALL@ -m 0644 $(srcdir)/libvir.html $(srcdir)/FAQ.html \
	    $(srcdir)/redhat.gif $(srcdir)/Libxml2-Logo-90x34.gif \
	  $(DESTDIR)$(HTML_DIR)
117
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
J
Jim Meyering 已提交
118 119 120 121 122 123 124 125
	for h in $(html); do \
	  $(INSTALL) -m 0644 $(srcdir)/html/$$h $(DESTDIR)$(HTML_DIR)/html; done
	for p in $(png); do \
	  $(INSTALL) -m 0644 $(srcdir)/html/$$p $(DESTDIR)$(HTML_DIR)/html; done

uninstall-local:
	for h in $(html); do rm $(DESTDIR)$(HTML_DIR)/html/$$h; done
	for p in $(png); do rm $(DESTDIR)$(HTML_DIR)/html/$$p; done