Generate doc/local.ent via configure instead of doc/yazpp.xml.
[metaproxy-moved-to-github.git] / doc / Makefile.am
1 ## $Id: Makefile.am,v 1.23 2006-06-02 10:23:49 adam Exp $
2 docdir=$(datadir)/doc/@PACKAGE@
3
4 SUBDIRS = common
5
6 SUFFIXES=.3mp .1
7
8 XMLFILES = book.xml manref.xml progref.xml copyright.xml metaproxy.xml
9
10 MAINXML = $(srcdir)/book.xml
11
12 XMLMAN = auth_simple.xml backend_test.xml frontend_net.xml \
13         http_file.xml log.xml multi.xml query_rewrite.xml \
14         session_shared.xml template.xml virt_db.xml z3950_client.xml
15 MANFILES = auth_simple.3mp backend_test.3mp frontend_net.3mp \
16         http_file.3mp log.3mp multi.3mp query_rewrite.3mp \
17         session_shared.3mp template.3mp virt_db.3mp z3950_client.3mp \
18         metaproxy.1
19
20 HTMLFILES = architecture.html \
21         classes.html \
22         configuration.html \
23         example.configuration.html \
24         extensions.html \
25         filterref.html \
26         filters.html \
27         future.directions.html \
28         index.html \
29         individual.classes.html \
30         installation.html \
31         installation.debian.html \
32         installation.windows.html \
33         introduction.html \
34         licence.html \
35         multidb.html \
36         multidb.multi.html \
37         multidb.picture.html \
38         multidb.virt_db.html \
39         multidb.what.html \
40         other.source.files.html \
41         overview.filter.types.html \
42         overview.xml.structure.html \
43         refguide.html
44
45 PNGFILES = multi.png
46
47 doc_DATA = $(HTMLFILES) $(PNGFILES)
48 man_MANS = $(MANFILES)
49
50 EXTRA_DIST = $(XMLFILES) $(XMLMAN) $(doc_DATA) $(man_MANS) multi.svg
51
52 $(HTMLFILES): $(XMLFILES) multi.png
53         $(HTML_COMPILE) $(MAINXML)
54
55 .xml.3mp:
56         $(MAN_COMPILE) $<
57
58 .xml.1:
59         $(MAN_COMPILE) $<
60
61 index.tkl: $(XMLFILES)
62         $(TKL_COMPILE) $(MAINXML)
63
64 metaproxy.pdf: $(XMLFILES) multi.pdf
65         for i in $(PNGFILES) common/id.png multi.pdf; do \
66                 if test ! -f $$i; then cp $(srcdir)/$$i $$i; fi; \
67         done
68         jade -E14 -D $(srcdir) -d common/print.dsl -t tex $(srcdir)/common/xml.dcl $(MAINXML)
69         rm -f metaproxy.tex
70         mv book.tex metaproxy.tex
71         pdfjadetex metaproxy.tex >/dev/null
72         pdfjadetex metaproxy.tex >/dev/null
73         pdfjadetex metaproxy.tex >/dev/null
74
75 manref.xml: $(XMLMAN) $(srcdir)/common/ref2dbinc.xsl
76         rm -f manref.xml
77         for i in $(XMLMAN); do \
78                 xsltproc $(srcdir)/common/ref2dbinc.xsl $(srcdir)/$$i | sed 1d >> manref.xml; \
79         done
80
81 progref.xml: metaproxy.xml
82         rm -f $@
83         xsltproc $(srcdir)/common/ref2dbinc.xsl $? | sed 1d >> $@
84
85 multi.png: multi.svg
86         inkscape --export-png=$@ --export-width=800 --export-area-drawing $?
87
88 multi.eps: multi.svg
89         inkscape --export-eps=$@ --export-bbox-page $?
90
91 %.pdf: %.eps
92         epstopdf -hires $?
93
94 clean-data-hook:
95         rm -f [0-9]* *.bak
96
97 dist-hook:
98         for f in *.html; do \
99                 found=0; \
100                 b=`basename $$f`; \
101                 for h in $(HTMLFILES); do \
102                         if test "$$h" = "$$b"; then \
103                                 found=1; \
104                         fi \
105                 done; \
106                 if test "$$found" = "0"; then \
107                         echo "$$f not found in HTMLFILES"; \
108                         exit 1; \
109                 fi \
110         done