about summary refs log tree commit homepage
path: root/GNUmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile31
1 files changed, 31 insertions, 0 deletions
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