1 ## Process this file with automake to produce Makefile.in
3 SUFFIXES = .pod .1 .man .html .txt .pm .pdf .inc
5 #AUTOMAKE_OPTIONS = foreign
7 #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
9 CLEANFILES = *.1 *.html *.txt *-dircache RRD?.pod *.pdf *~ core *itemcache *.rej *.orig *.tmp
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
18 if BUILD_LIBDBI
19 POD += rrdgraph_libdbi.pod
20 endif
22 if BUILD_LUA
23 POD += rrdlua.pod
24 endif
26 PMP = RRDs.pod RRDp.pod
28 MAN = $(POD:.pod=.1)
29 TXT = $(MAN:.1=.txt)
30 HTML = $(POD:.pod=.html) $(PMP:.pod=.html)
31 PDF = $(MAN:.1=.pdf)
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
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)
43 all-local: link txt man html-local
45 .src.pod:
46 perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print <F>; close F} else {print}' $< > $@
48 .pod.1 .pm.1 .pl.1:
49 $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool $< > $@
51 .1.txt:
52 $(AM_V_GEN)GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@
54 .1.pdf:
55 $(AM_V_GEN)@TROFF@ -man $< | ps2pdf - $@
57 .pm.html .pod.html .pl.html:
58 $(AM_V_GEN)@POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
60 RRDs.pod:
61 $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
63 RRDp.pod:
64 $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
66 link: RRDp.pod RRDs.pod
68 man: $(MAN)
70 html-local: $(HTML)
72 txt: $(TXT)
74 pdf-local: $(PDF)
76 pod: $(POD)
78 install-data-hook:
79 $(AM_V_GEN)cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html