solenv/gbuild/UnoApiTarget.mk |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit d61d02ba66308161150bedc472e8f766811d8662
Author: Michael Stahl <mst...@redhat.com>
Date:   Wed Nov 28 11:29:34 2012 +0100

    gbuild: UnoApiTarget: fix spurious rebuilds:
    
    Since commit 800f388206b15db545d8b96d5546b766a4fc7b32 there are spurious
    rebuilds when a IDL file is rebuilt, because the rule for the idlc
    invocation was changed to rebuild all IDL files, but the dummy rule for
    .urd files only touched that when its own IDL file changes; this means
    that the header target is not seen as outdated in this make run, but it
    will be outdated in the next make run because then the .urd file
    timestamp is checked and is newer.
    The dummy rule for .urd files must touch the .urd file if and only if
    the rule for the .done file re-builds that .urd file.
    
    Change-Id: I37938aef0621c7d46809e02a06d22248de28271b

diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index 9bd5d1e..1b854b6 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -67,10 +67,13 @@ define gb_UnoApiPartTarget__command
 
 endef
 
+# If idlc changed, rebuild everything; otherwise just the changed files.
+# In order for this to work the .urd files need to have a dependency on
+# idlc as well so their dummy rule fires if that changes.
 $(call gb_UnoApiPartTarget_get_target,%.done) : \
                $(gb_UnoApiPartTarget_IDLCTARGET) \
                | $(gb_UCPPTARGET)
-       $(call gb_UnoApiPartTarget__command,$@,$*,$(filter-out 
$(gb_UnoApiPartTarget_IDLCTARGET),$^))
+       $(call gb_UnoApiPartTarget__command,$@,$*,$(filter-out 
$(gb_UnoApiPartTarget_IDLCTARGET),$(if $(filter 
$(gb_UnoApiPartTarget_IDLCTARGET),$?),$^,$?)))
 
 ifeq ($(gb_FULLDEPS),$(true))
 
@@ -179,8 +182,9 @@ define gb_UnoApiTarget__add_idlfile
 $(call gb_UnoApiPartTarget_get_target,$(2)/idl.done) : \
        $(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd)
 $(call gb_UnoApiTarget__add_urdfile,$(1),$(call 
gb_UnoApiPartTarget_get_target,$(2)/$(3).urd))
-$(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) :| \
-       $(call gb_UnoApiPartTarget_get_target,$(2)/.dir)
+$(call gb_UnoApiPartTarget_get_target,$(2)/$(3).urd) \
+       : $(gb_UnoApiPartTarget_IDLCTARGET) \
+       | $(call gb_UnoApiPartTarget_get_target,$(2)/.dir)
 
 ifeq ($(gb_FULLDEPS),$(true))
 $(call gb_UnoApiTarget_get_dep_target,$(1)) : UNOAPI_IDLFILES += $(2)/$(3).idl
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to