Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike@mikegerwitz.com>2013-05-17 22:34:32 -0400
committerMike Gerwitz <mike@mikegerwitz.com>2013-05-17 22:34:32 -0400
commit31e2b198cde296684e67a5ec68647d748a679886 (patch)
tree8bbc39d102b7e4a6f8fec8d5a8d6c8bb81f0d1e7 /Makefile
parentf6f98d5ecd3118180b3cbf19cb3e75b4082470a6 (diff)
downloadthoughts-31e2b198cde296684e67a5ec68647d748a679886.tar.gz
thoughts-31e2b198cde296684e67a5ec68647d748a679886.tar.bz2
thoughts-31e2b198cde296684e67a5ec68647d748a679886.zip
Moved git horror story into this repository as well as the necessary build process
This is the original article that became popular on sites like HackerNews
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 23 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 01a72e6..cb25b00 100644
--- a/Makefile
+++ b/Makefile
@@ -16,10 +16,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##
-.PHONY: default clean
+# list of articles to compile
+articles := $(patsubst %.txt, %.html, $(wildcard papers/*.txt))
+.PHONY: default clean thoughts
-default:
+
+default: www-root
+
+thoughts:
repo2html \
-t "Mike Gerwitz's Thoughts and Ramblings" \
-d 'The miscellaneous thoughts and ramblings of a free software hacker' \
@@ -29,5 +34,21 @@ default:
'http://mikegerwitz.com/thoughts/' \
> index.html
+# all .txt articles will be compiled with asciidoc, then post-processed with the
+# mgify script
+%.html: %.txt
+ asciidoc -fasciidoc.conf -v \
+ -a stylesdir=$(PWD)/asciidoc-themes/ \
+ -a themedir=$(PWD)/asciidoc-themes/ \
+ $<
+ ./tools/mgify "$@"
+
+www-root: $(articles) thoughts
+ mkdir -p www-root/papers \
+ && cp papers/*.html www-root/papers/ \
+ && cp -r [0-9]* www-root/ \
+ && cp -r images/ www-root/ \
+ && ln -sf ../images www-root/papers/images
+
clean:
rm -rf [0-9]*/