[gimp-help-2: 5/7] [make] Change rule for making po files (Makefile.GNU)



commit 952c94cc068f036b6472e0e937c586d679e5881c
Author: Ulf-D. Ehlert <ulfehlert svn gnome org>
Date:   Thu Aug 13 20:48:49 2009 +0200

    [make] Change rule for making po files (Makefile.GNU)
    
    * Makefile.GNU (yet another experiment):
      Force updating, when one or more po files are explicitly
      specified as targets.

 Makefile.GNU |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/Makefile.GNU b/Makefile.GNU
index f34e7a4..69e6a23 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -356,7 +356,11 @@ potfiles: $(POT_FILES)
 
 define MAKE_PO_RULES
 $(1)_PO_FILES = $$(patsubst pot/%.pot, po/$(1)/%.po, $$(POT_FILES))
+ifeq ($$(filter $$(MAKECMDGOALS),$$($(1)_PO_FILES)),)
 $$($(1)_PO_FILES): po/$(1)/%.po : pot/%.pot
+else
+$$($(1)_PO_FILES): po/$(1)/%.po : pot/%.pot FORCE
+endif
 	$$(cmd) $$(call make_target_dir,$$@)
 	$$(msg) "[PO]  $$@"
 	$$(cmd) if test -s $$<; then $$(call pot2po,$$<,$(1),$$@); else touch $$@; fi
@@ -391,14 +395,11 @@ po-todo-%: po-%
 
 # Force updating po file(s)
 update-po/%.po:
-	$(cmd) po=$@; pot=pot/$${po#update-po/*/}t; \
-	$(RMAKE) $${pot} && touch $${pot} && \
-	$(RMAKE) po/$*.po
+	$(msg) "Deprecated, use 'make po/$*.po instead'"
+	$(cmd) false
 
 force-po/%:
-	$(cmd) for po in po/$*/*.po; do \
-		$(RMAKE) update-$${po}; \
-	done
+	$(cmd) $(RMAKE) po/$*/*.po
 
 
 ########################################################################



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