gimp-help-2 r2579 - branches/xml2po-support



Author: romanofski
Date: Sat Oct 11 15:08:17 2008
New Revision: 2579
URL: http://svn.gnome.org/viewvc/gimp-help-2?rev=2579&view=rev

Log:

2008-10-11  Roman Joost  <romanofski gimp org>

	* Makefile.am: converted one target (potfiles) from the
	Makefile. Hopefully more to come


Modified:
   branches/xml2po-support/ChangeLog
   branches/xml2po-support/Makefile.am

Modified: branches/xml2po-support/Makefile.am
==============================================================================
--- branches/xml2po-support/Makefile.am	(original)
+++ branches/xml2po-support/Makefile.am	Sat Oct 11 15:08:17 2008
@@ -39,9 +39,18 @@
 	-o                  \
 	-name '*.xml' -print
 
+dir_predicates =        \
+	-name '.svn' -prune \
+	        -o          \
+	-type d -print
+
+XML_DIRS  = $(shell cd $(srcdir) && find $(xmldir) $(dir_predicates))
+
 XML_FILES = $(shell cd $(top_srcdir) && find src $(src_find_predicates)) \
 	    $(AUTHORS_DOCBOOK_XML)
 
+POT_FILES  = $(XML_FILES:$(xmldir)/%.xml=$(potdir)/%.pot)
+
 COMMON_CSS_FILES = \
 	stylesheets/gimp-help-plain.css	\
 	stylesheets/gimp-help-screen.css
@@ -73,7 +82,33 @@
 
 DISTCHECK_CONFIGURE_FLAGS = --without-gimp
 
-helpdir = $(gimpdatadir)/help
+helpdir  = $(gimpdatadir)/help
+
+xmldir   = src
+
+potdir   = pot
+
+podir    = po
+
+xml2pot = $(XML2PO) --output="$(2)" $(1) 2>&1 \
+          | sed -e '/Warning: image file .* not found./d'
+
+#### POT directories
+
+$(POT_FILES): $(potdir)/%.pot : $(xmldir)/%.xml
+	@f=$@; d=$${f%/*}; test -d $$d || $(mkdir_p) $$d
+	@echo "[POT] $@"
+	@if test -s $<; then \
+	  $(call xml2pot,$<,$@);\
+	else \
+	  touch $@; \
+	fi
+
+# Targets suitable for command line
+# ("make pot" will work even if pot exists)
+pot update-pot: potfiles
+potfiles: $(POT_FILES)
+
 
 #### XML profiling
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]