Updated to use doc/common (id-docbook-common)
[yaz-moved-to-github.git] / doc / Makefile.am
1 ## $Id: Makefile.am,v 1.63 2006-04-20 11:56:20 adam Exp $
2
3 docdir=$(datadir)/doc/@PACKAGE@
4
5 XMLFILES=yaz.xml.in bookinfo.xml introduction.xml installation.xml \
6  indexdata.xml \
7  asn.xml tools.xml odr.xml comstack.xml frontend.xml license.xml \
8  future.xml client.xml zoom.xml credits.xml gfs-options.xml \
9  yaz-client-commands.xml soap.xml gfs-virtual.xml gfs-synopsis.xml
10
11 HTMLFILES = \
12  asn.external.html asn.html asn.oid.html asn.pdu.html asn.preparing.html \
13  client.commands.html client.html client.invoking.html client.searching.html \
14  comstack.addresses.html comstack.client.html comstack.common.html \
15  comstack.diagnostics.html comstack.html comstack.introduction.html \
16  comstack.server.html comstack.ssl.html comstack.summary.html \
17  credits.html future.html \
18  indexdata.html installation.html installation.unix.html \
19  installation.win32.html introduction.api.html introduction.html \
20  license.html license.other.html odr.debugging.html odr.html \
21  odr.programming.html odr.use.html server.backendfunctions.html \
22  server.backend.html server.frontend.html server.html server.invocation.html \
23  server.main.html server.vhosts.html \
24  soap.html soap.http.html soap.xml.html soap.srw.html \
25  tools.html tools.marc.html tools.nmem.html tools.log.html tools.oid.html \
26  yaz.html zoom.events.html zoom.ext.html zoom.html zoom.options.html \
27  zoom.query.html zoom.records.html zoom.resultsets.html zoom.scan.html
28
29 MANFILES=yaz-client.1 yaz-ztest.8 \
30         yaz-config.8 yaz.7 zoomsh.1 yaz-asncomp.1 \
31         yaz-marcdump.1 yaz-iconv.1 yaz-log.7
32 REFFILES=yaz-client-man.xml yaz-ztest-man.xml yaz-config-man.xml \
33         yaz-man.xml zoomsh-man.xml yaz-asncomp-man.xml \
34         yaz-marcdump-man.xml yaz-iconv-man.xml yaz-log-man.xml
35
36 SUPPORTFILES=entities.ent apilayer.obj 
37
38 doc_DATA = $(HTMLFILES) yaz.pdf apilayer.png 
39 man_MANS = $(MANFILES)
40
41 EXTRA_DIST = $(XMLFILES) $(SUPPORTFILES) $(man_MANS) $(REFFILES) \
42         $(doc_DATA) Doxyfile
43
44 yaz-client.1: $(srcdir)/yaz-client-man.xml $(srcdir)/yaz-client-commands.xml
45         docbook2man $(srcdir)/yaz-client-man.xml
46
47 yaz-ztest.8: yaz-ztest-man.xml gfs-options.xml gfs-synopsis.xml gfs-virtual.xml
48         docbook2man $(srcdir)/yaz-ztest-man.xml
49
50 yaz-config.8: yaz-config-man.xml
51         docbook2man $(srcdir)/yaz-config-man.xml
52
53 yaz.7: yaz-man.xml
54         docbook2man $(srcdir)/yaz-man.xml
55
56 zoomsh.1: zoomsh-man.xml
57         docbook2man $(srcdir)/zoomsh-man.xml
58
59 yaz-asncomp.1: yaz-asncomp-man.xml
60         docbook2man $(srcdir)/yaz-asncomp-man.xml
61
62 yaz-marcdump.1: yaz-marcdump-man.xml
63         docbook2man $(srcdir)/yaz-marcdump-man.xml
64
65 yaz-iconv.1: yaz-iconv-man.xml
66         docbook2man $(srcdir)/yaz-iconv-man.xml
67
68 yaz-log.7: yaz-log-man.xml
69         docbook2man $(srcdir)/yaz-log-man.xml
70
71 $(HTMLFILES): $(XMLFILES)  
72         jade -E14 -D $(srcdir) -d common/html.dsl -t sgml $(srcdir)/common/xml.dcl yaz.xml
73
74 yaz.pdf: $(XMLFILES)
75         if test ! -f common/id.png ; then cp  $(srcdir)/id.png common; fi
76         if test ! -f apilayer.png ; then cp $(srcdir)/apilayer.png .; fi
77         jade -E14 -D $(srcdir) -d common/print.dsl -t tex $(srcdir)/common/xml.dcl yaz.xml
78         pdfjadetex yaz.tex >/dev/null
79         pdfjadetex yaz.tex >/dev/null
80         pdfjadetex yaz.tex >/dev/null
81
82 index.tkl: $(XMLFILES) common/tkl.xsl
83         xsltproc common/tkl.xsl yaz.xml
84
85 apilayer.png: 
86         tgif -print -xbm apilayer.obj
87         xbmtopbm <apilayer.xbm|pnmtopng >apilayer.png
88
89 dist-hook:
90         for f in $(srcdir)/*.html; do \
91                 found=0; \
92                 b=`basename $$f`; \
93                 for h in $(HTMLFILES); do \
94                         if test "$$h" = "$$b"; then \
95                                 found=1; \
96                         fi \
97                 done; \
98                 if test "$$found" = "0"; then \
99                         echo "$$b not found in HTMLFILES"; \
100                         exit 1; \
101                 fi \
102         done
103
104