Add doc-clean rule
[yazpp-moved-to-github.git] / doc / Makefile.am
1 SUBDIRS = common
2
3 XMLFILES = \
4  introduction.xml \
5  installation.xml \
6  zoom.xml \
7  api.xml \
8  license.xml \
9  yazpp.xml
10
11 TOP = $(srcdir)/yazpp.xml
12
13 MANFILES = yazpp-config.8
14
15 REFFILES = yazpp-config-man.xml
16
17 HTMLFILES = index.html
18
19 doc_DATA = $(HTMLFILES) 
20
21 man_MANS = $(MANFILES)
22
23 EXTRA_DIST = $(XMLFILES) $(doc_DATA) $(man_MANS) $(REFFILES) \
24         entities.ent local.ent.in
25
26 $(HTMLFILES): $(XMLFILES)
27         rm -f *.html
28         $(HTML_COMPILE) $(TOP)
29
30 index.tkl: $(XMLFILES)
31         $(TKL_COMPILE) $(TOP)
32
33 yazpp-config.8: yazpp-config-man.xml
34         $(MAN_COMPILE) $(srcdir)/yazpp-config-man.xml
35
36 yazpp.pdf: $(XMLFILES)
37         if test ! -f common/id.png ; then cp $(srcdir)/common/id.png common/; fi
38         $(PDF_COMPILE) $(TOP)
39
40 clean-data-hook:
41         rm -f [0-9]* *.bak
42
43 dist-hook:
44         if test -f index.html; then d=.; else d="$(srcdir)"; fi; \
45         for p in $$d/*.html; do \
46                 cp $$p $(distdir); \
47         done
48
49 doc-clean:
50         rm -f *.html *.[0-9] *.pdf *.tkl
51
52 install-data-hook:
53         if test -f index.html; then d=.; else d="$(srcdir)"; fi; \
54         for p in $$d/*.html; do \
55                 $(docDATA_INSTALL) $$p $(DESTDIR)$(docdir); \
56         done
57
58 uninstall-hook:
59         rm -r $(DESTDIR)$(docdir)