[Libreoffice] gbuild question
Peter Foley
pefoley2 at verizon.net
Sat Sep 24 16:05:42 PDT 2011
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
More information about the LibreOffice
mailing list