Fix translation compilation

Now the Makefile should automatically detect when it needs to create a specific
.qm file and do the right thing to create it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-10-11 09:25:46 -07:00
parent beb40ae494
commit 2e2212da5f

View file

@ -119,12 +119,10 @@ XSLTDIR = $(DATADIR)/subsurface
else: QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
}
isEmpty(TS_DIR):TS_DIR = translations
TSQM.target = .translations
TSQM.name = lrelease subsurface.pro
TSQM.depends = $$TRANSLATIONS
TSQM.input = TRANSLATIONS
TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
TSQM.commands = $$QMAKE_LRELEASE subsurface.pro && echo "OK" > .translations
QMAKE_EXTRA_TARGETS += TSQM
PRE_TARGETDEPS += .translations
TSQM.CONFIG += no_link target_predeps
TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm $$TS_DIR/${QMAKE_FILE_BASE}.qm
QMAKE_EXTRA_COMPILERS += TSQM
}
QMAKE_EXTRA_TARGETS += install $$install.depends