From 1b633959b1153b40ff8fcddd8430e0c6b0e9574b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 8 Jun 2017 23:37:05 +0000 Subject: improve API documentation and testing Oh, so that's why I hadn't released this project earlier... --- GNUmakefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 6a43f04..220d4e1 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -5,6 +5,11 @@ pkg = msgthr RUBY = ruby lib := lib VERSION := 1.0.0 +RSYNC_DEST := 80x24.org:/srv/80x24/msgthr/ + +RSYNC = rsync +OLDDOC = olddoc +RDOC = rdoc all:: test test_units := $(wildcard test/test_*.rb) @@ -41,5 +46,31 @@ pkg_extra := package: $(pkggem) +NEWS: .olddoc.yml + $(OLDDOC) prepare +LATEST: NEWS + +doc:: .document .olddoc.yml + -find lib -type f -name '*.rbc' -exec rm -f '{}' ';' + $(RM) -r doc + $(RDOC) -f oldweb + +# this requires GNU coreutils variants +ifneq ($(RSYNC_DEST),) +publish_doc: + -git set-file-times + $(MAKE) doc + mkdir -p www + $(RM) -r www/rdoc + mv doc www/rdoc + install -m644 README www/README + install -m644 NEWS www/NEWS + install -m644 NEWS.atom.xml www/NEWS.atom.xml + for i in $$(find www -type f ! -regex '^.*\.gz$$'); do \ + gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done + $(RSYNC) -av www/ $(RSYNC_DEST) + git ls-files | xargs touch +endif + .PHONY: all test $(test_units) .PHONY: check-warnings fix-perms -- cgit v1.2.3-24-ge0c7