Silence automake portability warnings caused by multiple inference rules. -- kevin...
[rrdtool.git] / doc / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 SUFFIXES = .pod .pl .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           rrdflushcached.pod   \
15       rrdcgi.pod             rrdgraph.pod           rrdlast.pod            rrdlastupdate.pod                     \
16       rrdcreate.pod          rrdgraph_data.pod      rrdresize.pod          rrdtutorial.pod        librrd.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 PMP = RRDs.pod RRDp.pod
27
28 MAN = $(POD:.pod=.1)
29 TXT = $(MAN:.1=.txt)
30 HTML = $(POD:.pod=.html) $(PMP:.pod=.html)
31 PDF = $(MAN:.1=.pdf)
32
33 # what should go into the distribution
34 EXTRA_DIST= $(POD) $(HTML) $(MAN) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd rrdgraph_libdbi.pod rrdlua.pod
35
36 idocdir = $(RRDDOCDIR)/txt
37 idoc_DATA = $(POD) $(TXT)
38 ihtmldir = $(RRDDOCDIR)/html
39 ihtml_DATA = $(HTML)
40 imandir = $(mandir)/man1
41 iman_DATA = $(MAN)
42
43 all-local: link txt man html-local
44
45 .src.pod:
46         perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print <F>; close F} else {print}'  $<  > $@
47
48 .pod.1 .pm.1 .pl.1:
49         $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool $<  > $@
50
51 .1.txt:
52         $(AM_V_GEN)GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@
53
54 .1.pdf:
55         $(AM_V_GEN)@TROFF@ -man $< | ps2pdf - $@
56
57 .pm.html .pod.html .pl.html:
58         $(AM_V_GEN)@POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
59
60 RRDs.pod:
61         $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
62
63 RRDp.pod:
64         $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
65
66 link: RRDp.pod RRDs.pod
67
68 man: $(MAN)
69
70 html-local: $(HTML)
71
72 txt: $(TXT)
73
74 pdf-local: $(PDF)
75
76 pod: $(POD)
77
78 install-data-hook:
79         $(AM_V_GEN)cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html