diff options
author | Bruno Haible <bruno@clisp.org> | 2009-08-16 19:37:02 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-08-16 19:37:02 +0200 |
commit | 8120a24b3e59ac6336b8758c30b5b1277f3e8f75 (patch) | |
tree | 416a70dc42926de2579a813796be50ee9c0111ad /gettext-tools/examples | |
parent | fe9b2560d420f27f1d4a8fd6e935e2470a09665e (diff) | |
download | external_gettext-8120a24b3e59ac6336b8758c30b5b1277f3e8f75.zip external_gettext-8120a24b3e59ac6336b8758c30b5b1277f3e8f75.tar.gz external_gettext-8120a24b3e59ac6336b8758c30b5b1277f3e8f75.tar.bz2 |
Create autogenerated PO files if they don't exist.
Diffstat (limited to 'gettext-tools/examples')
-rw-r--r-- | gettext-tools/examples/ChangeLog | 5 | ||||
-rw-r--r-- | gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile | 27 |
2 files changed, 24 insertions, 8 deletions
diff --git a/gettext-tools/examples/ChangeLog b/gettext-tools/examples/ChangeLog index 121a289..e6bff41 100644 --- a/gettext-tools/examples/ChangeLog +++ b/gettext-tools/examples/ChangeLog @@ -1,3 +1,8 @@ +2009-08-16 Bruno Haible <bruno@clisp.org> + + * hello-objc-gnustep/po/GNUmakefile: Apply 2004-01-17 changes to + hello-*/po/Makefile.am. + 2009-07-29 Bruno Haible <bruno@clisp.org> * po/lv.po: New file, from Rihards Priedītis <rprieditis@gmail.com>. diff --git a/gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile b/gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile index d4c159b..5555adc 100644 --- a/gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile +++ b/gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile @@ -68,7 +68,7 @@ STRINGSFILES = $(foreach lang, $(LINGUAS), $(top_srcdir)/$(NSLOCALE_$(lang)).lpr ENSTRINGSFILES = $(foreach lang, $(ENLINGUAS), $(top_srcdir)/$(NSLOCALE_$(lang)).lproj/Localizable.strings) CATALOGS = $(STRINGSFILES) $(ENSTRINGSFILES) -.SUFFIXES: .po .mo .sed .sin .nop .po-update +.SUFFIXES: .po .mo .sed .sin .nop .po-create .po-update .sin.sed: sed -e '/^#/d' $< > t-$@ @@ -117,19 +117,30 @@ $(DOMAIN).pot: # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ - echo "$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ - case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ - $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ - *) \ - $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ - esac + if test -f $${lang}.po; then \ + echo "$(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + else \ + $(MAKE) $${lang}.po-create; \ + fi update-po: $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-strings +# General rule for creating PO files. + +.nop.po-create: + @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ + echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ + exit 1 + # General rule for updating PO files. .nop.po-update: |