[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - solenv/gbuild
Michael Stahl
mstahl at redhat.com
Tue Jan 21 01:53:04 PST 2014
solenv/gbuild/UnoApi.mk | 3 +++
solenv/gbuild/UnoApiTarget.mk | 13 +++++++++++++
2 files changed, 16 insertions(+)
New commits:
commit e7ba6ad7c597fa808265938dbcf40017b8b3e5e0
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jan 20 18:01:04 2014 +0100
gbuild: UnoApi: fix rebuilds after IDL changes
There used to be a dependency between .urd file and .hpp/.hdl files but
that was removed; introduce a dependency between .idl files and
.hpp/.hdl files to replace it so headers and stuff depending on them get
rebuilt.
Change-Id: Ibf1fe1db08c36ce42c392d27b794c2bc2a33738c
(cherry picked from commit 0190a70e79efa437e1516e635f4f670d7a35bb2d)
Reviewed-on: https://gerrit.libreoffice.org/7547
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/solenv/gbuild/UnoApi.mk b/solenv/gbuild/UnoApi.mk
index 5f40ee3..21ce4d6 100644
--- a/solenv/gbuild/UnoApi.mk
+++ b/solenv/gbuild/UnoApi.mk
@@ -68,6 +68,8 @@ endef
define gb_UnoApi_add_idlfiles
$(call gb_UnoApiTarget_add_idlfiles,$(1),$(2),$(3))
+$(call gb_UnoApiHeadersTarget_add_headerfiles,$(1),$(2),$(addsuffix .hpp,$(3)))
+$(call gb_UnoApiHeadersTarget_add_headerfiles,$(1),$(2),$(addsuffix .hdl,$(3)))
$(foreach idl,$(3),$(call gb_UnoApi__add_idlfile,$(1),$(gb_UnoApiTarget_REG_$(1))/$(2)/$(idl)))
endef
@@ -81,6 +83,7 @@ endef
define gb_UnoApi_add_idlfiles_nohdl
$(call gb_UnoApiTarget_add_idlfiles,$(1),$(2),$(3))
+$(call gb_UnoApiHeadersTarget_add_headerfiles,$(1),$(2),$(addsuffix .hpp,$(3)))
$(foreach idl,$(3),$(call gb_UnoApi__add_idlfile,$(1),$(gb_UnoApiTarget_REG_$(1))/$(2)/$(idl)))
endef
diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index 28695b8..dbce2d4 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -202,6 +202,19 @@ $(call gb_UnoApiHeadersTarget_get_real_comprehensive_dir,$(1))/%.hpp :| \
endef
+# ensure that idl change triggers the dummy rule to rebuild the headers
+# call gb_UnoApiHeadersTarget_add_headerfile,unoapi,headerfile
+define gb_UnoApiHeadersTarget_add_headerfile
+$(call gb_UnoApiHeadersTarget_get_dir,$(1))/$(2) : \
+ $(SRCDIR)/$(basename $(gb_UnoApiTarget_REG_$(1))/$(2)).idl
+
+endef
+
+# call gb_UnoApiHeadersTarget_add_headerfiles,unoapi,directory,headerfilenames
+define gb_UnoApiHeadersTarget_add_headerfiles
+$(foreach hdr,$(3),$(call gb_UnoApiHeadersTarget_add_headerfile,$(1),$(2)/$(hdr)))
+endef
+
define gb_UnoApiHeadersTarget__use_api_for_target
$(call gb_UnoApiHeadersTarget_get_$(3),$(1)) : $(call gb_UnoApiTarget_get_target,$(2))
$(call gb_UnoApiHeadersTarget_get_$(3),$(1)) : UNOAPI_DEPS += -X$(call gb_UnoApiTarget_get_target,$(2))
More information about the Libreoffice-commits
mailing list