Makefile.am 3.8 KB
Newer Older
1
## Process this file with automake to produce Makefile.in
2
SUBDIRS= . 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 32 33 34
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 \
  madeWith.png \
  windows-cygwin-1.png \
  windows-cygwin-2.png \
35 36
  windows-cygwin-3.png \
  et.png
37

J
Jim Meyering 已提交
38 39 40
gif = \
  Libxml2-Logo-90x34.gif \
  architecture.gif \
41
  node.gif
J
Jim Meyering 已提交
42

43 44
dot_html_in = $(wildcard *.html.in)
dot_html = $(dot_html_in:%.html.in=%.html)
J
Jim Meyering 已提交
45 46 47 48 49 50 51 52 53 54 55 56 57 58

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

rng = \
  libvirt.rng \
  network.rng

59 60 61 62
fig = \
  libvirt-net-logical.fig \
  libvirt-net-physical.fig

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

70
all: web $(top_builddir)/NEWS $(man_MANS)
71

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

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

79
web: $(dot_html)
80

81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
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 )

%.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
	@(if [ -x $(XMLLINT) ] ; then \
	  echo "Validating $@" ; \
	  $(XMLLINT) --nonet --format --valid $< > $@ || : ; fi );
100 101


102
$(srcdir)/html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
103 104
	-@(if [ -x $(XSLTPROC) ] ; then \
	  echo "Rebuilding the HTML pages from the XML API" ; \
105
	  $(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi )
106 107 108
	-@(if [ -x $(XMLLINT) ] ; then \
	  echo "Validating the resulting XHTML pages" ; \
	  $(XMLLINT) --nonet --valid --noout html/*.html ; 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
	-@(if [ -x $(XSLTPROC) ] ; then \
D
Daniel P. Berrange 已提交
117
	  $(XSLTPROC) --nonet $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html.in > $(top_builddir)/NEWS ; fi );
118

119 120 121 122
clean-local:
	rm -f *~ *.bak *.hierarchy *.signals *-unused.txt

maintainer-clean-local: clean-local
123
	rm -rf libvirt-api.xml libvirt-refs.xml
124 125 126

rebuild: api all

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

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