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