[Libreoffice-commits] core.git: 3 commits - solenv/gbuild

Michael Stahl mstahl at redhat.com
Mon Jan 20 10:42:27 PST 2014


 solenv/gbuild/UnoApi.mk       |   21 ++------------------
 solenv/gbuild/UnoApiTarget.mk |   43 ++++++++++++++++++++++++++++++------------
 2 files changed, 34 insertions(+), 30 deletions(-)

New commits:
commit c61ecda75b118a1a9dad4e9a2b56a85f7ace3219
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jan 20 18:38:14 2014 +0100

    gbuild: UnoApi: remove unused sinular gb_UnoApi_add_idlfile etc.
    
    Change-Id: I9ad8798b205e697a588804de3de758be7203f1a5

diff --git a/solenv/gbuild/UnoApi.mk b/solenv/gbuild/UnoApi.mk
index 21ce4d6..52028d5 100644
--- a/solenv/gbuild/UnoApi.mk
+++ b/solenv/gbuild/UnoApi.mk
@@ -60,12 +60,6 @@ endif
 
 # For enum types, plain struct types, polymorphic struct type templates,
 # exception types, interface types, typedefs, and constant groups:
-define gb_UnoApi_add_idlfile
-$(call gb_UnoApiTarget_add_idlfile,$(1),$(2),$(3))
-$(call gb_UnoApi__add_idlfile,$(1),$(gb_UnoApiTarget_REG_$(1))/$(2)/$(3))
-
-endef
-
 define gb_UnoApi_add_idlfiles
 $(call gb_UnoApiTarget_add_idlfiles,$(1),$(2),$(3))
 $(call gb_UnoApiHeadersTarget_add_headerfiles,$(1),$(2),$(addsuffix .hpp,$(3)))
@@ -75,12 +69,6 @@ $(foreach idl,$(3),$(call gb_UnoApi__add_idlfile,$(1),$(gb_UnoApiTarget_REG_$(1)
 endef
 
 # For single-interface--based services and interface-based singletons:
-define gb_UnoApi_add_idlfile_nohdl
-$(call gb_UnoApiTarget_add_idlfile,$(1),$(2),$(3))
-$(call gb_UnoApi__add_idlfile,$(1),$(gb_UnoApiTarget_REG_$(1))/$(2)/$(3))
-
-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)))
@@ -89,12 +77,6 @@ $(foreach idl,$(3),$(call gb_UnoApi__add_idlfile,$(1),$(gb_UnoApiTarget_REG_$(1)
 endef
 
 # For accumulation-based services and service-based singletons:
-define gb_UnoApi_add_idlfile_noheader
-$(call gb_UnoApiTarget_add_idlfile,$(1),$(2),$(3))
-$(call gb_UnoApi__add_idlfile,$(1),$(gb_UnoApiTarget_REG_$(1))/$(2)/$(3))
-
-endef
-
 define gb_UnoApi_add_idlfiles_noheader
 $(call gb_UnoApiTarget_add_idlfiles,$(1),$(2),$(3))
 $(foreach idl,$(3),$(call gb_UnoApi__add_idlfile,$(1),$(gb_UnoApiTarget_REG_$(1))/$(2)/$(idl)))
commit 3b3aa78ac338da0736c25476bc0ef6f686ac2d94
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jan 20 18:34:45 2014 +0100

    gbuild: UnoApi: fix header rebuilds when cppumaker changes
    
    There needs to be a dependency from the header on cppumaker, because
    headers do get rebuilt in this case and it's possible that the content
    chnaged; unfortunately it's not possible to tell whether the content
    of the headers actually did change, all of them will be touched which
    will result in a large rebuild.
    
    Change-Id: I78ae0631ba9197ca3d3edbd010319b77a6f01074

diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index dbce2d4..ca1fbf7 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -176,28 +176,34 @@ $(call gb_UnoApiHeadersTarget_get_comprehensive_target,$(1)) : UNOAPI_DEPS :=
 # need dummy recipes so that header files are delivered in Package_inc;
 # otherwise make will consider the header to be up-to-date because it was
 # actually built by the recipe for gb_UnoApiHeadersTarget_get_target
-$(call gb_UnoApiHeadersTarget_get_real_dir,$(1))/%.hdl :| \
-		$(call gb_UnoApiHeadersTarget_get_real_target,$(1))
+$(call gb_UnoApiHeadersTarget_get_real_dir,$(1))/%.hdl : \
+		$(call gb_Executable_get_target_for_build,cppumaker) \
+		| $(call gb_UnoApiHeadersTarget_get_real_target,$(1))
 	touch $$@
 
-$(call gb_UnoApiHeadersTarget_get_real_dir,$(1))/%.hpp :| \
-		$(call gb_UnoApiHeadersTarget_get_real_target,$(1))
+$(call gb_UnoApiHeadersTarget_get_real_dir,$(1))/%.hpp : \
+		$(call gb_Executable_get_target_for_build,cppumaker) \
+		| $(call gb_UnoApiHeadersTarget_get_real_target,$(1))
 	touch $$@
 
-$(call gb_UnoApiHeadersTarget_get_real_bootstrap_dir,$(1))/%.hdl :| \
-		$(call gb_UnoApiHeadersTarget_get_real_bootstrap_target,$(1))
+$(call gb_UnoApiHeadersTarget_get_real_bootstrap_dir,$(1))/%.hdl : \
+		$(call gb_Executable_get_target_for_build,cppumaker) \
+		| $(call gb_UnoApiHeadersTarget_get_real_bootstrap_target,$(1))
 	touch $$@
 
-$(call gb_UnoApiHeadersTarget_get_real_bootstrap_dir,$(1))/%.hpp :| \
-		$(call gb_UnoApiHeadersTarget_get_real_bootstrap_target,$(1))
+$(call gb_UnoApiHeadersTarget_get_real_bootstrap_dir,$(1))/%.hpp : \
+		$(call gb_Executable_get_target_for_build,cppumaker) \
+		| $(call gb_UnoApiHeadersTarget_get_real_bootstrap_target,$(1))
 	touch $$@
 
-$(call gb_UnoApiHeadersTarget_get_real_comprehensive_dir,$(1))/%.hdl :| \
-		$(call gb_UnoApiHeadersTarget_get_real_comprehensive_target,$(1))
+$(call gb_UnoApiHeadersTarget_get_real_comprehensive_dir,$(1))/%.hdl : \
+		$(call gb_Executable_get_target_for_build,cppumaker) \
+		| $(call gb_UnoApiHeadersTarget_get_real_comprehensive_target,$(1))
 	touch $$@
 
-$(call gb_UnoApiHeadersTarget_get_real_comprehensive_dir,$(1))/%.hpp :| \
-		$(call gb_UnoApiHeadersTarget_get_real_comprehensive_target,$(1))
+$(call gb_UnoApiHeadersTarget_get_real_comprehensive_dir,$(1))/%.hpp : \
+		$(call gb_Executable_get_target_for_build,cppumaker) \
+		| $(call gb_UnoApiHeadersTarget_get_real_comprehensive_target,$(1))
 	touch $$@
 
 endef
commit 0190a70e79efa437e1516e635f4f670d7a35bb2d
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

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