Initial revision
[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
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
10
11 POD = rrdtool.pod rrdlast.pod rrdcreate.pod rrdupdate.pod  rrdtutorial.es.pod \
12         cdeftutorial.pod rpntutorial.pod rrdgraph.pod  bin_dec_hex.pod \
13         rrdfetch.pod rrdrestore.pod rrddump.pod rrdtune.pod rrdresize.pod \
14         rrdcgi.pod rrdtutorial.pod rrdinfo.pod
15
16 PMP = RRDs.pm RRDp.pm
17
18 MAN = $(POD:.pod=.1) $(PMP:.pm=.1) 
19 TXT = $(MAN:.1=.txt)
20 HTML = $(POD:.pod=.html) $(PMP:.pm=.html) 
21 PDF = $(MAN:.1=.pdf)
22
23 # what should go into the distribution
24 EXTRA_DIST= $(POD) $(HTML) $(TXT)
25
26 # some install rules
27 idocdir = $(prefix)/doc
28 idoc_DATA = $(POD) $(TXT)
29 ihtmldir = $(prefix)/html
30 ihtml_DATA = $(HTML)
31 imandir = $(prefix)/man/man1
32 iman_DATA = $(MAN)
33
34 all-local: link txt man html
35
36 .pod.1 .pm.1 .pl.1:
37         pod2man --release=$(VERSION) --center=rrdtool $<  > $@
38
39 .1.txt:
40         @NROFF@ -man -Tlp $< > $@
41
42 .1.pdf:
43         @TROFF@ -man $< | ps2pdf - $@
44
45 .pm.html .pod.html .pl.html:
46         pod2html --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
47
48 RRDs.pm:
49         ln -s ../perl-shared/RRDs.pm .
50
51 RRDp.pm:
52         ln -s ../perl-piped/RRDp.pm .
53
54 link: RRDp.pm RRDs.pm
55
56 man: $(MAN)
57
58 html: $(HTML)
59
60 txt: $(TXT)
61
62 pdf: $(PDF)
63