Fixed 'make distcheck'. Failed due to html files not being removed by
[yazpp-moved-to-github.git] / doc / Makefile.am
1 ## $Id: Makefile.am,v 1.24 2006-10-11 09:39:43 adam Exp $
2 docdir=$(datadir)/doc/@PACKAGE@
3
4 SUBDIRS = common
5
6 XMLFILES = \
7  introduction.xml \
8  installation.xml \
9  zoom.xml \
10  api.xml \
11  license.xml \
12  yazpp.xml
13
14 TOP = $(srcdir)/yazpp.xml
15
16 MANFILES = yazpp-config.8
17
18 REFFILES = yazpp-config-man.xml
19
20 HTMLFILES = index.html
21
22 doc_DATA = $(HTMLFILES) 
23
24 man_MANS = $(MANFILES)
25
26 EXTRA_DIST = $(XMLFILES) $(doc_DATA) $(man_MANS) $(REFFILES) \
27         entities.ent local.ent.in
28
29 $(HTMLFILES): $(XMLFILES)
30         rm -f *.html
31         $(HTML_COMPILE) $(TOP)
32
33 index.tkl: $(XMLFILES) common/tkl.xsl
34         $(TKL_COMPILE) $(TOP)
35
36 yazpp-config.8: yazpp-config-man.xml
37         $(MAN_COMPILE) $(srcdir)/yazpp-config-man.xml
38
39 yazpp.pdf: $(XMLFILES)
40         if test ! -f common/id.png ; then cp $(srcdir)/common/id.png common/; fi
41         jade -E14 -D $(srcdir) -d common/print.dsl -t tex $(srcdir)/common/xml.dcl $(TOP)
42         pdfjadetex yazpp.tex >pdfjadetex.log 2>&1
43         pdfjadetex yazpp.tex >pdfjadetex.log 2>&1
44         pdfjadetex yazpp.tex >pdfjadetex.log 2>&1
45
46
47 clean-data-hook:
48         rm -f [0-9]* *.bak
49
50 dist-hook:
51         if test -f index.html; then d=.; else d="$(srcdir)"; fi; \
52         for p in $$d/*.html; do \
53                 cp $$p $(distdir); \
54         done
55
56 install-data-hook:
57         if test -f index.html; then d=.; else d="$(srcdir)"; fi; \
58         for p in $$d/*.html; do \
59                 $(docDATA_INSTALL) $$p $(DESTDIR)/$(docdir); \
60         done
61
62 uninstall-hook:
63         rm -r $(DESTDIR)/$(docdir)