Copy files rather than symlink
[idzebra-moved-to-github.git] / doc / Makefile.am
1 ## $Id: Makefile.am,v 1.44 2006-04-26 11:08:41 adam Exp $
2 docdir=$(datadir)/doc/@PACKAGE@
3
4 SUBDIRS = common
5
6 XMLFILES =  zebra.xml.in \
7    administration.xml \
8    architecture.xml \
9    examples.xml \
10    indexdata.xml \
11    installation.xml \
12    introduction.xml \
13    license.xml \
14    marc_indexing.xml \
15    quickstart.xml \
16    recordmodel-alvisxslt.xml \
17    recordmodel-grs.xml \
18    server.xml \
19    zebraidx-commands.xml \
20    zebraidx-options.xml \
21    zebraidx.xml \
22    zebrasrv-options.xml \
23    zebrasrv-synopsis.xml \
24    zebrasrv-virtual.xml
25
26
27 HTMLFILES =  \
28    administration-cql-to-pqf.html \
29    administration-extended-services.html \
30    administration-ranking.html \
31    administration.html \
32    apps.html \
33    architecture-maincomponents.html \
34    architecture-workflow.html \
35    architecture.html \
36    configuration-file.html \
37    example1.html \
38    example2.html \
39    examples.html \
40    features.html \
41    file-ids.html \
42    future.html \
43    generic-ids.html \
44    gfs-config.html \
45    grs-exchange-formats.html \
46    grs-internal-representation.html \
47    indexdata.html \
48    installation.debian.html \
49    installation.html \
50    installation.win32.html \
51    introduction.html \
52    license.html \
53    locating-records.html \
54    protocol-support.html \
55    quick-start.html \
56    record-model-alvisxslt-conf.html \
57    record-model-alvisxslt.html \
58    record-model-grs-conf.html \
59    record-model-grs.html \
60    register-location.html \
61    server-sru-support.html \
62    server-sru.html \
63    server.html \
64    shadow-registers.html \
65    simple-indexing.html \
66    support.html \
67    zebra.html \
68    zebraidx.html
69
70 PNGFILES=zebra.png
71 EPSFILES=zebra.eps
72
73 MANFILES=zebraidx.1 zebrasrv.8 idzebra-config.1
74
75 REFFILES=zebraidx-man.sgml zebrasrv-man.sgml idzebra-config-man.sgml
76
77 doc_DATA = $(HTMLFILES) zebra.pdf $(PNGFILES)
78 man_MANS = $(MANFILES)
79
80 EXTRA_DIST = $(XMLFILES) $(REFFILES) \
81         $(doc_DATA) $(EPSFILES) $(man_MANS) $(REFFILES) \
82         zvrank.txt marc_indexing.xml
83
84 zebraidx.1: zebraidx-man.sgml zebraidx-options.xml zebraidx-commands.xml
85         if test ! -f zebraidx-options.xml ; then ln -s $(srcdir)/zebraidx-options.xml .; fi
86         if test ! -f zebraidx-commands.xml ; then ln -s $(srcdir)/zebraidx-commands.xml .; fi
87         docbook2man $(srcdir)/zebraidx-man.sgml
88
89 # zebrasrv-commands.xml
90 zebrasrv.8: zebrasrv-man.sgml  zebrasrv-options.xml \
91             zebrasrv-synopsis.xml zebrasrv-virtual.xml
92         docbook2man $(srcdir)/zebrasrv-man.sgml
93
94 idzebra-config.1: idzebra-config-man.sgml
95         docbook2man $(srcdir)/idzebra-config-man.sgml
96
97 $(HTMLFILES): $(XMLFILES)
98         jade -E14 -D $(srcdir) -d common/html.dsl -t sgml $(srcdir)/common/xml.dcl zebra.xml
99
100 zebra.pdf: $(XMLFILES)
101         for i in $(PNGFILES); do \
102                 if test ! -f $$i; then cp $(srcdir)/$$i .; fi; \
103         done
104         jade -E14 -D $(srcdir) -d common/print.dsl -t tex $(srcdir)/common/xml.dcl zebra.xml
105         pdfjadetex zebra.tex >/dev/null
106         pdfjadetex zebra.tex >/dev/null
107         pdfjadetex zebra.tex >/dev/null
108
109 index.tkl: $(XMLFILES) common/tkl.xsl
110         xsltproc common/tkl.xsl zebra.xml
111
112 gils.txt: gils.sgml
113         sgml2txt -f gils.sgml
114
115 gils.ps: gils.sgml
116         sgml2latex -o ps -p a4 gils.sgml
117
118 gils.html: gils.sgml
119         sgml2html gils.sgml
120
121 clean-data-hook:
122         rm -f [0-9]* *.bak
123
124 dist-hook:
125         for f in $(srcdir)/*.html; do \
126                 found=0; \
127                 b=`basename $$f`; \
128                 for h in $(HTMLFILES); do \
129                         if test "$$h" = "$$b"; then \
130                                 found=1; \
131                         fi \
132                 done; \
133                 if test "$$found" = "0"; then \
134                         echo "$$f not found in HTMLFILES"; \
135                         exit 1; \
136                 fi \
137         done