1 ## Process this file with automake to produce Makefile.in
3 SUFFIXES = .pod .1 .man .html .txt .pm .pdf .src .inc
5 #AUTOMAKE_OPTIONS = foreign
7 #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
9 CLEANFILES = *.1 *.html *.txt *-dircache *.pm *.pdf *~ core *itemcache *.rej *.orig rrdgraph_*.pod
11 SRC = rrdgraph.src rrdgraph_examples.src rrdgraph_rpn.src \
12 rrdgraph_data.src rrdgraph_graph.src
14 POD = rrdtool.pod rrdlast.pod rrdcreate.pod rrdupdate.pod rrdtutorial.es.pod \
15 cdeftutorial.pod rpntutorial.pod rrdgraph-old.pod bin_dec_hex.pod \
16 rrdfetch.pod rrdrestore.pod rrddump.pod rrdtune.pod rrdresize.pod \
17 rrdxport.pod rrdcgi.pod rrdtutorial.pod rrdinfo.pod rrdthreads.pod \
18 $(SRC:.src=.pod)
20 PMP = RRDs.pm RRDp.pm
22 MAN = $(POD:.pod=.1) $(PMP:.pm=.1)
23 TXT = $(MAN:.1=.txt)
24 HTML = $(POD:.pod=.html) $(PMP:.pm=.html)
25 PDF = $(MAN:.1=.pdf)
27 # what should go into the distribution
28 EXTRA_DIST= $(POD) $(HTML) $(TXT)
30 # some install rules
31 idocdir = $(prefix)/doc
32 idoc_DATA = $(POD) $(TXT)
33 ihtmldir = $(prefix)/html
34 ihtml_DATA = $(HTML)
35 imandir = $(mandir)/man1
36 iman_DATA = $(MAN)
38 all-local: link txt man html-local
40 .src.pod:
41 perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print <F>; close F} else {print}' $< > $@
43 .pod.1 .pm.1 .pl.1:
44 pod2man --release=$(VERSION) --center=rrdtool $< > $@
46 .1.txt:
47 @NROFF@ -man -Tlp $< > $@
49 .1.pdf:
50 @TROFF@ -man $< | ps2pdf - $@
52 .pm.html .pod.html .pl.html:
53 pod2html --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
55 RRDs.pm:
56 ln -s ../bindings/perl-shared/RRDs.pm .
58 RRDp.pm:
59 ln -s ../bindings/perl-piped/RRDp.pm .
61 index.html:
62 rm -f index.html; ln -s rrdtool.html index.html
64 link: RRDp.pm RRDs.pm index.html
66 man: $(MAN)
68 html-local: $(HTML)
70 txt: $(TXT)
72 pdf-local: $(PDF)