Makefile.am 4.2 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 51 52 53 54 55 56 57

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

58 59
fig = \
  libvirt-net-logical.fig \
D
Daniel Veillard 已提交
60 61 62 63
  libvirt-net-physical.fig \
  libvirt-daemon-arch.fig \
  libvirt-driver-arch.fig \
  libvirt-object-model.fig
64

J
Jim Meyering 已提交
65 66
EXTRA_DIST=					\
  libvirt-api.xml libvirt-refs.xml apibuild.py	\
67
  site.xsl newapi.xsl news.xsl page.xsl	ChangeLog.xsl	\
68
  $(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
69
  $(xml) $(fig) $(png) \
70
  virsh.pod ChangeLog.awk
J
Jim Meyering 已提交
71

72
all: web $(top_builddir)/NEWS $(man_MANS)
73

74
virsh.1: virsh.pod
J
Jim Meyering 已提交
75 76 77
	pod2man -c "Virtualization Support" $(srcdir)/virsh.pod > $@-t
	mv $@-t $@
	cp $@ $(top_builddir)
78

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

81
web: $(dot_html)
82

83 84 85 86 87 88 89 90 91
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 已提交
92 93 94
%.png: %.fig
	convert -rotate 90 $< $@

95 96 97 98 99 100 101
%.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
102 103
	@(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 \
104
	  echo "Validating $@" ; \
105 106
	  $(XMLLINT) --nonet --format --valid $< > $@ || : ; \
	  else echo "missing XHTML1 DTD" ; fi ; fi );
107 108


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

J
Jim Meyering 已提交
119 120 121
libvirt-api.xml libvirt-refs.xml: apibuild.py \
		$(srcdir)/../include/libvirt/*.h \
		$(srcdir)/../src/*.h $(srcdir)/../src/*.c
122 123
	-(./apibuild.py)

D
Daniel P. Berrange 已提交
124
$(top_builddir)/NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html.in
125
	-@(if [ -x $(XSLTPROC) ] ; then \
D
Daniel P. Berrange 已提交
126
	  $(XSLTPROC) --nonet $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html.in > $(top_builddir)/NEWS ; fi );
127

128 129 130 131
clean-local:
	rm -f *~ *.bak *.hierarchy *.signals *-unused.txt

maintainer-clean-local: clean-local
132
	rm -rf libvirt-api.xml libvirt-refs.xml
133 134 135

rebuild: api all

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

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