gimp-help-2 r2526 - branches/xml2po-support
- From: ulfehlert svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp-help-2 r2526 - branches/xml2po-support
- Date: Mon, 11 Aug 2008 20:38:24 +0000 (UTC)
Author: ulfehlert
Date: Mon Aug 11 20:38:24 2008
New Revision: 2526
URL: http://svn.gnome.org/viewvc/gimp-help-2?rev=2526&view=rev
Log:
2008-08-11 Ulf-D. Ehlert <ulfehlert svn gnome org>
* Makefile: added some tests to handle empty xml, po, and pot files
Modified:
branches/xml2po-support/ChangeLog
branches/xml2po-support/Makefile
Modified: branches/xml2po-support/Makefile
==============================================================================
--- branches/xml2po-support/Makefile (original)
+++ branches/xml2po-support/Makefile Mon Aug 11 20:38:24 2008
@@ -190,8 +190,8 @@
# xmldir/path/to/file.xml --> potdir/path/to/file.pot
$(POT_FILES): $(potdir)/%.pot : $(xmldir)/%.xml
$(cmd) f=$@; d=$${f%/*}; test -d $$d || $(mkdir_p) $$d
- $(msg) "$@"
- $(cmd) $(call xml2pot,$<,$@)
+ $(msg) "[POT] $@"
+ $(cmd) if test -s $<; then $(call xml2pot,$<,$@); else touch $@; fi
# Targets suitable for command line
# ("make pot" will work even if pot exists)
@@ -207,8 +207,8 @@
$(1)_PO_FILES = $$(patsubst $$(potdir)/%.pot, $$(podir)/$(1)/%.po, $$(POT_FILES))
$$($(1)_PO_FILES): $$(podir)/$(1)/%.po : $$(potdir)/%.pot
$$(cmd) f=$$@; d=$$$${f%/*}; test -d $$$$d || $$(mkdir_p) $$$$d
- $$(msg) "$$@"
- $$(cmd) $$(call pot2po,$$<,$(1),$$@)
+ $$(msg) "[PO] $$@"
+ $$(cmd) if test -s $$<; then $$(call pot2po,$$<,$(1),$$@); else touch $$@; fi
# Debugging
list-pofiles-$(1) list-po-files-$(1) list-po-$(1):
@echo $$($(1)_PO_FILES)
@@ -234,8 +234,12 @@
$(1)_XML_FILES = $$(XML_FILES:$$(xmldir)/%=$$(xmlpodir)/$(1)/%)
$$($(1)_XML_FILES): $$(xmlpodir)/$(1)/%.xml : $$(podir)/$(1)/%.po
$$(cmd) f=$$@; d=$$$${f%/*}; test -d $$$$d || $$(mkdir_p) $$$$d
- $$(msg) "$$@"
- $$(cmd) @$$(call po2xml,$$(@:$$(xmlpodir)/$(1)/%=$$(xmldir)/%),$$<,$(1),$$@)
+ $$(msg) "[XML] $$@"
+ $$(cmd) if test -s $$(@:$$(xmlpodir)/$(1)/%=$$(xmldir)/%); then \
+ $$(call po2xml,$$(@:$$(xmlpodir)/$(1)/%=$$(xmldir)/%),$$<,$(1),$$@); \
+ else \
+ touch $$@; \
+ fi
# This is indirectly used as HTML prerequisite:
$$(xmlpodir)/$(1): $$($(1)_XML_FILES)
$$(cmd) touch $$(xmlpodir)/$(1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]