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


On 29.09.2011 15:54, Matúš Kukan wrote:
Hi Peter

On 25 September 2011 01:05, Peter Foley <pefoley2@verizon.net> wrote:
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.

Maybe you have already solved this but in case it could be helpful I'm
sending something that should more or less work.
See attached.

I think gd_Deliver is only for $(OUTDIR) so it can't be used in this case.
And maybe you want to use cp --foo, I'm not sure about proper parameters.

Main part:

+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)) : PACKAGEFILES += $(2)
+$(call gb_Jar_get_target,$(1)) : $(call gb_Jar_get_workdir,$(1))/$(2)
+$(call gb_Jar_get_workdir,$(1))/$(2) : $(3) $(call
gb_JavaClassSet_get_target,$(call gb_Jar_get_classsetname,$(1)))
+       cp $(3) $$@
+
+endef

i think this should indeed work.

i've looked at the jar manpage a bit and it could be possible to get rid
of the temporary copy to the workdir: jar apparently supports giving
multiple "-C dir" options, each only valid until the next one overrides
it, so the files can be in different directories; but i guess there are
only a handful of such files so the copying shouldn't be much of a problem
(now if only we could get rid of delivering c++ headers, that would be a
win...).

regards,
 michael


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.