corrected bug in disthook rule which always wrote "zebraidx.html not found in HTMLFI...
[idzebra-moved-to-github.git] / doc / Makefile.am
1 ## $Id: Makefile.am,v 1.29 2006-01-17 21:26:43 marc 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  introduction.xml \
14  installation.xml \
15  quickstart.xml \
16  examples.xml \
17  administration.xml \
18  zebraidx.xml \
19  server.xml \
20  recordmodel.xml \
21  license.xml \
22  indexdata.xml \
23  zebraidx-options.xml \
24  zebraidx-commands.xml \
25  zebrasrv-options.xml \
26  zebrasrv-synopsis.xml \
27  zebrasrv-virtual.xml
28
29 HTMLFILES =  \
30  administration.html apps.html configuration-file.html data-model.html \
31  example1.html example2.html examples.html features.html file-ids.html \
32  formats.html future.html generic-ids.html indexdata.html \
33  installation.html installation.debian.html installation.win32.html \
34  internal-representation.html introduction.html \
35  license.html locating-records.html protocol-support.html quick-start.html \
36  record-model.html register-location.html server.html shadow-registers.html \
37  simple-indexing.html support.html zebra.html zebraidx.html 
38
39 PNGFILES=zebra.png
40 EPSFILES=zebra.eps
41
42 MANFILES=zebraidx.1 zebrasrv.8 idzebra-config.1
43
44 REFFILES=zebraidx-man.sgml zebrasrv-man.sgml idzebra-config-man.sgml
45
46 doc_DATA = $(HTMLFILES) zebra.pdf $(PNGFILES)
47 man_MANS = $(MANFILES)
48
49 EXTRA_DIST = $(XMLFILES) $(SUPPORTFILES) $(REFFILES) \
50         $(doc_DATA) $(EPSFILES) $(man_MANS) $(REFFILES) \
51         zvrank.txt marc_indexing.xml
52
53 zebraidx.1: zebraidx-man.sgml zebraidx-options.xml zebraidx-commands.xml
54         if test ! -f zebraidx-options.xml ; then ln -s $(srcdir)/zebraidx-options.xml .; fi
55         if test ! -f zebraidx-commands.xml ; then ln -s $(srcdir)/zebraidx-commands.xml .; fi
56         docbook2man $(srcdir)/zebraidx-man.sgml
57
58 # zebrasrv-commands.xml
59 zebrasrv.8: zebrasrv-man.sgml  zebrasrv-options.xml \
60             zebrasrv-synopsis.xml zebrasrv-virtual.xml
61         docbook2man $(srcdir)/zebrasrv-man.sgml
62
63 idzebra-config.1: idzebra-config-man.sgml
64         docbook2man $(srcdir)/idzebra-config-man.sgml
65
66 $(HTMLFILES): $(XMLFILES)
67         jade -E14 -D $(srcdir) -d zebrahtml.dsl -t sgml $(srcdir)/xml.dcl zebra.xml
68
69 zebra.php: $(XMLFILES)
70         jade -E14 -D $(srcdir) -d zebraphp.dsl -t sgml $(srcdir)/xml.dcl zebra.xml
71
72 zebra.pdf: $(XMLFILES)
73         for i in $(PNGFILES); do \
74                 if test ! -f $$i; then ln -s $(srcdir)/$$i .; fi; \
75         done
76         jade -E14 -D $(srcdir) -d zebraprint.dsl -t tex $(srcdir)/xml.dcl zebra.xml
77         pdfjadetex zebra.tex >/dev/null
78         pdfjadetex zebra.tex >/dev/null
79         pdfjadetex zebra.tex >/dev/null
80
81 index.tkl: $(XMLFILES) tkl.xsl
82         xsltproc tkl.xsl zebra.xml
83
84 gils.txt: gils.sgml
85         sgml2txt -f gils.sgml
86
87 gils.ps: gils.sgml
88         sgml2latex -o ps -p a4 gils.sgml
89
90 gils.html: gils.sgml
91         sgml2html gils.sgml
92
93 clean-data-hook:
94         rm -f [0-9]* *.bak
95
96 dist-hook:
97         for f in $(srcdir)/*.html; do \
98                 found=0; \
99                 b=`basename $$f`; \
100                 for h in $(HTMLFILES); do \
101                         if test "$$h" = "$$b"; then \
102                                 found=1; \
103                         fi \
104                 done; \
105                 if test "$$found" = "0"; then \
106                         echo "$$f not found in HTMLFILES"; \
107                         exit 1; \
108                 fi \
109         done