about summary refs log tree commit homepage
path: root/Makefile.am
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-11-20 01:56:27 +0000
committerEric Wong <e@80x24.org>2015-11-20 02:18:28 +0000
commitc0da4eb6eeb4bec9b70aede7176a91f536e5bbe8 (patch)
treec8466e7cf67194b01b28b91409528dd00bb2f92b /Makefile.am
parentfd0a3959bb678e94719bfa454c8b3742635ca98c (diff)
downloadcmogstored-c0da4eb6eeb4bec9b70aede7176a91f536e5bbe8.tar.gz
Generate pre-formatted HTML which gives us a consistent visual style
with our mailing list archives and enhance linkability.  <a>, <pre>,
and <title> are among the few useful HTML tags I'll use :P

Drop the AUTHORS file, it's pointless maintenance task and users can
just look at git history instead (and honestly, I have zero interest in
recognition; I only use my real name to deter GPL violations).
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am23
1 files changed, 17 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index f78ff76..0272608 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -197,9 +197,12 @@ $(top_srcdir)/ChangeLog: configure.ac
 GZIP = gzip
 RSYNC = rsync
 RSYNC_DEST = bogomips.org:/srv/bogomips/cmogstored/
-WWW_DOC = README AUTHORS NEWS.atom.xml INSTALL $(extra_doc)
+HTML_DOC = README INSTALL $(extra_doc) doc/queues.txt doc/design.txt
+WWW_DOC = $(HTML_DOC) NEWS.atom.xml
 NEWS.atom.xml: configure.ac
         $(AM_V_GEN)$(RAKE) -sq news_atom > $@.$$$$ && mv $@.$$$$ $@
+
+html = $${i%.txt}.html
 publish: NEWS.atom.xml NEWS ChangeLog
         mkdir -p www/examples/
 # n.b. git set-file-times is non-standard, but distributed with rsync
@@ -207,11 +210,19 @@ publish: NEWS.atom.xml NEWS ChangeLog
         $(INSTALL_DATA) -p $(addprefix $(top_srcdir)/,$(WWW_DOC)) www/
         $(INSTALL_DATA) -p $(addprefix $(top_srcdir)/,$(examples)) \
                 www/examples/
-        set -e && cd www && for i in $(WWW_DOC) $(examples); do \
-                $(GZIP) < $$i > $$i.gz; \
-                test -s $$i.gz; \
-                touch -r $$i $$i.gz; \
-        done
+        set -e && cd www && \
+                for i in $(notdir $(WWW_DOC)) $(examples); do \
+                        $(GZIP) < $$i > $$i.gz; \
+                        test -s $$i.gz; \
+                        touch -r $$i $$i.gz; \
+                done && \
+                for i in $(notdir $(HTML_DOC)); do \
+                        i=$$(basename $$i); \
+                        ../build-aux/txt2pre $$i > $(html); \
+                        test -s $(html); \
+                        $(GZIP) < $(html) > $(html).gz; \
+                        touch -r $(html) $(html).gz; \
+                done;
         $(RSYNC) -av www/ $(RSYNC_DEST)
 
 .PHONY: publish