Moved the 'librrd' manpage to section 3 -- Sebastian Harl
[rrdtool.git] / doc / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 SUFFIXES = .pod .pl .1 .3 .man .html .txt .pm .pdf .inc
4
5 AUTOMAKE_OPTIONS        =  foreign
6
7 #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
8
9 CLEANFILES = *.1 *.3 *.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           rrdflushcached.pod   \
15       rrdcgi.pod             rrdgraph.pod           rrdlast.pod            rrdlastupdate.pod                     \
16       rrdcreate.pod          rrdgraph_data.pod      rrdresize.pod          rrdtutorial.pod
17
18 if BUILD_LIBDBI
19   POD += rrdgraph_libdbi.pod
20 endif
21
22 if BUILD_LUA
23   POD += rrdlua.pod
24 endif
25
26 POD3 = librrd.pod
27
28 PMP = RRDs.pod RRDp.pod
29
30 MAN = $(POD:.pod=.1)
31 MAN3 = $(POD3:.pod=.3)
32 TXT = $(MAN:.1=.txt) $(MAN3:.3=.txt)
33 HTML = $(POD:.pod=.html) $(POD3:.pod=.html) $(PMP:.pod=.html)
34 PDF = $(MAN:.1=.pdf) $(MAN3:.3=.pdf)
35
36 # what should go into the distribution
37 EXTRA_DIST= $(POD) $(POD3) $(HTML) $(MAN) $(MAN3) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd rrdgraph_libdbi.pod rrdlua.pod
38
39 idocdir = $(RRDDOCDIR)/txt
40 idoc_DATA = $(POD) $(TXT)
41 ihtmldir = $(RRDDOCDIR)/html
42 ihtml_DATA = $(HTML)
43 imandir = $(mandir)/man1
44 iman_DATA = $(MAN)
45 iman3dir = $(mandir)/man3
46 iman3_DATA = $(MAN3)
47
48 all-local: link man txt html-local
49
50 .src.pod:
51         perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print <F>; close F} else {print}'  $<  > $@
52
53 .pod.1 .pm.1 .pl.1:
54         $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool $<  > $@
55
56 .pod.3:
57         $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool --section=3 $< > $@
58
59 .1.txt .3.txt:
60         $(AM_V_GEN)GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@
61
62 .1.pdf .3.pdf:
63         $(AM_V_GEN)@TROFF@ -man $< | ps2pdf - $@
64
65 .pm.html .pod.html .pl.html:
66         $(AM_V_GEN)@POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
67
68 RRDs.pod:
69         $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
70
71 RRDp.pod:
72         $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
73
74 link: RRDp.pod RRDs.pod
75
76 man: $(MAN) $(MAN3)
77
78 html-local: $(HTML)
79
80 txt: $(TXT)
81
82 pdf-local: $(PDF)
83
84 pod: $(POD) $(POD3)
85
86 install-data-hook:
87         $(AM_V_GEN)cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html