diff --git a/Makefile b/Makefile index 3f66302..4931d32 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/po/Makefile b/po/Makefile index 6b52e94..b8eb3a2 100644 --- a/po/Makefile +++ b/po/Makefile @@ -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