I realize now that the problem is the line
[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 .inc
4
5 #AUTOMAKE_OPTIONS        =  foreign
6
7 #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
8
9 CLEANFILES = *.1 *.html *.txt *-dircache RRD?.pod *.pdf *~ core *itemcache *.rej *.orig *.tmp
10
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            rrdcached.pod  \
14       rrd-beginners.pod      rrdinfo.pod            rrdtune.pod            rrdbuild.pod           rrdflush.pod   \
15       rrdcgi.pod             rrdgraph.pod           rrdlast.pod            rrdlastupdate.pod                     \
16       rrdcreate.pod          rrdgraph_data.pod      rrdresize.pod          rrdtutorial.pod
17
18 if BUILD_LUA
19   POD += rrdlua.pod
20 endif
21
22 PMP = RRDs.pod RRDp.pod
23
24 MAN = $(POD:.pod=.1)
25 TXT = $(MAN:.1=.txt)
26 HTML = $(POD:.pod=.html) $(PMP:.pod=.html)
27 PDF = $(MAN:.1=.pdf)
28
29 # what should go into the distribution
30 EXTRA_DIST= $(POD) $(HTML) $(MAN) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd
31
32 idocdir = $(RRDDOCDIR)/txt
33 idoc_DATA = $(POD) $(TXT)
34 ihtmldir = $(RRDDOCDIR)/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         GROFF_NO_SGR=1 @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.pod:
57         $(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
58
59 RRDp.pod:
60         $(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
61
62 link: RRDp.pod RRDs.pod
63
64 man: $(MAN)
65
66 html-local: $(HTML)
67
68 txt: $(TXT)
69
70 pdf-local: $(PDF)
71
72 pod: $(POD)
73
74 install-data-hook:
75         cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html