[gimp-help] build: fix creating po files for new languages



commit a2446d68282a07d5271981290e33ebeb8e3ae364
Author: Jacob Boerema <jgboerema gmail com>
Date:   Mon Mar 28 17:39:15 2022 -0400

    build: fix creating po files for new languages
    
    When the build dir was different from the source dir creating po files
    for new languages failed because the directories didn't exist yet.
    
    Explicitly add the srcdir for the po files to make it not check the
    build dir since po files are always in the srcdir.

 Makefile.GNU |  8 ++++----
 Makefile.am  | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/Makefile.GNU b/Makefile.GNU
index 4f9db5b6f..00f7e70cf 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -382,11 +382,11 @@ potfiles: $(POT_FILES) ;
 ########################################################################
 
 define MAKE_PO_RULES
-$(1)_PO_FILES = $$(patsubst pot/%.pot, po/$(1)/%.po, $$(POT_FILES))
-ifeq ($$(filter po/$(1)/%.po,$$(MAKECMDGOALS)),)
-$$($(1)_PO_FILES): po/$(1)/%.po : pot/%.pot
+$(1)_PO_FILES = $$(patsubst pot/%.pot, $(srcdir)/po/$(1)/%.po, $$(POT_FILES))
+ifeq ($$(filter $(srcdir)/po/$(1)/%.po,$$(MAKECMDGOALS)),)
+$$($(1)_PO_FILES): $(srcdir)/po/$(1)/%.po : pot/%.pot
 else
-$$($(1)_PO_FILES): po/$(1)/%.po : pot/%.pot FORCE
+$$($(1)_PO_FILES): $(srcdir)/po/$(1)/%.po : pot/%.pot FORCE
 endif
        $$(cmd) $$(call make_target_dir,$$@)
        $$(msg) "[PO]  $$@"
diff --git a/Makefile.am b/Makefile.am
index c9745eb4a..8027e55a6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -433,15 +433,15 @@ potfiles: $(POT_FILES) ;
 ########################################################################
 #
 # HIDE FROM AUTOMAKE #define MAKE_PO_RULES
-# HIDE FROM AUTOMAKE #$(1)_PO_FILES = $$(patsubst pot/%.pot, po/$(1)/%.po, $$(POT_FILES))
-# HIDE FROM AUTOMAKE #ifeq ($$(filter po/$(1)/%.po,$$(MAKECMDGOALS)),)
-# HIDE FROM AUTOMAKE #$$($(1)_PO_FILES): po/$(1)/%.po : pot/%.pot
+# HIDE FROM AUTOMAKE #$(1)_PO_FILES = $$(patsubst pot/%.pot, $(srcdir)/po/$(1)/%.po, $$(POT_FILES))
+# HIDE FROM AUTOMAKE #ifeq ($$(filter $(srcdir)/po/$(1)/%.po,$$(MAKECMDGOALS)),)
+# HIDE FROM AUTOMAKE #$$($(1)_PO_FILES): $(srcdir)/po/$(1)/%.po : pot/%.pot
 # HIDE FROM AUTOMAKE #else
-# HIDE FROM AUTOMAKE #$$($(1)_PO_FILES): po/$(1)/%.po : pot/%.pot FORCE
+# HIDE FROM AUTOMAKE #$$($(1)_PO_FILES): $(srcdir)/po/$(1)/%.po : pot/%.pot FORCE
 # HIDE FROM AUTOMAKE #endif
 # HIDE FROM AUTOMAKE # $$(cmd) $$(call make_target_dir,$$@)
 # HIDE FROM AUTOMAKE # $$(msg) "[PO]  $$@"
-# HIDE FROM AUTOMAKE # $$(cmd) if test -s $$<; then $$(call pot2po,$$<,$(1),$(srcdir)/$$@); else touch $$@; 
fi
+# HIDE FROM AUTOMAKE # $$(cmd) if test -s $$<; then $$(call pot2po,$$<,$(1),$$@); else touch $$@; fi
 # HIDE FROM AUTOMAKE #po-$(1): $$($(1)_PO_FILES) cleanup-po-$(1)
 # HIDE FROM AUTOMAKE # $$(cmd) if test -e messages.mo; then rm -f messages.mo; fi
 # HIDE FROM AUTOMAKE #cleanup-po-$(1):


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