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