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

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

7 8 9 10
apihtml =			\
  html/index.html		\
  html/libvirt-libvirt.html	\
  html/libvirt-virterror.html
J
Jim Meyering 已提交
11

12
apipng =	\
13 14 15 16
  html/left.png	\
  html/up.png	\
  html/home.png	\
  html/right.png
J
Jim Meyering 已提交
17

18 19 20 21 22 23 24 25 26
png = \
  32favicon.png \
  footer_corner.png \
  footer_pattern.png \
  libvirt-header-bg.png \
  libvirt-header-logo.png \
  libvirtLogo.png \
  libvirt-net-logical.png \
  libvirt-net-physical.png \
D
Daniel Veillard 已提交
27 28 29
  libvirt-daemon-arch.png \
  libvirt-driver-arch.png \
  libvirt-object-model.png \
30
  madeWith.png \
31
  et.png
32

J
Jim Meyering 已提交
33 34
gif = \
  architecture.gif \
35
  node.gif
J
Jim Meyering 已提交
36

37 38
dot_html_in = $(wildcard *.html.in)
dot_html = $(dot_html_in:%.html.in=%.html)
J
Jim Meyering 已提交
39

40 41
patches = $(wildcard api_extension/*.patch)

J
Jim Meyering 已提交
42 43 44 45 46 47 48
xml = \
  libvirt-api.xml \
  libvirt-refs.xml \
  testdomfc4.xml \
  testdomfv0.xml \
  testnetdef.xml \
  testnetpriv.xml \
J
Jim Meyering 已提交
49 50 51
  testnode.xml \
  testpool.xml \
  testvol.xml
J
Jim Meyering 已提交
52

53 54
fig = \
  libvirt-net-logical.fig \
D
Daniel Veillard 已提交
55 56 57 58
  libvirt-net-physical.fig \
  libvirt-daemon-arch.fig \
  libvirt-driver-arch.fig \
  libvirt-object-model.fig
59

J
Jim Meyering 已提交
60 61
EXTRA_DIST=					\
  libvirt-api.xml libvirt-refs.xml apibuild.py	\
62
  site.xsl newapi.xsl news.xsl page.xsl	ChangeLog.xsl	\
63
  $(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
64
  $(xml) $(fig) $(png) \
65
  $(patches) \
66
  ChangeLog.awk
J
Jim Meyering 已提交
67

68
all: web $(top_builddir)/NEWS
69

D
Daniel Veillard 已提交
70
api: libvirt-api.xml libvirt-refs.xml $(srcdir)/html/index.html
71

72
web: $(dot_html)
73

74 75 76 77 78 79 80 81 82
ChangeLog.xml: ../ChangeLog ChangeLog.awk
	awk -f ChangeLog.awk < $< > $@

ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl
	@(if [ -x $(XSLTPROC) ] ; then \
	  echo "Generating $@"; \
	  name=`echo $@ | sed -e 's/.tmp//'`; \
	  $(XSLTPROC) --nonet $(top_srcdir)/docs/ChangeLog.xsl $< > $@ || (rm $@ && exit 1) ; fi )

D
Daniel Veillard 已提交
83 84 85
%.png: %.fig
	convert -rotate 90 $< $@

86 87 88 89 90 91 92
%.html.tmp: %.html.in site.xsl page.xsl sitemap.html.in
	@(if [ -x $(XSLTPROC) ] ; then \
	  echo "Generating $@"; \
	  name=`echo $@ | sed -e 's/.tmp//'`; \
	  $(XSLTPROC) --stringparam pagename $$name --nonet --html $(top_srcdir)/docs/site.xsl $< > $@ || (rm $@ && exit 1) ; fi )

%.html: %.html.tmp
93 94
	@(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \
	  if $(XMLCATALOG) /etc/xml/catalog "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > /dev/null ; then \
95
	  echo "Validating $@" ; \
96 97
	  $(XMLLINT) --nonet --format --valid $< > $@ || : ; \
	  else echo "missing XHTML1 DTD" ; fi ; fi );
98 99


100
$(srcdir)/html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
101 102
	-@(if [ -x $(XSLTPROC) ] ; then \
	  echo "Rebuilding the HTML pages from the XML API" ; \
103
	  $(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi )
104 105
	-@(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \
	  if $(XMLCATALOG) /etc/xml/catalog "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > /dev/null ; then \
106
	  echo "Validating the resulting XHTML pages" ; \
107 108
	  $(XMLLINT) --nonet --valid --noout html/*.html ; \
	  else echo "missing XHTML1 DTD" ; fi ; fi );
109

J
Jim Meyering 已提交
110 111 112
libvirt-api.xml libvirt-refs.xml: apibuild.py \
		$(srcdir)/../include/libvirt/*.h \
		$(srcdir)/../src/*.h $(srcdir)/../src/*.c
113 114
	-(./apibuild.py)

D
Daniel P. Berrange 已提交
115
$(top_builddir)/NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html.in
116 117 118 119
	-@(if [ -x $(XSLTPROC) ] ; then				\
	  $(XSLTPROC) --nonet $(top_srcdir)/docs/news.xsl	\
	     $(top_srcdir)/docs/news.html.in			\
	   | perl -0777 -pe 's/\n\n+$$/\n/'			\
120
	   | perl -pe 's/[ \t]+$//'				\
121
	   > $@-t && mv $@-t $@ ; fi );
122

123 124 125 126
clean-local:
	rm -f *~ *.bak *.hierarchy *.signals *-unused.txt

maintainer-clean-local: clean-local
127
	rm -rf libvirt-api.xml libvirt-refs.xml
128 129 130

rebuild: api all

131
install-data-local:
132
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
133 134
	-@INSTALL@ -m 0644 $(srcdir)/FAQ.html \
	    $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
135
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
136
	for h in $(apihtml); do \
137
	  $(INSTALL) -m 0644 $(srcdir)/$$h $(DESTDIR)$(HTML_DIR)/html; done
138
	for p in $(apipng); do \
139
	  $(INSTALL) -m 0644 $(srcdir)/$$p $(DESTDIR)$(HTML_DIR)/html; done
J
Jim Meyering 已提交
140 141

uninstall-local:
142 143
	for h in $(apihtml); do rm $(DESTDIR)$(HTML_DIR)/$$h; done
	for p in $(apipng); do rm $(DESTDIR)$(HTML_DIR)/$$p; done