Add explicit targets to update po files.

This commit is contained in:
Sebastian Ramacher 2012-03-08 18:03:19 +01:00
parent 48d06cbf36
commit cc0e59825c
2 changed files with 11 additions and 4 deletions

View File

@ -114,6 +114,9 @@ gcov: clean
po:
$(QUIET)${MAKE} -C po
update-po:
$(QUIET)${MAKE} -C po update-po
install-headers: ${PROJECT}.pc
$(ECHO) installing header files
$(QUIET)mkdir -p ${DESTDIR}${PREFIX}/include/${PROJECT}
@ -164,4 +167,4 @@ uninstall:
-include $(wildcard .depend/*.dep)
.PHONY: all options clean doc debug valgrind gdb dist doc install uninstall test \
po install-headers uninstall-headers
po install-headers uninstall-headers update-po

View File

@ -23,9 +23,11 @@ ${PROJECT}.pot: POTFILES.in
$(ECHO) regenerate ${PROJECT}.pot
$(QUIET)intltool-update --pot --gettext-package=${PROJECT}
%.po: ${PROJECT}.pot
$(ECHO) updating language $(shell echo $@ | sed 's/\.po//')
$(QUIET)intltool-update --dist --gettext-package=${PROJECT} $(shell echo $@ | sed 's/\.po//')
update-po: ${PROJECT}.pot
$(ECHO) updating po: files ${CATALOGS}
$(QUIET)set -e && for f in ${CATALOGS} ; do \
intltool-update --dist --gettext-package=${PROJECT} `echo $$f | sed 's/\.po//'` ; \
done
%/LC_MESSAGES/${PROJECT}.mo: %.po
@mkdir -p $(@D)
@ -44,3 +46,5 @@ uninstall: ${MOS}
$(QUIET)set -e && for f in $^ ; do \
rm -f $(LOCALEDIR)/$$f; \
done
.PHONY: all clean update-po install uninstall