[Groonga-commit] groonga/groonga [master] [doc] re-support updating *.po.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 5月 18日 (水) 12:47:36 JST


Kouhei Sutou	2011-05-18 03:47:36 +0000 (Wed, 18 May 2011)

  New Revision: 2df12e7e0220ead29200b26c7ab4e854d1e6a9a0

  Log:
    [doc] re-support updating *.po.

  Modified files:
    .gitignore
    build/makefiles/gettext.mk
    doc/Makefile.am

  Modified: .gitignore (+2 -0)
===================================================================
--- .gitignore    2011-05-18 03:24:21 +0000 (5925549)
+++ .gitignore    2011-05-18 03:47:36 +0000 (b0477d2)
@@ -51,6 +51,8 @@ version.sh
 /doc/locale/*/textile/
 /doc/locale/*/pdf/
 /doc/locale/*/LC_MESSAGES/*.mo
+/doc/locale/*/LC_MESSAGES/*.pot
+/doc/locale/*/LC_MESSAGES/doctrees/
 /doc/pot/
 /doc/commands_not_implemented/
 /doc/sphinx/

  Modified: build/makefiles/gettext.mk (+17 -6)
===================================================================
--- build/makefiles/gettext.mk    2011-05-18 03:24:21 +0000 (2333531)
+++ build/makefiles/gettext.mk    2011-05-18 03:47:36 +0000 (7d9275c)
@@ -1,14 +1,25 @@
 include $(abs_top_srcdir)/build/makefiles/gettext-files.mk
+include $(abs_top_srcdir)/build/makefiles/sphinx-build.mk
 
-.PHONY: update
+.PHONY: gettext update build
 
-all: update
+all: build
 
-.SUFFIXES: .po .mo
+.SUFFIXES: .pot .po .mo
+.pot.po:
+	msgmerge --quiet --update --sort-by-file $@ $<
 .po.mo:
 	msgfmt -o $@ $<
 
-update: $(mo_files)
+update: pot-build-stamp $(po_files)
+build: $(mo_files)
 
-html: update
-pdf: update
+html: build
+pdf: build
+
+gettext: sphinx-ensure-updated
+	$(SPHINX_BUILD_COMMAND) -d doctrees -b gettext $(ALLSPHINXOPTS) .
+
+pot-build-stamp: $(source_files)
+	$(MAKE) gettext
+	@touch $@

  Modified: doc/Makefile.am (+0 -17)
===================================================================
--- doc/Makefile.am    2011-05-18 03:24:21 +0000 (9d0357c)
+++ doc/Makefile.am    2011-05-18 03:47:36 +0000 (48bd918)
@@ -8,9 +8,6 @@ include $(abs_top_srcdir)/build/makefiles/sphinx-build.mk
 update-examples:
 	GROONGA=$(GROONGA) $(srcdir)/source/update_execution_example.py
 
-gettext: sphinx-ensure-updated
-	$(SPHINX_BUILD_COMMAND) -b gettext $(ALLSPHINXOPTS) pot
-
 add-locale: gettext
 	test -n "$(LOCALE)" ||				\
 	  (echo "run with LOCALE=\$${NEW_LOCALE}.";	\
@@ -25,20 +22,6 @@ add-locale: gettext
 	    --locale=$(LOCALE);						\
 	done
 
-update-po: gettext
-	for locale in $(LOCALES); do				\
-	  test $${locale} = "en" && continue;				\
-	  for po in $(srcdir)/locale/$${locale}/LC_MESSAGES/*.po; do	\
-	    pot=pot/`basename $$po | sed s/po$$/pot/`;			\
-	    echo -n "updateing $${po}: ";				\
-	    msgmerge							\
-	      --update							\
-	      --sort-by-file						\
-	      $${po}							\
-	      $${pot};							\
-	  done;								\
-	done
-
 # find pot -type f -name '*.pot' | sort | sed -e 's,^,\t,g'
 pot_files =					\
 	pot/characteristic.pot			\




Groonga-commit メーリングリストの案内
Back to archive index