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