summaryrefslogtreecommitdiff
path: root/solenv/gbuild/UnoApiTarget.mk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-24 16:42:23 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-24 16:56:57 +0200
commitd995207e9705e66c6cb781bbb63fa79e362d8b29 (patch)
treec7c9da6e16b668287d19d34efa5350d1e6d736b5 /solenv/gbuild/UnoApiTarget.mk
parentf650b3a50c1490f3773003f5bcdf2fdebe0beb12 (diff)
Generate new format type rdb files
With the main components (theTypeDescriptionManager, codemakers) supporting the new unoidl format, it is time to switch the generated type rdb files to that new format. For now, this is done as a two-stage process, though: Every $(WORKDIR)/UnoApiTarget/*.rdb file in the new format is accompanied by an *.rdb.oldformat file; both are generated in the same [UNO] gbuild step. This is for several reasons: * idlc still generates old format output. * The regcompare step (comparing against a reference rdb to catch incompatible changes) is still based on the old format. (The reg2unoidl tool needs any dependend rdbs as additional inputs, that's why the use_api information needs to be tracked as UNOAPI_DEPRDBS for now. That can be removed again when reg2unoidl is no longer used.) Change-Id: Id625c88f9ecdbaba9e2af7410417e00b4ba36acc
Diffstat (limited to 'solenv/gbuild/UnoApiTarget.mk')
-rw-r--r--solenv/gbuild/UnoApiTarget.mk22
1 files changed, 17 insertions, 5 deletions
diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index 8beba2daa337..0cf7ff6cdfa9 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -85,15 +85,19 @@ endif
gb_UnoApiTarget_REGCOMPAREDEPS := $(call gb_Executable_get_runtime_dependencies,regcompare)
gb_UnoApiTarget_REGCOMPARECOMMAND := SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(call gb_Executable_get_command,regcompare)
-gb_UnoApiTarget_REGMERGEDEPS := $(call gb_Executable_get_runtime_dependencies,regmerge)
+gb_UnoApiTarget_REGMERGEDEPS := $(call gb_Executable_get_runtime_dependencies,regmerge) $(call gb_Executable_get_runtime_dependencies,reg2unoidl)
gb_UnoApiTarget_REGMERGECOMMAND := SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(call gb_Executable_get_command,regmerge)
gb_UnoApiTarget_TYPESRDB := $(call gb_UnoApiTarget_get_target,types)
define gb_UnoApiTarget__command_impl
-RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,$(1) $(2) $(3)) && \
+RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,$(1).oldformat $(2) $(3)) && \
$(gb_UnoApiTarget_REGMERGECOMMAND) @$${RESPONSEFILE} && \
-rm -f $${RESPONSEFILE}
+rm -f $${RESPONSEFILE} && \
+SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin \
+ $(call gb_Executable_get_command,reg2unoidl) \
+ $(foreach rdb,$(4),$(call gb_UnoApiTarget_get_target,$(rdb))) \
+ $(1).oldformat $(1)
endef
# first delete target rdb file to detect problems when removing IDL files
@@ -101,13 +105,13 @@ define gb_UnoApiTarget__command
$(call gb_Output_announce,$(2),$(true),UNO,4)
mkdir -p $(dir $(1)) && \
rm -f $(1) && \
-$(call gb_UnoApiTarget__command_impl,$(1),$(UNOAPI_ROOT),$(UNOAPI_FILES)) \
+$(call gb_UnoApiTarget__command_impl,$(1),$(UNOAPI_ROOT),$(UNOAPI_FILES),$(UNOAPI_DEPRDBS)) \
$(if $(UNOAPI_REFERENCE), \
$(call gb_Output_announce,$(2),$(true),DBc,3) \
&& $(gb_UnoApiTarget_REGCOMPARECOMMAND) \
-f -t \
-r1 $(UNOAPI_REFERENCE) \
- -r2 $(1))
+ -r2 $(1).oldformat)
endef
define gb_UnoApiTarget__check_mode
@@ -130,6 +134,7 @@ $(call gb_UnoApiTarget_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),UNO,4)
-$(call gb_Helper_abbreviate_dirs,\
rm -f $(call gb_UnoApiTarget_get_target,$*) \
+ $(call gb_UnoApiTarget_get_target,$*).oldformat \
$(call gb_UnoApiTarget_get_external_headers_target,$*) \
$(call gb_UnoApiTarget_get_headers_target,$*))
-rm -rf $(call gb_UnoApiTarget_get_dep_target,$*) \
@@ -160,6 +165,7 @@ $(call gb_UnoApiTarget_get_target,$(1)) : INCLUDE :=
$(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_FILES :=
$(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_REFERENCE :=
$(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_ROOT :=
+$(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_DEPRDBS :=
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_UnoApiTarget_get_dep_target,$(1)) : UNOAPI_IDLFILES :=
@@ -231,6 +237,12 @@ $(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_ROOT := $(2)
endef
+define gb_UnoApiTarget_use_api
+$(call gb_UnoApiTarget_get_target,$(1)) : UNOAPI_DEPRDBS += $(2)
+$(call gb_UnoApiTarget_get_target,$(1)) : $(call gb_UnoApiTarget_get_target,$(2))
+
+endef
+
# UnoApiHeadersTarget
# defined by platform