diff --git a/doc/Makefile.am b/doc/Makefile.am
index 3074b613c72487deca38dfb6b82c43075cacd01b..c80574052876b7e0bf64e04a18850ee30c3d9e87 100644 (file)
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
## Process this file with automake to produce Makefile.in
-SUFFIXES = .pod .1 .man .html .txt .pm .pdf .src .inc
+SUFFIXES = .pod .pl .1 .3 .man .html .txt .pm .pdf .inc
-#AUTOMAKE_OPTIONS = foreign
+AUTOMAKE_OPTIONS = foreign
#ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
-CLEANFILES = *.1 *.html *.txt *-dircache *.pm *.pdf *~ core *itemcache *.rej *.orig rrdgraph_*.pod *.tmp rrdgraph.pod
+CLEANFILES = *.1 *.3 *.html *.txt *-dircache RRD?.pod *.pdf *~ core *itemcache *.rej *.orig *.tmp
-SRC = rrdgraph.src rrdgraph_examples.src rrdgraph_rpn.src \
- rrdgraph_data.src rrdgraph_graph.src
+POD = bin_dec_hex.pod rrddump.pod rrdgraph_examples.pod rrdrestore.pod rrdupdate.pod \
+ cdeftutorial.pod rrdfetch.pod rrdgraph_graph.pod rrdthreads.pod rrdxport.pod \
+ rpntutorial.pod rrdfirst.pod rrdgraph_rpn.pod rrdtool.pod rrdcached.pod \
+ rrd-beginners.pod rrdinfo.pod rrdtune.pod rrdbuild.pod rrdflushcached.pod \
+ rrdcgi.pod rrdgraph.pod rrdlast.pod rrdlastupdate.pod \
+ rrdcreate.pod rrdgraph_data.pod rrdresize.pod rrdtutorial.pod
-PODOLD = rrdgraph-old.pod
+if BUILD_LIBDBI
+ POD += rrdgraph_libdbi.pod
+endif
-POD = rrdtool.pod rrdlast.pod rrdcreate.pod rrdupdate.pod rrdtutorial.es.pod \
- cdeftutorial.pod rpntutorial.pod rrdthreads.pod bin_dec_hex.pod \
- rrdfetch.pod rrdrestore.pod rrddump.pod rrdtune.pod rrdresize.pod \
- rrdcgi.pod rrdtutorial.pod rrdinfo.pod rrdxport.pod rrd-beginners.pod \
- $(SRC:.src=.pod)
+if BUILD_LUA
+ POD += rrdlua.pod
+endif
-PMP = RRDs.pm RRDp.pm
+POD3 = librrd.pod
-MAN = $(POD:.pod=.1) $(PMP:.pm=.1)
-TXT = $(MAN:.1=.txt)
-HTML = $(POD:.pod=.html) $(PMP:.pm=.html)
-PDF = $(MAN:.1=.pdf)
+PMP = RRDs.pod RRDp.pod
+
+MAN = $(POD:.pod=.1)
+MAN3 = $(POD3:.pod=.3)
+TXT = $(MAN:.1=.txt) $(MAN3:.3=.txt)
+HTML = $(POD:.pod=.html) $(POD3:.pod=.html) $(PMP:.pod=.html)
+PDF = $(MAN:.1=.pdf) $(MAN3:.3=.pdf)
# what should go into the distribution
-EXTRA_DIST= $(POD) $(HTML) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd
+EXTRA_DIST= $(POD) $(POD3) $(HTML) $(MAN) $(MAN3) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd rrdgraph_libdbi.pod rrdlua.pod
-# some install rules
-idocdir = $(prefix)/doc
+idocdir = $(RRDDOCDIR)/txt
idoc_DATA = $(POD) $(TXT)
-ihtmldir = $(prefix)/html
+ihtmldir = $(RRDDOCDIR)/html
ihtml_DATA = $(HTML)
imandir = $(mandir)/man1
iman_DATA = $(MAN)
+iman3dir = $(mandir)/man3
+iman3_DATA = $(MAN3)
-all-local: link txt man html-local
+all-local: link man txt html-local
.src.pod:
perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print <F>; close F} else {print}' $< > $@
.pod.1 .pm.1 .pl.1:
- pod2man --release=$(VERSION) --center=rrdtool $< > $@
+ $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool $< > $@
-.1.txt:
- @NROFF@ -man -Tlp $< > $@
+.pod.3:
+ $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool --section=3 $< > $@
-.1.pdf:
- @TROFF@ -man $< | ps2pdf - $@
+.1.txt .3.txt:
+ $(AM_V_GEN)GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@
-.pm.html .pod.html .pl.html:
- pod2html --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
+.1.pdf .3.pdf:
+ $(AM_V_GEN)@TROFF@ -man $< | ps2pdf - $@
-RRDs.pm:
- ln -s ../bindings/perl-shared/RRDs.pm .
+.pm.html .pod.html .pl.html:
+ $(AM_V_GEN)@POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
-RRDp.pm:
- ln -s ../bindings/perl-piped/RRDp.pm .
+RRDs.pod:
+ $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
-index.html:
- rm -f index.html; ln -s rrdtool.html index.html
+RRDp.pod:
+ $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
-link: RRDp.pm RRDs.pm index.html
+link: RRDp.pod RRDs.pod
-man: $(MAN)
+man: $(MAN) $(MAN3)
html-local: $(HTML)
pdf-local: $(PDF)
+pod: $(POD) $(POD3)
+
+install-data-hook:
+ $(AM_V_GEN)cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html