RRDcached patch. This implements an infrastructure, where rrd updates can be
[rrdtool.git] / doc / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 SUFFIXES = .pod .1 .man .html .txt .pm .pdf .inc
4
5 #AUTOMAKE_OPTIONS        =  foreign
6
7 #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
8
9 CLEANFILES = *.1 *.html *.txt *-dircache RRD?.pod *.pdf *~ core *itemcache *.rej *.orig *.tmp
10
11 POD = bin_dec_hex.pod        rrddump.pod            rrdgraph_examples.pod  rrdrestore.pod         rrdupdate.pod  \
12       cdeftutorial.pod       rrdfetch.pod           rrdgraph_graph.pod     rrdthreads.pod         rrdxport.pod   \
13       rpntutorial.pod        rrdfirst.pod           rrdgraph_rpn.pod       rrdtool.pod            rrdcached.pod  \
14       rrd-beginners.pod      rrdinfo.pod            rrdtune.pod            rrdbuild.pod           rrdflush.pod   \
15       rrdcgi.pod             rrdgraph.pod           rrdlast.pod            rrdlastupdate.pod                     \
16       rrdcreate.pod          rrdgraph_data.pod      rrdresize.pod          rrdtutorial.pod                       
17
18
19 PMP = RRDs.pod RRDp.pod
20
21 MAN = $(POD:.pod=.1)
22 TXT = $(MAN:.1=.txt)
23 HTML = $(POD:.pod=.html) $(PMP:.pod=.html)
24 PDF = $(MAN:.1=.pdf)
25
26 # what should go into the distribution
27 EXTRA_DIST= $(POD) $(HTML) $(MAN) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd
28
29 idocdir = $(RRDDOCDIR)/txt
30 idoc_DATA = $(POD) $(TXT)
31 ihtmldir = $(RRDDOCDIR)/html
32 ihtml_DATA = $(HTML)
33 imandir = $(mandir)/man1
34 iman_DATA = $(MAN)
35
36 all-local: link txt man html-local
37
38 .src.pod:
39         perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print <F>; close F} else {print}'  $<  > $@
40
41 .pod.1 .pm.1 .pl.1:
42         @POD2MAN@ --release=$(VERSION) --center=rrdtool $<  > $@
43
44 .1.txt:
45         GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@
46
47 .1.pdf:
48         @TROFF@ -man $< | ps2pdf - $@
49
50 .pm.html .pod.html .pl.html:
51         @POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
52
53 RRDs.pod:
54         $(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
55
56 RRDp.pod:
57         $(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
58
59 link: RRDp.pod RRDs.pod
60
61 man: $(MAN)
62
63 html-local: $(HTML)
64
65 txt: $(TXT)
66
67 pdf-local: $(PDF)
68
69 pod: $(POD)
70
71 install-data-hook:
72         cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html