[gimp-help/gimp-help-2-10] build: fix creating po files for new languages
- From: Jacob Boerema <jboerema src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-help/gimp-help-2-10] build: fix creating po files for new languages
- Date: Tue, 29 Mar 2022 20:38:04 +0000 (UTC)
commit e6e600dd612e4af376f5edbcc86658a1c341c554
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.
(cherry picked from commit a2446d68282a07d5271981290e33ebeb8e3ae364)
Makefile.GNU | 8 ++++----
Makefile.am | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/Makefile.GNU b/Makefile.GNU
index 653401014..87965c3cd 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -384,11 +384,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 7902135b2..c164078a3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -434,15 +434,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]