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

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

7 8
DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt

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
devhelphtml =			\
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
  devhelp/libvirt.devhelp	\
  devhelp/index.html		\
  devhelp/general.html		\
  devhelp/libvirt-libvirt.html	\
  devhelp/libvirt-virterror.html

devhelppng =		\
  devhelp/home.png	\
  devhelp/left.png	\
  devhelp/right.png	\
  devhelp/up.png

devhelpcss = devhelp/style.css

devhelpxsl = devhelp/devhelp.xsl devhelp/html.xsl

37 38 39 40 41 42 43 44 45
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 已提交
46 47 48
  libvirt-daemon-arch.png \
  libvirt-driver-arch.png \
  libvirt-object-model.png \
49
  madeWith.png \
50
  et.png
51

J
Jim Meyering 已提交
52 53
gif = \
  architecture.gif \
54
  node.gif
J
Jim Meyering 已提交
55

56 57
dot_html_in = $(wildcard *.html.in)
dot_html = $(dot_html_in:%.html.in=%.html)
J
Jim Meyering 已提交
58

59 60
patches = $(wildcard api_extension/*.patch)

J
Jim Meyering 已提交
61 62
xml = \
  libvirt-api.xml \
63
  libvirt-refs.xml
J
Jim Meyering 已提交
64

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

J
Jim Meyering 已提交
72 73
EXTRA_DIST=					\
  libvirt-api.xml libvirt-refs.xml apibuild.py	\
74
  site.xsl newapi.xsl news.xsl page.xsl	ChangeLog.xsl	\
75
  $(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
76
  $(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \
77
  $(xml) $(fig) $(png) \
78
  $(patches) \
79
  sitemap.html.in \
80
  ChangeLog.awk
J
Jim Meyering 已提交
81

82
MAINTAINERCLEANFILES = $(dot_html) $(apihtml) $(devhelphtml)
83

84
all: web
85

86
api: libvirt-api.xml libvirt-refs.xml
87

88
web: $(dot_html) html/index.html devhelp/index.html
89

90 91 92 93
ChangeLog.xml: ../ChangeLog ChangeLog.awk
	awk -f ChangeLog.awk < $< > $@

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

D
Daniel Veillard 已提交
100 101 102
%.png: %.fig
	convert -rotate 90 $< $@

103
%.html.tmp: %.html.in site.xsl page.xsl sitemap.html.in
104
	@if [ -x $(XSLTPROC) ] ; then \
105 106
	  echo "Generating $@"; \
	  name=`echo $@ | sed -e 's/.tmp//'`; \
107 108 109
	  $(XSLTPROC) --stringparam pagename $$name --nonet --html \
	    $(top_srcdir)/docs/site.xsl $< > $@ \
	    || { rm $@ && exit 1; }; fi
110 111

%.html: %.html.tmp
112 113 114
	@if test -x $(XMLLINT) && test -x $(XMLCATALOG) ; then \
	  if $(XMLCATALOG) /etc/xml/catalog \
	    "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \
115
	  echo "Validating $@" ; \
116 117 118
	  $(XMLLINT) --nonet --format --valid $< > $@ \
	  || { rm $@ && exit 1; }; \
	  else echo "missing XHTML1 DTD" ; fi ; fi
119 120


121
html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
122
	-@if [ -x $(XSLTPROC) ] ; then \
123
	  echo "Rebuilding the HTML pages from the XML API" ; \
124 125
	  $(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi
	-@if test -x $(XMLLINT) && test -x $(XMLCATALOG) ; then \
E
Eric Blake 已提交
126 127
	  if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" \
	    > /dev/null ; then \
128
	  echo "Validating the resulting XHTML pages" ; \
129
	  $(XMLLINT) --nonet --valid --noout html/*.html ; \
130
	  else echo "missing XHTML1 DTD" ; fi ; fi
131

132
$(devhelphtml): libvirt-api.xml $(devhelpxsl)
133 134
	-@echo Rebuilding devhelp files
	-@if [ -x $(XSLTPROC) ] ; then \
135
	  $(XSLTPROC) --nonet -o devhelp/libvirt.devhelp \
136
	  $(top_srcdir)/docs/devhelp/devhelp.xsl libvirt-api.xml ; fi
137

138
html/%-%.html html/%-virterror.html %-api.xml %-refs.xml: $(srcdir)/apibuild.py
139
	-srcdir=$(srcdir) $(srcdir)/apibuild.py
140

141 142 143 144 145
html/%-%.html html/%-virterror.html %-api.xml %-refs.xml: \
		$(srcdir)/../include/%/*.h \
		$(srcdir)/../src/%.c \
		$(srcdir)/../src/util/virterror.c

146 147
check-local: all

148 149 150 151
clean-local:
	rm -f *~ *.bak *.hierarchy *.signals *-unused.txt

maintainer-clean-local: clean-local
152
	rm -rf libvirt-api.xml libvirt-refs.xml
153 154 155

rebuild: api all

156
install-data-local:
157
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
158
	-$(INSTALL) -m 0644 $(srcdir)/FAQ.html \
159
	    $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
160
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
161
	for h in $(apihtml); do \
162
	  $(INSTALL) -m 0644 $(srcdir)/$$h $(DESTDIR)$(HTML_DIR)/html; done
163
	for p in $(apipng); do \
164
	  $(INSTALL) -m 0644 $(srcdir)/$$p $(DESTDIR)$(HTML_DIR)/html; done
165 166
	$(mkinstalldirs) $(DESTDIR)$(DEVHELP_DIR)
	for file in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
167
	    $(INSTALL) -m 0644 $(srcdir)/$${file} $(DESTDIR)$(DEVHELP_DIR) ; \
168
	done
J
Jim Meyering 已提交
169 170

uninstall-local:
171 172
	for h in $(apihtml); do rm $(DESTDIR)$(HTML_DIR)/$$h; done
	for p in $(apipng); do rm $(DESTDIR)$(HTML_DIR)/$$p; done
173
	for f in $(devhelphtml) $(devhelppng) $(devhelpcss); do \
174 175
	  rm $(DESTDIR)$(DEVHELP_DIR)/$$(basename $$f); \
	done