added beginners guide off debian -- slif@bellsouth.net
[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 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)
20
21 PMP = RRDs.pm RRDp.pm
22
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)
27
28 # what should go into the distribution
29 EXTRA_DIST= $(POD) $(HTML) $(TXT)
30
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)
38
39 all-local: link txt man html-local
40
41 .src.pod:
42         perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print <F>; close F} else {print}'  $<  > $@
43
44 .pod.1 .pm.1 .pl.1:
45         pod2man --release=$(VERSION) --center=rrdtool $<  > $@
46
47 .1.txt:
48         @NROFF@ -man -Tlp $< > $@
49
50 .1.pdf:
51         @TROFF@ -man $< | ps2pdf - $@
52
53 .pm.html .pod.html .pl.html:
54         pod2html --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
55
56 RRDs.pm:
57         ln -s ../bindings/perl-shared/RRDs.pm .
58
59 RRDp.pm:
60         ln -s ../bindings/perl-piped/RRDp.pm .
61
62 index.html:
63         rm -f index.html; ln -s rrdtool.html index.html
64
65 link: RRDp.pm RRDs.pm index.html
66
67 man: $(MAN)
68
69 html-local: $(HTML)
70
71 txt: $(TXT)
72
73 pdf-local: $(PDF)
74