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:
parent
474fe3447e
commit
39464e89f1
1 changed files with 10 additions and 2 deletions
12
Makefile
12
Makefile
|
@ -4,17 +4,19 @@ MODULES = common plugins/gtkgui
|
||||||
PREFIX = /usr
|
PREFIX = /usr
|
||||||
DESTDIR = /
|
DESTDIR = /
|
||||||
|
|
||||||
FIND = find -regex '.*\.\(\(glade\)\|\(py\)\|\(xpm\)\|\(gif\)\|\(png\)\|\(mo\)\|\(wav\)\)'
|
FIND = find -regex '.*\.\(\(glade\)\|\(pyo\)\|\(xpm\)\|\(gif\)\|\(png\)\|\(mo\)\|\(wav\)\)'
|
||||||
FILES = `$(FIND)`
|
FILES = `$(FIND)`
|
||||||
DIRS = `$(FIND) -exec dirname {} \; | sort -u`
|
DIRS = `$(FIND) -exec dirname {} \; | sort -u`
|
||||||
FIND_LIB = find -regex '.*\.\(so\)'
|
FIND_LIB = find -regex '.*\.\(so\)'
|
||||||
FILES_LIB = `$(FIND_LIB)`
|
FILES_LIB = `$(FIND_LIB)`
|
||||||
|
FIND_PY = find -regex '.*\.\(py\)'
|
||||||
|
FILES_PY = `$(FIND_PY)`
|
||||||
|
|
||||||
LANGS = fr pt_BR
|
LANGS = fr pt_BR
|
||||||
SCRIPTS = \
|
SCRIPTS = \
|
||||||
scripts/gajim
|
scripts/gajim
|
||||||
|
|
||||||
all: translation trayicon idle
|
all: translation trayicon idle pyo
|
||||||
|
|
||||||
translation:
|
translation:
|
||||||
for l in $(LANGS) ; do \
|
for l in $(LANGS) ; do \
|
||||||
|
@ -27,6 +29,12 @@ trayicon:
|
||||||
idle:
|
idle:
|
||||||
make -C common all;
|
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:
|
clean:
|
||||||
find -name *.pyc -exec rm {} \;
|
find -name *.pyc -exec rm {} \;
|
||||||
find -name *.mo -exec rm {} \;
|
find -name *.mo -exec rm {} \;
|
||||||
|
|
Loading…
Add table
Reference in a new issue