summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-01-20 18:01:04 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-01-21 09:52:43 +0000
commite7ba6ad7c597fa808265938dbcf40017b8b3e5e0 (patch)
treeb00103de6266a7be42b1a3bb38a8d9abdcb5229d
parent7e31667cd6d83d76b641462118ae05ec3c19f4b5 (diff)
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@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--solenv/gbuild/UnoApi.mk3
-rw-r--r--solenv/gbuild/UnoApiTarget.mk13
2 files changed, 16 insertions, 0 deletions
diff --git a/solenv/gbuild/UnoApi.mk b/solenv/gbuild/UnoApi.mk
index 5f40ee31bcaf..21ce4d6b14d6 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 28695b861241..dbce2d4e608f 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))