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