From: Akihiro MOTOKI Date: Fri, 13 Apr 2012 05:45:31 +0000 (+0900) Subject: GNU_coreutils: Define a Makefile target to compile PO file. X-Git-Tag: coreutils-8.22~27 X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=21a96b0e58ab3b9ccf1b864eea70dfe8fbea40a7;p=linuxjm%2Fcoreutils.git GNU_coreutils: Define a Makefile target to compile PO file. If ja.po in coreutils source tree, this target generates ja.gmo and copies it to source/locale/LC_MESSAGES/coreutils.mo. By doing this, changes in ja.po are automatically incorporated into translated help2man manpages. --- diff --git a/Makefile b/Makefile index d43505a..b3d7b4c 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,8 @@ PACKAGE_STRING = $(PACKAGE_NAME) $(PACKAGE_VERSION) all: build-man +#------------------------------------------------------------ + tarball: $(tarball) $(tarball): wget http://core.ring.gr.jp/pub/GNU/coreutils/$@ @@ -43,7 +45,21 @@ stamp-build: stamp-configure ) touch $@ -build-man: +#------------------------------------------------------------ + +mo-ja = source/locale/$(LANG)/LC_MESSAGES/coreutils.mo +gmo-ja = source/po/ja.gmo +po-ja = source/po/ja.po + +$(mo-ja): $(gmo-ja) + /bin/cp $^ $@ + +$(gmo-ja): $(po-ja) + $(MAKE) -C source/po $$(basename $@) + +catalog: $(mo-ja) + +build-man: catalog $(MAKE) -C help2man.ja $@ PACKAGE_VERSION=$(PACKAGE_VERSION) install: build-man diff --git a/help2man.ja/Makefile b/help2man.ja/Makefile index 8dcd16b..a696b03 100644 --- a/help2man.ja/Makefile +++ b/help2man.ja/Makefile @@ -29,8 +29,10 @@ install: build-man clean: $(RM) $(MANPAGES) +$(MANPAGES): $(srcdir)/locale/$(LANG)/LC_MESSAGES/coreutils.mo + .x.1: - $(AM_V_GEN)rm -f $@ $@-t \ + $(AM_V_GEN)rm -f $@ $@-t \ && { \ rm -rf $t; \ mkdir $t; \