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 *.tmp 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 rrd-beginners.pod \
19 $(SRC:.src=.pod)
21 PMP = RRDs.pm RRDp.pm
23 MAN = $(POD:.pod=.1) $(PMP:.pm=.1)
24 TXT = $(MAN:.1=.txt)
25 HTML = $(POD:.pod=.html) $(PMP:.pm=.html)
26 PDF = $(MAN:.1=.pdf)
28 # what should go into the distribution
29 EXTRA_DIST= $(POD) $(HTML) $(TXT)
31 # some install rules
32 idocdir = $(prefix)/doc
33 idoc_DATA = $(POD) $(TXT)
34 ihtmldir = $(prefix)/html
35 ihtml_DATA = $(HTML)
36 imandir = $(mandir)/man1
37 iman_DATA = $(MAN)
39 all-local: link txt man html-local
41 .src.pod:
42 perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print <F>; close F} else {print}' $< > $@
44 .pod.1 .pm.1 .pl.1:
45 pod2man --release=$(VERSION) --center=rrdtool $< > $@
47 .1.txt:
48 @NROFF@ -man -Tlp $< > $@
50 .1.pdf:
51 @TROFF@ -man $< | ps2pdf - $@
53 .pm.html .pod.html .pl.html:
54 pod2html --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
56 RRDs.pm:
57 ln -s ../bindings/perl-shared/RRDs.pm .
59 RRDp.pm:
60 ln -s ../bindings/perl-piped/RRDp.pm .
62 index.html:
63 rm -f index.html; ln -s rrdtool.html index.html
65 link: RRDp.pm RRDs.pm index.html
67 man: $(MAN)
69 html-local: $(HTML)
71 txt: $(TXT)
73 pdf-local: $(PDF)