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