From fd198294ee49d0ed9be46da884a7b326cba89c6f Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Sat, 25 Jun 2011 18:53:49 -0400 Subject: [PATCH] makefile: Compile modules from command line If we compile everything during the "make" step, the compiled modules can be installed and the python won't have to regenerate them on every startup. --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index beae3a4d..5d1689f0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,13 @@ -all: ocarina.py - ./ocarina.py +PY = python2 -c +all: libsaria ocarina ocarina.py +.PHONY: libsaria ocarina + +libsaria: + $(PY) "import compileall; compileall.compile_dir('libsaria', force=1)" + +ocarina: + $(PY) "import compileall; compileall.compile_dir('ocarina', force=1)" ocarina.py: sh scripts/makebin.sh