Fix dist-hook so that make distcheck works
[yazproxy-moved-to-github.git] / doc / Makefile.am
1 ## $Id: Makefile.am,v 1.13 2006-06-28 21:45:49 adam Exp $
2 docdir=$(datadir)/doc/@PACKAGE@
3
4 SUBDIRS = common
5
6 XMLFILES = \
7  introduction.xml \
8  installation.xml \
9  reference.xml \
10  using.xml \
11  yaz-proxy-ref.xml \
12  yaz-proxy-man.xml \
13  license.xml \
14  yazproxy.xml
15  
16 TOP = $(srcdir)/yazproxy.xml
17
18 MANFILES = yazproxy.8
19
20 HTMLFILES =  \
21  installation.html \
22  introduction.html \
23  license.html \
24  other-optimizations.html \
25  otherinfo-encoding.html \
26  proxy-config-file.html \
27  proxy-keepalive.html \
28  proxy-reference.html \
29  proxy-target.html \
30  proxy-usage.html \
31  query-cache.html \
32  query-validation.html \
33  record-cache.html \
34  record-validation.html \
35  support.html \
36  using.html \
37  windows.html \
38  yazproxy-man.html \
39  yazproxy-schema.html \
40  index.html
41
42 doc_DATA = $(HTMLFILES)
43
44 man_MANS = $(MANFILES)
45
46 EXTRA_DIST = $(XMLFILES) $(doc_DATA) $(man_MANS) entities.ent local.ent
47
48 $(HTMLFILES): $(XMLFILES)
49         $(HTML_COMPILE) $(TOP)
50
51 yazproxy.8: yaz-proxy-man.xml yaz-proxy-ref.xml
52         $(MAN_COMPILE) $(srcdir)/yaz-proxy-man.xml
53
54 index.tkl: $(XMLFILES) common/tkl.xsl
55         $(TKL_COMPILE) $(TOP)
56
57
58 yazproxy.pdf: $(XMLFILES)
59         if test ! -f common/id.png ; then cp $(srcdir)/common/id.png common; fi
60         jade -E14 -D $(srcdir) -d common/print.dsl -t tex $(srcdir)/common/xml.dcl $(TOP)
61         pdfjadetex yazproxy.tex >pdfjadetex.log 2>&1
62         pdfjadetex yazproxy.tex >pdfjadetex.log 2>&1
63         pdfjadetex yazproxy.tex >pdfjadetex.log 2>&1
64
65 clean-data-hook:
66         rm -f [0-9]* *.bak
67
68 dist-hook:
69         if test -f index.html; then for f in *.html; do \
70                 found=0; \
71                 b=`basename $$f`; \
72                 for h in $(HTMLFILES); do \
73                         if test "$$h" = "$$b"; then \
74                                 found=1; \
75                         fi \
76                 done; \
77                 if test "$$found" = "0"; then \
78                         echo "$$h not found in HTMLFILES"; \
79                         exit 1; \
80                 fi \
81         done; fi
82