diff options
author | Niko Tyni <ntyni@iki.fi> | 2005-02-14 18:10:46 +0100 |
---|---|---|
committer | Niko Tyni <ntyni@iki.fi> | 2005-02-14 18:10:46 +0100 |
commit | 79b181df37260a9305762f30144d8ab084ef40db (patch) | |
tree | f15400996ccbf51e5bb22b332d17ab1f1cdd8fe9 | |
parent | e50291a517b1e672641e6d2e2aa251ae32327825 (diff) | |
download | smokeping-79b181df37260a9305762f30144d8ab084ef40db.tar.gz smokeping-79b181df37260a9305762f30144d8ab084ef40db.tar.xz |
Makefile:
* move manpages to (hopefully) right sections
* new target rename-man adds the the full path to
perl module manpage filenames
* add pod2html temporary files to the IGNORE list
-rw-r--r-- | Makefile | 79 |
1 files changed, 48 insertions, 31 deletions
@@ -1,45 +1,53 @@ SHELL = /bin/sh VERSION = 1.38 -IGNORE = ~|CVS|var/|smokeping-$(VERSION)/smokeping-$(VERSION)|cvsignore|rej|orig|DEAD +IGNORE = ~|CVS|var/|smokeping-$(VERSION)/smokeping-$(VERSION)|cvsignore|rej|orig|DEAD|pod2htm[di]\.tmp GROFF = groff -.PHONY: man html txt ref examples check-examples patch killdoc doc tar +.PHONY: man html txt ref examples check-examples patch killdoc doc tar rename-man .SUFFIXES: -.SUFFIXES: .pm .pod .txt .html .man .1 +.SUFFIXES: .pm .pod .txt .html .man .1 .3 .5 .7 -POD := $(wildcard doc/*.pod) +DOCS = $(filter-out smokeping_config,$(wildcard doc/*.pod)) # section 7 +DOCSCONFIG := doc/smokeping_config.pod # section 5 PM := lib/ISG/ParseConfig.pm lib/Smokeping.pm PODPROBE := $(wildcard lib/Smokeping/probes/*.pm) PODMATCH := $(wildcard lib/Smokeping/matchers/*.pm) -BASE = $(subst .pod,,$(POD)) \ - $(subst .pm,,$(subst lib/,doc/,$(PM))) \ +DOCSBASE = $(subst .pod,,$(DOCS)) +MODBASE = $(subst .pm,,$(subst lib/,doc/,$(PM))) \ $(subst .pm,,$(subst lib/Smokeping/probes,doc/probes,$(PODPROBE))) \ - $(addprefix doc/matchers/,$(subst .pm,,$(notdir $(PODMATCH)))) \ - doc/smokeping -MAN = $(addsuffix .1,$(BASE)) + $(subst .pm,,$(subst lib/Smokeping/matchers,doc/matchers,$(PODMATCH))) +PROGBASE = doc/smokeping +DOCSCONFIGBASE = doc/smokeping_config + +BASE = $(DOCSBASE) $(MODBASE) $(PROGBASE) $(DOCSCONFIGBASE) + +MAN = $(addsuffix .3,$(MODBASE)) $(addsuffix .5,$(DOCSCONFIGBASE)) $(addsuffix .7,$(DOCSBASE)) $(addsuffix .1,$(PROGBASE)) TXT = $(addsuffix .txt,$(BASE)) HTML= $(addsuffix .html,$(BASE)) -POD2MAN = pod2man --release=$(VERSION) --center=SmokePing $< > $@ +POD2MAN = pod2man --release=$(VERSION) --center=SmokePing $< +MAN2TXT = $(GROFF) -man -Tascii $< > $@ 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/%.pm - $(POD2MAN) +doc/%.7: doc/%.pod + $(POD2MAN) --section 7 > $@ +doc/%.5: doc/%.pod + $(POD2MAN) --section 5 > $@ +doc/%.3: lib/%.pm + $(POD2MAN) --section 3 > $@ doc/probes/%.pod: lib/Smokeping/probes/%.pm $(MAKEPOD) Smokeping::probes::$* > $@ -doc/probes/%.1: doc/probes/%.pod - $(POD2MAN) -doc/matchers/%.1: lib/Smokeping/matchers/%.pm - $(POD2MAN) -doc/ISG/%.1: lib/Smokeping/ISG/% - $(POD2MAN) +doc/probes/%.3: doc/probes/%.pod + $(POD2MAN) --section 3 > $@ +doc/matchers/%.3: lib/Smokeping/matchers/%.pm + $(POD2MAN) --section 3 > $@ +doc/ISG/%.3: lib/Smokeping/ISG/% + $(POD2MAN) --section 3 > $@ doc/smokeping.1: bin/smokeping.dist - $(POD2MAN) + $(POD2MAN) --section 1 > $@ doc/%.html: doc/%.pod $(POD2HTML) @@ -50,17 +58,18 @@ doc/probes/%.html: doc/probes/%.pod doc/matchers/%.html: lib/Smokeping/matchers/%.pm $(POD2HTML) doc/ISG/%.html: lib/Smokeping/ISG/% - $(POD2MAN) - + $(POD2HTML) doc/smokeping.html: bin/smokeping.dist - $(POD2MAN) + $(POD2HTML) doc/%.txt: doc/%.1 - $(GROFF) -man -Tascii $< > $@ -doc/matchers/%.txt: doc/matchers/%.1 - $(GROFF) -man -Tascii $< > $@ -doc/probes/%.txt: doc/probes/%.1 - $(GROFF) -man -Tascii $< > $@ + $(MAN2TXT) +doc/%.txt: doc/%.3 + $(MAN2TXT) +doc/%.txt: doc/%.5 + $(MAN2TXT) +doc/%.txt: doc/%.7 + $(MAN2TXT) man: $(MAN) @@ -68,6 +77,14 @@ html: $(HTML) txt: $(TXT) +rename-man: $(MAN) + for j in probes matchers; do \ + for i in doc/$$j/*.3; do \ + mv $$i `echo $$i | sed s,$$j/,$$j/Smokeping::$$j::,`; \ + done; \ + done + mv doc/ISG/ParseConfig.3 doc/ISG/ISG::ParseConfig.3 + ref: doc/smokeping_config.pod examples: @@ -85,9 +102,9 @@ patch: perl -i~ -p -e 's/Smokeping \d.*?;/Smokeping $(VERSION);/' bin/smokeping.dist htdocs/smokeping.cgi.dist killdoc: - -rm doc/*.1 doc/*.txt doc/*.html doc/probes/* doc/matchers/* doc/ISG/* doc/examples/* + -rm doc/*.[1357] doc/*.txt doc/*.html doc/probes/* doc/matchers/* doc/ISG/* doc/examples/* doc/smokeping_examples.pod doc/smokeping_config.pod -doc: killdoc ref man html txt examples +doc: killdoc ref examples man html txt rename-man tar: doc patch -ln -s . smokeping-$(VERSION) |