1 ## Process this file with automake to produce Makefile.in
3 SUFFIXES = .pod .pl .1 .3 .man .html .txt .pm .pdf .inc
5 AUTOMAKE_OPTIONS = foreign
7 #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
9 CLEANFILES = *.1 *.3 *.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
18 if BUILD_LIBDBI
19 POD += rrdgraph_libdbi.pod
20 endif
22 if BUILD_LUA
23 POD += rrdlua.pod
24 endif
26 POD3 = librrd.pod
28 PMP = RRDs.pod RRDp.pod
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)
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
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)
48 all-local: link man txt html-local
50 .src.pod:
51 perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print <F>; close F} else {print}' $< > $@
53 .pod.1 .pm.1 .pl.1:
54 $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool $< > $@
56 .pod.3:
57 $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool --section=3 $< > $@
59 .1.txt .3.txt:
60 $(AM_V_GEN)GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@
62 .1.pdf .3.pdf:
63 $(AM_V_GEN)@TROFF@ -man $< | ps2pdf - $@
65 .pm.html .pod.html .pl.html:
66 $(AM_V_GEN)@POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
68 RRDs.pod:
69 $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
71 RRDp.pod:
72 $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
74 link: RRDp.pod RRDs.pod
76 man: $(MAN) $(MAN3)
78 html-local: $(HTML)
80 txt: $(TXT)
82 pdf-local: $(PDF)
84 pod: $(POD) $(POD3)
86 install-data-hook:
87 $(AM_V_GEN)cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html