Makefile: ghetto generation task for the website
authorEric Wong <normalperson@yhbt.net>
Wed, 28 Nov 2012 23:40:25 +0000 (28 23:40 +0000)
committerEric Wong <normalperson@yhbt.net>
Wed, 28 Nov 2012 23:40:25 +0000 (28 23:40 +0000)
HTML sucks, but this was done when I hated HTML less...

.gitignore
Makefile

index 3040a5d..b0d04e5 100644 (file)
@@ -5,3 +5,4 @@ GIT-VERSION-FILE
 *.1
 *.html
 *.gz
+public_html
index da73a5d..879f68b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -77,4 +77,13 @@ index.html INSTALL.html:
        $(pandoc_html) -T "$(title)" < $< > $@+
        mv $@+ $@
 
+txt := $(addsuffix .1.txt,$(PCU_BIN))
+www: index.html INSTALL.html INSTALL README $(man1) $(html) $(txt)
+       mkdir -p public_html/
+       install -m 644 $^ public_html/
+       cd public_html && for i in $^; do \
+         gzip -9 < $$i > $$i.gz; \
+         touch -r $$i.gz $$i; \
+         done
+
 .PHONY: .FORCE-GIT-VERSION-FILE install install-man man