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