summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-04-16 17:48:57 +0200
committerDavid Tardon <dtardon@redhat.com>2013-04-16 17:57:17 +0200
commit28709dc607dc8738f5048429940b3f3232d52e12 (patch)
tree86b7c567a6a9f684834eb8cae30c71a330c07141 /solenv
parent1268326e814837e111eaf320f72661f288393839 (diff)
add spec. handling for xcu files to gb_Dictionary
The xcu files can either come directly from $(SRCDIR) or be generated, depending on whether the build is with or without langs. This distinction did not matter while Dictionary was using ExtensionTarget for its impl., becuase there the file was just copied to the ExtensionTarget's root dir. Now that Dictionary uses Package internally, it is necessary to know where the file comes from to put it into the right package, either the one for $(SRCDIR) or the one for $(WORKDIR). (Yes, it would be possible to use just one Package with base dir /, but I consider this ugly.) Change-Id: I4549923287abc968f1c042b809db06d688b4c573
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/Dictionary.mk24
1 files changed, 24 insertions, 0 deletions
diff --git a/solenv/gbuild/Dictionary.mk b/solenv/gbuild/Dictionary.mk
index a59ba5adf422..9184b8987bac 100644
--- a/solenv/gbuild/Dictionary.mk
+++ b/solenv/gbuild/Dictionary.mk
@@ -371,4 +371,28 @@ $(foreach propertyfile,$(3),$(call gb_Dictionary_add_propertyfile,$(1),$(2)/$(no
endef
+# Add a configuration file to the dictionary.
+#
+# HACK: The xcu file might come from $(WORKDIR), if we are building with
+# langs (because it is localized then), or from $(SRCDIR), if we are
+# not. So we must handle it specially.
+#
+# gb_Dictionary_add_xcufile dictionary destfile xcufile
+define gb_Dictionary_add_xcufile
+ifeq ($(gb_WITH_LANG),)
+$(call gb_Dictionary_add_file,$(1),$(2),$(3))
+else
+$(call gb_Dictionary_add_generated_file,$(1),$(2),$(call gb_XcuMergeTarget_get_target,$(3)))
+endif
+
+endef
+
+# Add several configuration file to the dictionary at once.
+#
+# gb_Dictionary_add_xcufiles dictionary destdir xcufile(s)
+define gb_Dictionary_add_xcufiles
+$(foreach xcufile,$(3),$(call gb_Dictionary_add_xcufile,$(1),$(2)/$(notdir $(xcufile)),$(xcufile)))
+
+endef
+
# vim: set noet sw=4 ts=4: