diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 37 |
1 files changed, 25 insertions, 12 deletions
@@ -1,6 +1,7 @@ SHELL = /bin/sh -VERSION = 1.38 -IGNORE = ~|CVS|var/|smokeping-$(VERSION)/smokeping-$(VERSION)|cvsignore|rej|orig|DEAD|pod2htm[di]\.tmp +VERSION = 2.0rc5 +NUMVERSION = 1.99006 +IGNORE = ~|CVS|var/|smokeping-$(VERSION)/smokeping-$(VERSION)|cvsignore|rej|orig|DEAD|pod2htm[di]\.tmp|.svn GROFF = groff .PHONY: man html txt ref examples check-examples patch killdoc doc tar rename-man symlinks remove-symlinks .SUFFIXES: @@ -8,7 +9,7 @@ GROFF = groff DOCS = $(filter-out doc/smokeping_config.pod doc/smokeping.pod doc/smokeping.cgi.pod,$(wildcard doc/*.pod)) doc/smokeping_examples.pod # section 7 DOCSCONFIG := doc/smokeping_config.pod # section 5 -PM := lib/ISG/ParseConfig.pm lib/Smokeping.pm lib/Smokeping/Examples.pm lib/Smokeping/RRDtools.pm +PM := lib/Config/Grammar.pm lib/Smokeping.pm lib/Smokeping/Examples.pm lib/Smokeping/RRDtools.pm PODPROBE := $(wildcard lib/Smokeping/probes/*.pm) PODMATCH := $(wildcard lib/Smokeping/matchers/*.pm) @@ -16,7 +17,7 @@ DOCSBASE = $(subst .pod,,$(DOCS)) MODBASE = $(subst .pm,,$(subst lib/,doc/,$(PM))) \ $(subst .pm,,$(subst lib/,doc/,$(PODPROBE))) \ $(subst .pm,,$(subst lib/,doc/,$(PODMATCH))) -PROGBASE = doc/smokeping doc/smokeping.cgi +PROGBASE = doc/smokeping doc/smokeping.cgi doc/tSmoke DOCSCONFIGBASE = doc/smokeping_config BASE = $(DOCSBASE) $(MODBASE) $(PROGBASE) $(DOCSCONFIGBASE) @@ -28,7 +29,7 @@ HTML= $(addsuffix .html,$(BASE)) POD2MAN = pod2man --release=$(VERSION) --center=SmokePing $< MAN2TXT = $(GROFF) -man -Tascii $< > $@ # pod2html apparently needs to be in the target directory to get L<> links right -POD2HTML= cd $(dir $@); top="$(shell echo $(dir $@)|sed -e 's,doc/,,' -e 's,[^/]*/,../,g' -e 's,/$$,,')"; top=$${top:-.}; pod2html --infile=$(CURDIR)/$< --outfile=$(notdir $@) --noindex --htmlroot=. --podroot=. --podpath=$${top} --title=$* +POD2HTML= cd $(dir $@); top="$(shell echo $(dir $@)|sed -e 's,doc/,,' -e 's,[^/]*/,../,g' -e 's,/$$,,')"; top=$${top:-.}; pod2html --infile=$(CURDIR)/$< --noindex --htmlroot=. --podroot=. --podpath=$${top} --title=$* | $${top}/../util/fix-pod2html.pl > $(notdir $@) # 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 @@ -52,12 +53,14 @@ doc/Smokeping/probes/%.3: doc/Smokeping/probes/%.pod $(POD2MAN) --section 3 > $@ doc/Smokeping/matchers/%.3: lib/Smokeping/matchers/%.pm $(POD2MAN) --section 3 > $@ -doc/ISG/%.3: lib/ISG/%.pm +doc/Config/%.3: lib/Config/%.pm $(POD2MAN) --section 3 > $@ doc/smokeping.1: bin/smokeping.dist $(POD2MAN) --section 1 > $@ doc/smokeping.cgi.1: htdocs/smokeping.cgi.dist $(POD2MAN) --section 1 > $@ +doc/tSmoke.1: bin/tSmoke.dist + $(POD2MAN) --section 1 > $@ doc/%.html: doc/%.pod $(POD2HTML) @@ -70,12 +73,14 @@ doc/Smokeping/RRDtools.html: lib/Smokeping/RRDtools.pm doc/Smokeping/matchers/%.html: lib/Smokeping/matchers/%.pm $(POD2HTML) -doc/ISG/%.html: lib/ISG/%.pm +doc/Config/%.html: lib/Config/%.pm $(POD2HTML) doc/smokeping.html: bin/smokeping.dist $(POD2HTML) doc/smokeping.cgi.html: htdocs/smokeping.cgi.dist $(POD2HTML) +doc/tSmoke.html: bin/tSmoke.dist + $(POD2HTML) doc/%.txt: doc/%.1 $(MAN2TXT) @@ -95,10 +100,12 @@ txt: $(TXT) rename-man: $(MAN) for j in probes matchers; do \ for i in doc/Smokeping/$$j/*.3; do \ - mv $$i `echo $$i | sed s,$$j/,$$j/Smokeping::$$j::,`; \ + if ! echo $$i | grep -q Smokeping::$$j; then \ + mv $$i `echo $$i | sed s,$$j/,$$j/Smokeping::$$j::,`; \ + fi; \ done; \ done - mv doc/ISG/ParseConfig.3 doc/ISG/ISG::ParseConfig.3 + mv doc/Config/Grammar.3 doc/Config/Config::Grammar.3 mv doc/Smokeping/Examples.3 doc/Smokeping/Smokeping::Examples.3 mv doc/Smokeping/RRDtools.3 doc/Smokeping/Smokeping::RRDtools.3 @@ -123,11 +130,13 @@ doc/smokeping_config.pod: lib/Smokeping.pm 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 + perl -i~ -p -e 's/VERSION="\d.*?"/VERSION="$(NUMVERSION)"/' lib/Smokeping.pm + perl -i~ -p -e 's/Smokeping \d.*?;/Smokeping $(NUMVERSION);/' bin/smokeping.dist htdocs/smokeping.cgi.dist bin/tSmoke.dist + perl -i~ -p -e 'do { my @d = localtime; my $$d = (1900+$$d[5])."/".(1+$$d[4])."/".$$d[3]; print "$$d -- released version $(VERSION)\n\n" } unless $$done++ || /version $(VERSION)/' CHANGES + svn commit -m "prepare for the release of smokeping-$(VERSION)" killdoc: - -rm doc/*.[1357] doc/*.txt doc/*.html doc/Smokeping/* doc/Smokeping/probes/* doc/Smokeping/matchers/* doc/ISG/* doc/examples/* doc/smokeping_examples.pod doc/smokeping_config.pod doc/smokeping.pod doc/smokeping.cgi.pod + -rm doc/*.[1357] doc/*.txt doc/*.html doc/Smokeping/* doc/Smokeping/probes/* doc/Smokeping/matchers/* doc/Config/* doc/examples/* doc/smokeping_examples.pod doc/smokeping_config.pod doc/smokeping.pod doc/smokeping.cgi.pod doc: killdoc ref examples man html txt rename-man @@ -139,3 +148,7 @@ tar: doc patch dist: tar mv smokeping-$(VERSION).tar.gz /home/oetiker/public_html/webtools/smokeping/pub/ cp CHANGES /home/oetiker/public_html/webtools/smokeping/pub/CHANGES + +tag: dist + svn ls svn://svn.ee.ethz.ch/smokeping/tags/$(VERSION) || \ + svn copy -m "tagging version $(VERSION)" svn://svn.ee.ethz.ch/smokeping/branches/2.0 svn://svn.ee.ethz.ch/smokeping/tags/$(VERSION) |