Add Hooke/Makefile for documentation generation.
authorW. Trevor King <wking@drexel.edu>
Wed, 3 Nov 2010 19:02:28 +0000 (15:02 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 3 Nov 2010 19:03:19 +0000 (15:03 -0400)
.gitignore
Makefile
posts/Hooke/Makefile [new file with mode: 0644]

index 2f0013d6ca50b04f77a2336c4d4af5fc934f721d..dda476760f2dec18cddcfa477e8c3ba36e228df5 100644 (file)
@@ -3,6 +3,9 @@
 /recentchanges
 
 # built by Makefiles inside posts/
+/posts/Hooke/README.rst
+/posts/Hooke/hooke
+/posts/Hooke/html
 /posts/problempack/problempack/
 /posts/problempack/probs.pdf
 /posts/problempack/sols.pdf
index 69e4efa69e8b7adbd49f48686ce17303d8ef7513..2e04d9324f94213999682a870b3109f06f489e37 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 # Build everything necessary to compile the wiki.
 
-SUBDIRS = posts/problempack posts/rel-vcs posts/sawsim posts/yacc2dot \
-       posts/Xmodmap posts/XSLT/chapter posts/XSLT/code
+SUBDIRS = posts/Hooke posts/problempack posts/rel-vcs posts/sawsim \
+       posts/yacc2dot posts/Xmodmap posts/XSLT/chapter posts/XSLT/code
 TARGETS = all clean
 
 all :
diff --git a/posts/Hooke/Makefile b/posts/Hooke/Makefile
new file mode 100644 (file)
index 0000000..deaa134
--- /dev/null
@@ -0,0 +1,29 @@
+REPO = http://www.physics.drexel.edu/~wking/code/hg/hooke/
+PACKAGE = hooke
+
+.PHONY : all checkout clean
+
+all : README.rst html
+
+clean :
+       rm -rf $(PACKAGE) README.rst html
+
+$(PACKAGE) :
+       hg clone $(REPO) $@
+
+checkout : $(PACKAGE)
+       (cd $(PACKAGE) && hg pull && hg update wtk)
+
+README.rst : checkout
+       cp $(PACKAGE:%=%/README) $@
+
+$(PACKAGE:%=%/hooke/version.py) : checkout
+       (cd $(PACKAGE) && ./update_copyright.py)
+
+.PHONY : $(PACKAGE:%=%/doc/build/html)
+$(PACKAGE:%=%/doc/build/html) : $(PACKAGE:%=%/hooke/version.py)
+       (cd $(PACKAGE:%=%/doc) && scons)
+
+.PHONY : html
+html : $(PACKAGE:%=%/doc/build/html)
+       rsync -avz "$</" "$@/"