solenv/gbuild/Gallery.mk |   17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

New commits:
commit 0cae68768e92b1d735baa2e02602b4f6fe17d13e
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Sat Dec 10 17:41:28 2022 +0100
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Tue Dec 13 15:10:13 2022 +0000

    don't rebuild Gallery themes if nothing changed
    
    Change-Id: I49fe9d36550a3f712be57fd4e67f0606ee8feea9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143909
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/solenv/gbuild/Gallery.mk b/solenv/gbuild/Gallery.mk
index 42f280e1aad6..3443a3c1b415 100644
--- a/solenv/gbuild/Gallery.mk
+++ b/solenv/gbuild/Gallery.mk
@@ -50,8 +50,8 @@ $(dir $(call gb_Gallery_get_target,$(1))).dir :
 $(dir $(call gb_Gallery_get_target,$(1)))%/.dir :
        $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
 
-$(call gb_Gallery_get_target,%) : \
-               $(call gb_Executable_get_runtime_dependencies,gengal)
+$(call gb_Gallery_get_target,%) : $(call gb_Executable_get_target,gengal) \
+        | $(call gb_Executable_get_runtime_dependencies,gengal)
        $(call gb_Output_announce,$*,$(true),GAL,1)
        $(call gb_Trace_StartRange,$*,GAL)
        $(call gb_Gallery__command,$@,$*)
@@ -74,14 +74,6 @@ $(call gb_Gallery_get_workdir,%).str : 
$(gb_Gallery_TRANSLATE) \
        $(call gb_Gallery__command_str,$@,$*)
        $(call gb_Trace_EndRange,$*,STR)
 
-# there must be a rule for these since they are targets due to Package
-$(call gb_Gallery_get_workdir,%).sdg :
-       touch $@
-$(call gb_Gallery_get_workdir,%).sdv :
-       touch $@
-$(call gb_Gallery_get_workdir,%).thm :
-       touch $@
-
 .PHONY : $(call gb_Gallery_get_clean_target,%)
 $(call gb_Gallery_get_clean_target,%) :
        $(call gb_Output_announce,$*,$(false),GAL,1)
@@ -144,9 +136,8 @@ $(call gb_Gallery_get_workdir,$(1))/$(1).ulf : \
 
 $(call gb_Gallery_get_workdir,$(1))/$(1).str : $(call 
gb_Gallery_get_workdir,$(1))/$(1).ulf
 
-$(call gb_Gallery_get_workdir,$(1))/$(1).sdg \
-$(call gb_Gallery_get_workdir,$(1))/$(1).sdv \
-$(call gb_Gallery_get_workdir,$(1))/$(1).thm : $(call 
gb_Gallery_get_target,$(1))
+# oder-only, the Gallery-Target also makes those files
+$(addprefix $(call gb_Gallery_get_workdir,$(1))/$(1),.sdg .sdv .thm): | $(call 
gb_Gallery_get_target,$(1))
 $(call gb_Gallery__get_final_target,$(1)) : $(call gb_Package_get_target,$(2))
 
 $(call gb_Gallery_get_clean_target,$(1)) : $(call 
gb_Package_get_clean_target,$(2))

Reply via email to