[Libreoffice-commits] .: solenv/gbuild
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Nov 28 02:46:20 PST 2012
solenv/gbuild/UnoApiTarget.mk | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit d61d02ba66308161150bedc472e8f766811d8662
Author: Michael Stahl <mstahl at 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
More information about the Libreoffice-commits
mailing list