solenv/gbuild/AllLangMoTarget.mk |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit a4db03c69cf501f60ff931f2dab534103e5b2e71
Author:     Andras Timar <[email protected]>
AuthorDate: Mon Feb 23 12:39:35 2026 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Wed Feb 25 16:23:21 2026 +0100

    gbuild: add .po file dependency to MoTarget for incremental rebuilds
    
    MoTarget had no makefile prerequisite on the .po source files -
    the .po path was only referenced in the recipe command. This meant
    that modifying a .po file in the translations submodule would not
    trigger a rebuild of the corresponding .mo file during incremental
    builds.
    
    Add the .po file as a prerequisite in both gb_MoTarget_MoTarget
    (for the default polocation) and gb_MoTarget_set_polocation (for
    modules that override it), following the same $(wildcard ...) +
    empty-rule pattern already used by XcuMergeTarget, ScpMergeTarget,
    and other translation targets.
    
    Change-Id: I7f3a2e8b4c1d6e9f0a3b5d7c2e4f8a1b6d9c3e5f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200050
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/solenv/gbuild/AllLangMoTarget.mk b/solenv/gbuild/AllLangMoTarget.mk
index 3811ff4ee478..c2de09bc30fd 100644
--- a/solenv/gbuild/AllLangMoTarget.mk
+++ b/solenv/gbuild/AllLangMoTarget.mk
@@ -46,12 +46,17 @@ define gb_MoTarget_MoTarget
 $(call gb_MoTarget_get_target,$(1)) : LIBRARY = $(2)
 $(call gb_MoTarget_get_target,$(1)) : LANGUAGE = $(3)
 $(call gb_MoTarget_get_target,$(1)) : POLOCATION = $(2)
+$(call gb_MoTarget_get_target,$(1)) : $(wildcard 
$(gb_POLOCATION)/$(3)/$(2)/messages.po)
+$(gb_POLOCATION)/$(3)/$(2)/messages.po :
 $(call gb_AllLangMoTarget_get_clean_target,$(2)) : $(call 
gb_MoTarget_get_clean_target,$(1))
 
 endef
 
+# gb_MoTarget_set_polocation target polocation lang
 define gb_MoTarget_set_polocation
 $(call gb_MoTarget_get_target,$(1)) : POLOCATION = $(2)
+$(call gb_MoTarget_get_target,$(1)) : $(wildcard 
$(gb_POLOCATION)/$(3)/$(2)/messages.po)
+$(gb_POLOCATION)/$(3)/$(2)/messages.po :
 
 endef
 
@@ -94,7 +99,7 @@ endef
 
 define gb_AllLangMoTarget_set_polocation
 $(foreach lang,$(gb_AllLangMoTarget_LANGS),\
-        $(call gb_MoTarget_set_polocation,$(1)$(lang),$(2)))
+        $(call gb_MoTarget_set_polocation,$(1)$(lang),$(2),$(lang)))
 
 endef
 

Reply via email to