diff options
author | Bruno Haible <bruno@clisp.org> | 2004-01-17 16:25:37 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:11:41 +0200 |
commit | 49e2d6fb2b1c025267abce82ad67426bfe79374c (patch) | |
tree | bbf694d6789a6960337a043eb46901e5ed6b5e57 /gettext-tools/examples/hello-smalltalk/po | |
parent | 6a0a2ee21d5ba15520704aee8a24160f317ecd36 (diff) | |
download | external_gettext-49e2d6fb2b1c025267abce82ad67426bfe79374c.zip external_gettext-49e2d6fb2b1c025267abce82ad67426bfe79374c.tar.gz external_gettext-49e2d6fb2b1c025267abce82ad67426bfe79374c.tar.bz2 |
Create autogenerated PO files if they don't exist.
Diffstat (limited to 'gettext-tools/examples/hello-smalltalk/po')
-rw-r--r-- | gettext-tools/examples/hello-smalltalk/po/Makefile.am | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/gettext-tools/examples/hello-smalltalk/po/Makefile.am b/gettext-tools/examples/hello-smalltalk/po/Makefile.am index 9387717..b7f1d03 100644 --- a/gettext-tools/examples/hello-smalltalk/po/Makefile.am +++ b/gettext-tools/examples/hello-smalltalk/po/Makefile.am @@ -1,5 +1,5 @@ # Example for use of GNU gettext. -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 2003-2004 Free Software Foundation, Inc. # This file is in the public domain. # # Makefile configuration - processed by automake. @@ -68,7 +68,7 @@ DUMMYPOFILES = @DUMMYPOFILES@ # $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo) CATALOGS = @CATALOGS@ -SUFFIXES = .po .gmo .mo .sed .sin .nop .po-update +SUFFIXES = .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ @@ -141,9 +141,13 @@ $(srcdir)/$(DOMAIN).pot: # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot + if test -f "$(srcdir)/$${lang}.po"; then \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + else \ + $(MAKE) $${lang}.po-create; \ + fi install-data-local: install-data-local-@USE_NLS@ @@ -260,6 +264,13 @@ update-po: Makefile test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo +# 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: |