mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Improve makefile's i18n target
It now uses proper dependencies and directly calls msgfmt.
This commit is contained in:
parent
c43d37582e
commit
b41d3f7efc
15
Makefile
15
Makefile
@ -4,16 +4,20 @@ REQ_MINOR_VERSION=4
|
|||||||
# Our build scripts are not very "make like" yet and perform their task in a bundle. For now, we
|
# Our build scripts are not very "make like" yet and perform their task in a bundle. For now, we
|
||||||
# use one of each file to act as a representative, a target, of these groups.
|
# use one of each file to act as a representative, a target, of these groups.
|
||||||
pemodules_target = core/pe/_block.*.so
|
pemodules_target = core/pe/_block.*.so
|
||||||
mofiles_target = locale/fr/LC_MESSAGES/core.mo
|
|
||||||
submodules_target = hscommon/__init__.py
|
submodules_target = hscommon/__init__.py
|
||||||
|
|
||||||
|
localedirs = $(wildcard locale/*/LC_MESSAGES)
|
||||||
pofiles = $(wildcard locale/*/LC_MESSAGES/*.po)
|
pofiles = $(wildcard locale/*/LC_MESSAGES/*.po)
|
||||||
|
mofiles = $(patsubst %.po,%.mo,$(pofiles))
|
||||||
|
|
||||||
|
vpath %.po $(localedirs)
|
||||||
|
vpath %.mo $(localedirs)
|
||||||
|
|
||||||
.PHONY : default
|
.PHONY : default
|
||||||
default : run.py
|
default : run.py
|
||||||
@echo "Build complete! You can run dupeGuru with 'make run'"
|
@echo "Build complete! You can run dupeGuru with 'make run'"
|
||||||
|
|
||||||
run.py : env $(mofiles_target) $(pemodules_target) qt/dg_rc.py
|
run.py : env i18n $(pemodules_target) qt/dg_rc.py
|
||||||
cp qt/run_template.py run.py
|
cp qt/run_template.py run.py
|
||||||
|
|
||||||
.PHONY : reqs
|
.PHONY : reqs
|
||||||
@ -44,8 +48,11 @@ build/help : | env
|
|||||||
qt/dg_rc.py : qt/dg.qrc
|
qt/dg_rc.py : qt/dg.qrc
|
||||||
pyrcc5 qt/dg.qrc > qt/dg_rc.py
|
pyrcc5 qt/dg.qrc > qt/dg_rc.py
|
||||||
|
|
||||||
$(mofiles_target) : $(pofiles) | env
|
.PHONY : i18n
|
||||||
./env/bin/python build.py --loc
|
i18n: $(mofiles)
|
||||||
|
|
||||||
|
%.mo : %.po
|
||||||
|
msgfmt -o $@ $<
|
||||||
|
|
||||||
$(pemodules_target) :
|
$(pemodules_target) :
|
||||||
./env/bin/python -c 'import build; build.build_pe_modules("qt")'
|
./env/bin/python -c 'import build; build.build_pe_modules("qt")'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user