Fix test for index.html in dist/isntall hook
[yaz-moved-to-github.git] / doc / Makefile.am
1 ## $Id: Makefile.am,v 1.73 2006-09-07 10:01:50 adam Exp $
2
3 docdir=$(datadir)/doc/@PACKAGE@
4
5 SUBDIRS = common
6
7 XMLFILES=bookinfo.xml introduction.xml installation.xml \
8  indexdata.xml \
9  asn.xml tools.xml odr.xml comstack.xml frontend.xml license.xml \
10  future.xml client.xml zoom.xml credits.xml gfs-options.xml \
11  yaz.xml yaz-client-commands.xml soap.xml gfs-virtual.xml gfs-synopsis.xml
12
13 HTMLFILES = index.html
14
15 MANFILES=yaz-client.1 yaz-ztest.8 \
16         yaz-config.8 yaz.7 zoomsh.1 yaz-asncomp.1 \
17         yaz-marcdump.1 yaz-iconv.1 yaz-log.7
18 REFFILES=yaz-client-man.xml yaz-ztest-man.xml yaz-config-man.xml \
19         yaz-man.xml zoomsh-man.xml yaz-asncomp-man.xml \
20         yaz-marcdump-man.xml yaz-iconv-man.xml yaz-log-man.xml
21
22 SUPPORTFILES=entities.ent apilayer.obj local.ent.in
23
24 doc_DATA = $(HTMLFILES) apilayer.png 
25 man_MANS = $(MANFILES)
26
27 EXTRA_DIST = $(XMLFILES) $(SUPPORTFILES) $(man_MANS) $(REFFILES) \
28         $(doc_DATA)
29
30 yaz-client.1: $(srcdir)/yaz-client-man.xml $(srcdir)/yaz-client-commands.xml
31         $(MAN_COMPILE) $(srcdir)/yaz-client-man.xml
32
33 yaz-ztest.8: yaz-ztest-man.xml gfs-options.xml gfs-synopsis.xml gfs-virtual.xml
34         $(MAN_COMPILE) $(srcdir)/yaz-ztest-man.xml
35
36 yaz-config.8: yaz-config-man.xml
37         $(MAN_COMPILE) $(srcdir)/yaz-config-man.xml
38
39 yaz.7: yaz-man.xml
40         $(MAN_COMPILE) $(srcdir)/yaz-man.xml
41
42 zoomsh.1: zoomsh-man.xml
43         $(MAN_COMPILE) $(srcdir)/zoomsh-man.xml
44
45 yaz-asncomp.1: yaz-asncomp-man.xml
46         $(MAN_COMPILE) $(srcdir)/yaz-asncomp-man.xml
47
48 yaz-marcdump.1: yaz-marcdump-man.xml
49         $(MAN_COMPILE) $(srcdir)/yaz-marcdump-man.xml
50
51 yaz-iconv.1: yaz-iconv-man.xml
52         $(MAN_COMPILE) $(srcdir)/yaz-iconv-man.xml
53
54 yaz-log.7: yaz-log-man.xml
55         $(MAN_COMPILE) $(srcdir)/yaz-log-man.xml
56
57 $(HTMLFILES): $(XMLFILES)
58         rm -f *.html
59         $(HTML_COMPILE) $(srcdir)/yaz.xml
60
61 index.tkl: $(XMLFILES)
62         rm -f *.tkl
63         $(TKL_COMPILE) $(srcdir)/yaz.xml
64
65 yaz.pdf: $(XMLFILES)
66         if test ! -f common/id.png ; then cp $(srcdir)/common/id.png common; fi
67         if test ! -f apilayer.png ; then cp $(srcdir)/apilayer.png .; fi
68         jade -E14 -D $(srcdir) -d common/print.dsl -t tex $(srcdir)/common/xml.dcl $(srcdir)/yaz.xml
69         pdfjadetex yaz.tex 
70         pdfjadetex yaz.tex >/dev/null
71         pdfjadetex yaz.tex >/dev/null
72
73 apilayer.png: 
74         tgif -print -xbm apilayer.obj
75         xbmtopbm <apilayer.xbm|pnmtopng >apilayer.png
76
77 dist-hook:
78         if test -f index.html; then d=.; else d="$(srcdir)"; fi; \
79         for p in $$d/*.html; do \
80                 cp $$p $(distdir); \
81         done
82
83 install-data-hook:
84         if test -f index.html; then d=.; else d="$(srcdir)"; fi; \
85         for p in $$d/*.html; do \
86                 $(docDATA_INSTALL) $$p $(DESTDIR)/$(docdir); \
87         done