Stop using make, just use a shell script
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Wed, 05 Oct 2011 14:03:01 -0600
changeset 634 37c2fa8b2dc1
parent 633 b1598801692d
child 635 98671dcd5b1f
Stop using make, just use a shell script

There's really no need for make's features when you have one target
that's made from one file. It occurs to me that I could roll mkspec
into preprocess and do it in Python, which would be nicer, but it really
doesn't matter much.

This also makes sure that the specification data is up-to-date before
making anything. I could have added this to the makefile, but it really
seemed pointless to not just switch to a shell script.
Makefile
mkspec
--- a/Makefile	Wed Oct 05 13:55:46 2011 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-ANOLIS = anolis
-
-#all: editing.html xrefs.json
-all: editing.html
-
-intermediate.html: source.html preprocess Makefile
-	./preprocess
-
-editing.html: intermediate.html data Makefile
-	$(ANOLIS) --output-encoding=ascii --omit-optional-tags --enable=xspecxref \
-	--w3c-compat-xref-a-placement --use-strict $< $@
-	sed -i 's!<span class=secno>[^<]*</span>!!g' $@
-	rm intermediate.html
-
-# Hangs and it's useless for me anyway, kill it
-#xrefs.json: intermediate.html Makefile
-#	$(ANOLIS) --dump-xrefs $< /tmp/spec
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mkspec	Wed Oct 05 14:03:01 2011 -0600
@@ -0,0 +1,11 @@
+#!/bin/bash
+set -ex
+cd data
+hg pull
+hg up
+cd ..
+./preprocess
+anolis --output-encoding=ascii --omit-optional-tags --enable=xspecxref \
+	--w3c-compat-xref-a-placement --use-strict intermediate.html editing.html
+rm intermediate.html
+sed -i 's!<span class=secno>[^<]*</span>!!g' editing.html