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 64 65
  $(dot_html) $(gif) html			\
  $(xml) $(rng)

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

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

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

web: $(PAGES)

77 78 79 80 81 82 83
$(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 );
84 85


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

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

99 100 101 102
$(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 );

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

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

rebuild: api all

111 112
install-data-local: 
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
J
Jim Meyering 已提交
113 114 115
	-@INSTALL@ -m 0644 $(srcdir)/libvir.html $(srcdir)/FAQ.html \
	    $(srcdir)/redhat.gif $(srcdir)/Libxml2-Logo-90x34.gif \
	  $(DESTDIR)$(HTML_DIR)
116
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
J
Jim Meyering 已提交
117 118 119 120 121 122 123 124
	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