Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


While working on converting xmerge to gbuild I found that the current 
gbuild Jar.mk doesn't support adding non java files to the jar.
The xmerge jars need a component.xml file included in the jar.
I tried to implement file adding but couldn't get it to work. Help with 
implementing this would be greatly appreciated.
I've included my (non-working) attempt at implementing this and a 
usage example below.

Peter

$(eval $(call 
gb_Jar_add_file,pexcel,META-INF/converter.xml,$(SRCDIR)/xmerge/source/pexcel/converter.xml))

diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk
index b30bd3a..cdc7a17 100644
--- a/solenv/gbuild/Jar.mk
+++ b/solenv/gbuild/Jar.mk
@@ -98,6 +98,16 @@ define gb_Jar_set_packageroot
 $(call gb_Jar_get_target,$(1)) : PACKAGEROOTS := $(2)
 endef
 
+define gb_Jar_get_workdir
+$(call gb_JavaClassSet_get_classdir,$(call gb_Jar_get_classsetname,$(1)))
+endef
+
+define gb_Jar_add_file
+$(call gb_Jar_get_target,$(1)) : $(call gb_Jar_get_workdir,$(1))/$(2)
+$(call gb_Deliver_add_deliverable,$(call gb_Jar_get_workdir,$(1))/$(2),$(3),$(1))
+$(call gb_Jar_get_workdir,$(1))/$(2) : $(3)
+endef
+
 define gb_Jar_add_sourcefiles
 $(foreach sourcefile,$(2),$(call gb_Jar_add_sourcefile,$(1),$(sourcefile)))
 endef

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.