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

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

man_MANS=

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

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

20 21 22 23 24 25 26 27 28 29 30 31
png = \
  16favicon.png \
  32favicon.png \
  footer_corner.png \
  footer_pattern.png \
  libvirHeader.png \
  libvirLogo.png \
  libvirt-header-bg.png \
  libvirt-header-logo.png \
  libvirtLogo.png \
  libvirt-net-logical.png \
  libvirt-net-physical.png \
D
Daniel Veillard 已提交
32 33 34
  libvirt-daemon-arch.png \
  libvirt-driver-arch.png \
  libvirt-object-model.png \
35 36 37
  madeWith.png \
  windows-cygwin-1.png \
  windows-cygwin-2.png \
38 39
  windows-cygwin-3.png \
  et.png
40

J
Jim Meyering 已提交
41 42 43
gif = \
  Libxml2-Logo-90x34.gif \
  architecture.gif \
44
  node.gif
J
Jim Meyering 已提交
45

46 47
dot_html_in = $(wildcard *.html.in)
dot_html = $(dot_html_in:%.html.in=%.html)
J
Jim Meyering 已提交
48

49 50
patches = $(wildcard api_extension/*.patch)

J
Jim Meyering 已提交
51 52 53 54 55 56 57
xml = \
  libvirt-api.xml \
  libvirt-refs.xml \
  testdomfc4.xml \
  testdomfv0.xml \
  testnetdef.xml \
  testnetpriv.xml \
J
Jim Meyering 已提交
58 59 60
  testnode.xml \
  testpool.xml \
  testvol.xml
J
Jim Meyering 已提交
61

62 63
fig = \
  libvirt-net-logical.fig \
D
Daniel Veillard 已提交
64 65 66 67
  libvirt-net-physical.fig \
  libvirt-daemon-arch.fig \
  libvirt-driver-arch.fig \
  libvirt-object-model.fig
68

J
Jim Meyering 已提交
69 70
EXTRA_DIST=					\
  libvirt-api.xml libvirt-refs.xml apibuild.py	\
71
  site.xsl newapi.xsl news.xsl page.xsl	ChangeLog.xsl	\
72
  $(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
73
  $(xml) $(fig) $(png) \
74
  $(patches) \
75
  virsh.pod ChangeLog.awk
J
Jim Meyering 已提交
76

77
all: web $(top_builddir)/NEWS $(man_MANS)
78

79
virsh.1: virsh.pod
80
	pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" $(srcdir)/virsh.pod > $@-t
J
Jim Meyering 已提交
81 82
	mv $@-t $@
	cp $@ $(top_builddir)
83

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

86
web: $(dot_html)
87

88 89 90 91 92 93 94 95 96
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 已提交
97 98 99
%.png: %.fig
	convert -rotate 90 $< $@

100 101 102 103 104 105 106
%.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
107 108
	@(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 \
109
	  echo "Validating $@" ; \
110 111
	  $(XMLLINT) --nonet --format --valid $< > $@ || : ; \
	  else echo "missing XHTML1 DTD" ; fi ; fi );
112 113


114
$(srcdir)/html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
115 116
	-@(if [ -x $(XSLTPROC) ] ; then \
	  echo "Rebuilding the HTML pages from the XML API" ; \
117
	  $(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi )
118 119
	-@(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 \
120
	  echo "Validating the resulting XHTML pages" ; \
121 122
	  $(XMLLINT) --nonet --valid --noout html/*.html ; \
	  else echo "missing XHTML1 DTD" ; fi ; fi );
123

J
Jim Meyering 已提交
124 125 126
libvirt-api.xml libvirt-refs.xml: apibuild.py \
		$(srcdir)/../include/libvirt/*.h \
		$(srcdir)/../src/*.h $(srcdir)/../src/*.c
127 128
	-(./apibuild.py)

D
Daniel P. Berrange 已提交
129
$(top_builddir)/NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html.in
130 131 132 133 134
	-@(if [ -x $(XSLTPROC) ] ; then				\
	  $(XSLTPROC) --nonet $(top_srcdir)/docs/news.xsl	\
	     $(top_srcdir)/docs/news.html.in			\
	   | perl -0777 -pe 's/\n\n+$$/\n/'			\
	   > $@-t && mv $@-t $@ ; fi );
135

136 137 138 139
clean-local:
	rm -f *~ *.bak *.hierarchy *.signals *-unused.txt

maintainer-clean-local: clean-local
140
	rm -rf libvirt-api.xml libvirt-refs.xml
141 142 143

rebuild: api all

144
install-data-local:
145
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
146 147
	-@INSTALL@ -m 0644 $(srcdir)/FAQ.html \
	    $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
148
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
149
	for h in $(apihtml); do \
150
	  $(INSTALL) -m 0644 $(srcdir)/$$h $(DESTDIR)$(HTML_DIR)/html; done
151
	for p in $(apipng); do \
152
	  $(INSTALL) -m 0644 $(srcdir)/$$p $(DESTDIR)$(HTML_DIR)/html; done
J
Jim Meyering 已提交
153 154

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