Removed / in doc install rule to avoid double-slash (cygwin)
[idzebra-moved-to-github.git] / doc / Makefile.am
1 ## $Id: Makefile.am,v 1.73 2007-07-10 09:41:12 adam Exp $
2 SUBDIRS = common
3
4 XMLMAN = zebraidx.xml zebrasrv.xml idzebra-config.xml
5
6 XMLFILES =  \
7    administration.xml \
8    architecture.xml \
9    examples.xml \
10    field-structure.xml \
11    indexdata.xml \
12    installation.xml \
13    introduction.xml \
14    license.xml \
15    marc_indexing.xml \
16    querymodel.xml \
17    quickstart.xml \
18    recordmodel-domxml.xml \
19    recordmodel-alvisxslt.xml \
20    recordmodel-grs.xml \
21    manref.xml \
22    zebra.xml \
23    zebrasrv-options.xml \
24    zebrasrv-synopsis.xml \
25    zebrasrv-virtual.xml 
26
27 HTMLFILES = index.html
28
29 PNGFILES = zebra.png domfilter.png
30 EPSFILES = zebra.eps domfilter.eps
31 PDFFILES = zebra.pdf domfilter.pdf
32
33
34 MANFILES=zebraidx$(PACKAGE_SUFFIX).1 \
35         zebrasrv$(PACKAGE_SUFFIX).8 \
36         idzebra-config$(PACKAGE_SUFFIX).1
37
38 doc_DATA = $(HTMLFILES) $(PNGFILES)
39 man_MANS = $(MANFILES)
40
41 EXTRA_DIST = $(XMLFILES) $(XMLMAN) \
42         $(doc_DATA) zebra.eps $(man_MANS) \
43         marc_indexing.xml entities.ent local.ent.in domfilter.svg
44
45 zebraidx$(PACKAGE_SUFFIX).1: zebraidx.xml
46         $(MAN_COMPILE) $(srcdir)/zebraidx.xml
47         mv zebraidx.1 zebraidx$(PACKAGE_SUFFIX).1
48
49 zebrasrv$(PACKAGE_SUFFIX).8: zebrasrv.xml  zebrasrv-options.xml \
50             zebrasrv-synopsis.xml zebrasrv-virtual.xml
51         $(MAN_COMPILE) $(srcdir)/zebrasrv.xml
52         mv zebrasrv.8 zebrasrv$(PACKAGE_SUFFIX).8
53
54 idzebra-config$(PACKAGE_SUFFIX).1: idzebra-config.xml
55         $(MAN_COMPILE) $(srcdir)/idzebra-config.xml
56         mv idzebra-config.1 idzebra-config$(PACKAGE_SUFFIX).1
57
58 $(HTMLFILES): $(XMLFILES) $(PNGFILES)
59         rm -f *.html
60         $(HTML_COMPILE) $(srcdir)/zebra.xml
61
62 index.tkl: $(XMLFILES)
63         rm -f *.tkl
64         $(TKL_COMPILE) $(srcdir)/zebra.xml
65
66 zebra.pdf: $(XMLFILES) domfilter.pdf
67         for i in $(PNGFILES); do \
68                 if test ! -f $$i; then cp $(srcdir)/$$i .; fi; \
69         done
70         dblatex $(srcdir)/zebra.xml
71
72 manref.xml: $(XMLMAN) $(srcdir)/common/ref2dbinc.xsl
73         rm -f manref.xml
74         for i in $(XMLMAN); do \
75                 xsltproc $(srcdir)/common/stripref.xsl $(srcdir)/$$i | sed 1d >> manref.xml; \
76         done
77
78 gils.txt: gils.sgml
79         sgml2txt -f gils.sgml
80
81 gils.ps: gils.sgml
82         sgml2latex -o ps -p a4 gils.sgml
83
84 gils.html: gils.sgml
85         sgml2html gils.sgml
86
87 clean-data-hook:
88         rm -f [0-9]* *.bak
89
90 dist-hook:
91         if test -f index.html; then d=.; else d="$(srcdir)"; fi; \
92         for p in $$d/*.html; do \
93                 cp $$p $(distdir); \
94         done
95
96 install-data-hook:
97         cd $(DESTDIR)$(man1dir) && ln -sf zebraidx$(PACKAGE_SUFFIX).1 zebraidx.1
98         cd $(DESTDIR)$(man8dir) && ln -sf zebrasrv$(PACKAGE_SUFFIX).8 zebrasrv.8
99         cd $(DESTDIR)$(man1dir) && ln -sf idzebra-config$(PACKAGE_SUFFIX).1 idzebra-config.1
100         if test -f index.html; then d=.; else d="$(srcdir)"; fi; \
101         for p in $$d/*.html; do \
102                 $(docDATA_INSTALL) $$p $(DESTDIR)$(docdir); \
103         done
104
105 uninstall-hook:
106         rm -r $(DESTDIR)/$(docdir)
107
108 domfilter.png: domfilter.svg
109         inkscape --export-png=$@ --export-width=600 $?
110
111 domfilter.eps: domfilter.svg
112         inkscape --export-eps=$@ --export-bbox-page $?
113
114 .eps.pdf:
115         epstopdf -hires $?
116