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 \
14 rrd-beginners.pod rrdinfo.pod rrdtune.pod rrdbuild.pod \
15 rrdcgi.pod rrdgraph.pod rrdlast.pod \
16 rrdcreate.pod rrdgraph_data.pod rrdresize.pod rrdtutorial.pod
19 PMP = RRDs.pod RRDp.pod
21 MAN = $(POD:.pod=.1)
22 TXT = $(MAN:.1=.txt)
23 HTML = $(POD:.pod=.html) $(PMP:.pod=.html)
24 PDF = $(MAN:.1=.pdf)
26 # what should go into the distribution
27 EXTRA_DIST= $(POD) $(HTML) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd
29 # some install rules if the install pat
30 DOCPREFIX:=$(shell echo "@prefix@" | grep rrd >/dev/null && echo "rrdtool-@VERSION@/")
31 idocdir = $(prefix)/shared/doc/$(DOCPREFIX)txt
32 idoc_DATA = $(POD) $(TXT)
33 ihtmldir = $(prefix)/shared/doc/$(DOCPREFIX)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.pod:
56 ln -s $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
58 RRDp.pod:
59 ln -s $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
61 index.html:
62 rm -f index.html; ln -s rrdtool.html index.html
64 link: RRDp.pod RRDs.pod index.html
66 man: $(MAN)
68 html-local: $(HTML)
70 txt: $(TXT)
72 pdf-local: $(PDF)
74 pod: $(POD)