Makefile target for repo.
authorRobert Bradshaw <robertwb@math.washington.edu>
Sun, 22 Nov 2009 10:29:15 +0000 (02:29 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sun, 22 Nov 2009 10:29:15 +0000 (02:29 -0800)
Makefile

index d77f299031e2df6a0a5d80d93260650157b5cae3..bc70776cb9a859762ed7b9afbd5308ec1244a640 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,23 @@
 PYTHON?=python
+REPO = http://hg.cython.org/cython-devel
 
 all:    local 
 
 local:
        ${PYTHON} setup.py build_ext --inplace
 
+.hg: REV := $(shell cat .hgrev)
+.hg: TMPDIR := $(shell mktemp -d tmprepo.XXXXXX)
+.hg: 
+       hg clone --rev $(REV) $(REPO) $(TMPDIR)
+       hg -R $(TMPDIR) update
+       mv $(TMPDIR)/.hg .
+       mv $(TMPDIR)/.hgtags .
+       rm -rf $(TMPDIR)
+
+repo: .hg
+
+
 clean:
        @echo Cleaning Source
        @rm -fr build