From 39464e89f170e61ddf79e0c3997bc3f6dd0f0d67 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 4 Apr 2005 19:54:14 +0000 Subject: [PATCH] now when we do make, it compiles py files to pyo and make install install pyo files instead of py files --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index de026a97b..4f9a2e446 100644 --- a/Makefile +++ b/Makefile @@ -4,17 +4,19 @@ MODULES = common plugins/gtkgui PREFIX = /usr DESTDIR = / -FIND = find -regex '.*\.\(\(glade\)\|\(py\)\|\(xpm\)\|\(gif\)\|\(png\)\|\(mo\)\|\(wav\)\)' +FIND = find -regex '.*\.\(\(glade\)\|\(pyo\)\|\(xpm\)\|\(gif\)\|\(png\)\|\(mo\)\|\(wav\)\)' FILES = `$(FIND)` DIRS = `$(FIND) -exec dirname {} \; | sort -u` FIND_LIB = find -regex '.*\.\(so\)' FILES_LIB = `$(FIND_LIB)` +FIND_PY = find -regex '.*\.\(py\)' +FILES_PY = `$(FIND_PY)` LANGS = fr pt_BR SCRIPTS = \ scripts/gajim -all: translation trayicon idle +all: translation trayicon idle pyo translation: for l in $(LANGS) ; do \ @@ -27,6 +29,12 @@ trayicon: idle: make -C common all; +pyo: + ST="import py_compile\n py_compile.compile('$$f')" + for f in $(FILES_PY) ; do \ + python -O -c "$$ST"; \ + done + clean: find -name *.pyc -exec rm {} \; find -name *.mo -exec rm {} \;