summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-04-07 12:08:19 +0200
committerDavid Tardon <dtardon@redhat.com>2012-05-29 07:24:55 +0200
commitc199ce6d62c91d72eb7a038efea504b6de644406 (patch)
tree8507239beed26c2e60dea18a1ee30795d03bc10e /solenv
parent9b530e1a1eab7f33873952512d73aea02ac6b275 (diff)
allow to set extra (global) schema root
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/Configuration.mk15
1 files changed, 15 insertions, 0 deletions
diff --git a/solenv/gbuild/Configuration.mk b/solenv/gbuild/Configuration.mk
index bbe388445289..b6f51c910fc4 100644
--- a/solenv/gbuild/Configuration.mk
+++ b/solenv/gbuild/Configuration.mk
@@ -78,6 +78,7 @@ $(call gb_Helper_abbreviate_dirs,\
--noout \
--stringparam componentName $(subst /,.,$(basename $(XCSFILE))) \
--stringparam root $(subst $(XCSFILE),,$(3)) \
+ $(if $(SCHEMA_ROOT),--stringparam schemaRoot $(SCHEMA_ROOT)) \
$(gb_XcsTarget_XSLT_SchemaVal) \
$(3) && \
$(gb_XSLTPROC) --nonet \
@@ -348,6 +349,9 @@ $(foreach lang,$(gb_Configuration_LANGS),$(eval \
$(foreach lang,$(gb_Configuration_LANGS),$(eval \
$(call gb_Configuration_get_clean_target,$(1)) : \
$(call gb_Zip_get_clean_target,$(1)_$(lang))))
+
+$(call gb_Configuration_get_target,$(1)) : SCHEMA_ROOT :=
+
$$(eval $$(call gb_Module_register_target,$(call gb_Configuration_get_target,$(1)),$(call gb_Configuration_get_clean_target,$(1))))
endef
@@ -493,4 +497,15 @@ $(foreach xcu,$(3),$(call gb_Configuration_add_localized_data,$(1),$(2),$(xcu)))
endef
+# Set extra registry this configuration can use schemas from.
+#
+# Example:
+# # foo needs schemas from the main configuration
+# $(eval $(call gb_Configuration_use_configuration,foo,officecfg))
+define gb_Configuration_use_configuration
+$(call gb_Configuration_get_target,$(1)) : $(call gb_Configuration_get_target,$(2))
+$(call gb_Configuration_get_target,$(1)) : SCHEMA_ROOT := $(gb_Configuration_registry)/schema
+
+endef
+
# vim: set noet sw=4 ts=4: