now when we do make, it compiles py files to pyo and make install install pyo files instead of py files

This commit is contained in:
Yann Leboulanger 2005-04-04 19:54:14 +00:00
parent 474fe3447e
commit 39464e89f1
1 changed files with 10 additions and 2 deletions

View File

@ -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 {} \;