diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2005-02-11 21:48:36 +0100 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2005-02-11 21:48:36 +0100 |
commit | b9ddd9310ea896a5e644f784013a386d9e7212a9 (patch) | |
tree | fb35c74000db18ce447689612f06103530a3645e /Makefile | |
parent | 3623e33d0ae10eaeca653e00a3796495dbc0f713 (diff) | |
download | smokeping-b9ddd9310ea896a5e644f784013a386d9e7212a9.tar.gz smokeping-b9ddd9310ea896a5e644f784013a386d9e7212a9.tar.xz |
niko has revamped smokeping to parse configuration much more strictly. It is all documented in
software/doc/smokeping_upgrade.pod
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 32 |
1 files changed, 24 insertions, 8 deletions
@@ -2,32 +2,40 @@ SHELL = /bin/sh VERSION = 1.38 IGNORE = ~|CVS|var/|smokeping-$(VERSION)/smokeping-$(VERSION)|cvsignore|rej|orig|DEAD GROFF = groff -.PHONY: man html txt ref patch killdoc doc tar +.PHONY: man html txt ref examples check-examples patch killdoc doc tar .SUFFIXES: .SUFFIXES: .pm .pod .txt .html .man .1 -POD := doc/$(wildcard doc/*.pod) lib/ISG/ParseConfig.pm \ +POD := $(wildcard doc/*.pod) lib/ISG/ParseConfig.pm \ lib/Smokeping.pm -PODPROBE := lib/probes/$(wildcard lib/probes/*.pm) -PODMATCH := lib/matchers/$(wildcard lib/matchers/*.pm) +PODPROBE := $(wildcard lib/probes/*.pm) +PODMATCH := $(wildcard lib/matchers/*.pm) -BASE = $(addprefix doc/,$(subst .pod,,$(notdir $(POD)))) $(addprefix doc/probes/,$(subst .pod,,$(notdir $(PODPROBE)))) $(addprefix doc/matchers/,$(subst .pod,,$(notdir $(PODMATCH)))) +BASE = $(addprefix doc/,$(subst .pod,,$(notdir $(POD)))) $(subst .pm,,$(subst lib/probes,doc/probes,$(PODPROBE))) $(addprefix doc/matchers/,$(subst .pod,,$(notdir $(PODMATCH)))) doc/smokeping MAN = $(addsuffix .1,$(BASE)) TXT = $(addsuffix .txt,$(BASE)) HTML= $(addsuffix .html,$(BASE)) POD2MAN = pod2man --release=$(VERSION) --center=SmokePing $< > $@ POD2HTML= cd doc ; pod2html --infile=../$< --outfile=../$@ --noindex --htmlroot=. --podroot=. --podpath=. --title=$* +# we go to this trouble to ensure that MAKEPOD only uses modules in the installation directory +MAKEPOD= perl -Ilib -I/usr/pack/rrdtool-1.0.47-to/lib/perl -mSmokeping -e 'Smokeping::main()' -- --makepod +GENEX= perl -Ilib -I/usr/pack/rrdtool-1.0.47-to/lib/perl -mSmokeping -e 'Smokeping::main()' -- --gen-examples + doc/%.1: doc/%.pod $(POD2MAN) doc/%.1: lib/% $(POD2MAN) -doc/probes/%.1: lib/probes/% +doc/probes/%.pod: lib/probes/%.pm + $(MAKEPOD) probes::$* > $@ +doc/probes/%.1: doc/probes/%.pod $(POD2MAN) doc/matchers/%.1: lib/matchers/% $(POD2MAN) doc/%.1: lib/ISG/% $(POD2MAN) +doc/smokeping.1: bin/smokeping.dist + $(POD2MAN) doc/%.html: doc/%.pod $(POD2HTML) @@ -35,7 +43,7 @@ doc/%.html: lib/% $(POD2HTML) doc/%.html: lib/ISG/% $(POD2HTML) -doc/probes/%.html: lib/probes/% +doc/probes/%.html: doc/probes/%.pod $(POD2HTML) doc/matchers/%.html: lib/matchers/% $(POD2HTML) @@ -55,8 +63,16 @@ txt: $(TXT) ref: doc/smokeping_config.pod +examples: + $(GENEX) + +check-examples: + $(GENEX) --check + doc/smokeping_config.pod: lib/Smokeping.pm - perl -Ilib -I/usr/pack/rrdtool-1.0.47-to/lib/perl -mSmokeping ./bin/smokeping.dist --makepod > doc/smokeping_config.pod + $(MAKEPOD) > $@ +doc/smokeping_examples.pod: lib/Smokeping/Examples.pm etc/config.dist + $(GENEX) patch: perl -i~ -p -e 's/VERSION="\d.*?"/VERSION="$(VERSION)"/' lib/Smokeping.pm perl -i~ -p -e 's/Smokeping \d.*?;/Smokeping $(VERSION);/' bin/smokeping.dist htdocs/smokeping.cgi.dist |