For PDF documentation, use dblatex instead of pdfjadetex
[metaproxy-moved-to-github.git] / doc / Makefile.am
1 ## $Id: Makefile.am,v 1.35 2007-01-18 09:20:52 adam Exp $
2 docdir=$(datadir)/doc/@PACKAGE@
3
4 SUBDIRS = common
5
6 SUFFIXES=.3mp .1 .pdf .tkl .esp .xml 
7
8 XMLFILES = book.xml manref.xml copyright.xml
9
10 MAINXML = $(srcdir)/book.xml
11
12 XMLMAN = metaproxy.xml \
13         auth_simple.xml \
14         backend_test.xml \
15         bounce.xml \
16         frontend_net.xml \
17         http_file.xml \
18         load_balance.xml \
19         log.xml \
20         multi.xml \
21         query_rewrite.xml \
22         record_transform.xml\
23         session_shared.xml \
24         sru_z3950.xml\
25         template.xml \
26         virt_db.xml \
27         z3950_client.xml \
28         zeerex_explain.xml
29
30 MANFILES = metaproxy.1 \
31         auth_simple.3mp \
32         backend_test.3mp  \
33         bounce.3mp \
34         frontend_net.3mp \
35         http_file.3mp \
36         load_balance.3mp \
37         log.3mp \
38         multi.3mp query_rewrite.3mp \
39         record_transform.3mp\
40         session_shared.3mp \
41         sru_z3950.xml\
42         template.3mp \
43         virt_db.3mp \
44         z3950_client.3mp \
45         zeerex_explain.3mp
46
47
48 HTMLFILES = index.html
49
50 # testing if this does the job of collecting up the unnamed '*.html' files 
51 #UNLISTEDHTML = $(wildcard *.html)
52
53 PNGFILES = multi.png
54
55 doc_DATA = $(HTMLFILES) $(PNGFILES)
56 man_MANS = $(MANFILES)
57
58 EXTRA_DIST = $(XMLFILES) $(XMLMAN) $(doc_DATA) $(man_MANS) multi.svg 
59
60 $(HTMLFILES): $(XMLFILES) $(PNGFILES)
61         rm -f *.html
62         $(HTML_COMPILE) $(MAINXML)
63
64 .xml.3mp:
65         $(MAN_COMPILE) $<
66
67 .xml.1:
68         $(MAN_COMPILE) $<
69
70 index.tkl: $(XMLFILES)
71         $(TKL_COMPILE) $(MAINXML)
72
73 metaproxy.pdf: $(XMLFILES) multi.pdf
74         for i in $(PNGFILES) common/id.png multi.pdf; do \
75                 if test ! -f $$i; then cp $(srcdir)/$$i $$i; fi; \
76         done
77         dblatex $(MAINXML)
78         mv book.pdf metaproxy.pdf
79
80 manref.xml: $(XMLMAN) $(srcdir)/common/stripref.xsl
81         rm -f manref.xml
82         for i in $(XMLMAN); do \
83                 xsltproc $(srcdir)/common/stripref.xsl $(srcdir)/$$i | sed 1d >> manref.xml; \
84         done
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 .eps.pdf:
93         epstopdf -hires $?
94
95
96 clean-data-hook:
97         rm -f [0-9]* *.bak
98
99 dist-hook:
100         if test -f index.html; then d=.; else d="$(srcdir)"; fi; \
101         for p in $$d/*.html; do \
102                 cp $$p $(distdir); \
103         done
104
105 install-data-hook:
106         if test -f index.html; then d=.; else d="$(srcdir)"; fi; \
107         for p in $$d/*.html; do \
108                 $(docDATA_INSTALL) $$p $(DESTDIR)/$(docdir); \
109         done
110
111 uninstall-hook:
112         rm -r $(DESTDIR)/$(docdir)
113