diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-11-28 11:29:34 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-11-28 11:38:54 +0100 |
commit | d61d02ba66308161150bedc472e8f766811d8662 (patch) | |
tree | dcedbcb657baae4c8033f7e352a4aae32b807880 | |
parent | 169ee4037c6e31ccf77b992c8b226320640ccee7 (diff) |
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
-rw-r--r-- | solenv/gbuild/UnoApiTarget.mk | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk index 9bd5d1e23825..1b854b6adf25 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 |