Check that the svg2-tools checkout is up-to-date before building.
authorCameron McCormack <cam@mcc.id.au>
Thu, 17 May 2012 17:42:28 +1000
changeset 95 004632f2af54
parent 94 9d5424555bab
child 96 3599d0b0bb55
Check that the svg2-tools checkout is up-to-date before building.
Makefile
--- a/Makefile	Thu May 17 17:11:54 2012 +1000
+++ b/Makefile	Thu May 17 17:42:28 2012 +1000
@@ -1,5 +1,10 @@
 # Makefile for SVG 1.1 Second Edition.
 
+all-with-tools-check : tools-check all
+
+tools-check :
+	@bash -c "REMOTE_REV=$$(hg id -i http://svgwg.org/hg/svg2-tools); [ \$$? = 0 -o \"\$$REMOTE_REV\" != \"\" ] || exit 0; LOCAL_REV=$$(hg id -i ../svg2-tools); [ \"\$$LOCAL_REV\" = \"\$$REMOTE_REV\" ] || (echo \"You must update your svg2-tools repository! (Remote repository has revision \$$REMOTE_REV, but you are at \$$LOCAL_REV.)\"; exit 1)"
+
 all :
 	$(MAKE) -C master/images/implnote/arcs/
 	@../svg2-tools/build.py