Hi,

I'd really like to have this done.
We need few libraries with version number.. like libuno_sal.so.3
Probably this is not problem for Windows?
Until now, it's not possible to do so in gbuild.

I have just come up with patch below.
(But probably we want to do this in completely different way)
I'd appreciate any help or direction which way to go.

Use with $(eval $(call gb_Library_Library,salhelper,3))
The first part with Clean probably does nothing.

But then.. there could be another problems with versions. I'll write
another mail about this.

diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index db6d961..31319d2 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -46,13 +46,15 @@
 $(WORKDIR)/Clean/OutDir/lib/%$(gb_Library_PLAINEXT) :
        $(call gb_Helper_abbreviate_dirs,\
                rm -f $(OUTDIR)/lib/$*$(gb_Library_PLAINEXT) \
-                       $(AUXTARGETS))
+                       $(if $(VERSION),rm -f
$(OUTDIR)/lib/$*$(gb_Library_PLAINEXT).$(VERSION)) \
+                               $(AUXTARGETS))

 # EVIL: gb_StaticLibrary and gb_Library need the same deliver rule
because they are indistinguishable on windows
 $(gb_Library_OUTDIRLOCATION)/%$(gb_Library_PLAINEXT) :
        $(call gb_Helper_abbreviate_dirs,\
                $(call gb_Deliver_deliver,$<,$@) \
-                       $(foreach target,$(AUXTARGETS), && $(call
gb_Deliver_deliver,$(dir $<)/$(notdir $(target)),$(target))))
+                       $(if $(VERSION),&& mv $@ $@.$(VERSION) && cd
$(dir $@) && ln -sf $(notdir $@).$(VERSION) $(notdir $@)) \
+                               $(foreach target,$(AUXTARGETS), &&
$(call gb_Deliver_deliver,$(dir $<)/$(notdir $(target)),$(target))))

 define gb_Library_Library
 ifeq (,$$(findstring $(1),$$(gb_Library_KNOWNLIBS)))
@@ -60,6 +62,7 @@ $$(eval $$(call gb_Output_info,Currently known
libraries are: $(sort $(gb_Librar
 $$(eval $$(call gb_Output_error,Library $(1) must be registered in
Repository.mk))
 endif
 $(call gb_Library_get_target,$(1)) : AUXTARGETS :=
+$(call gb_Library_get_target,$(1)) : VERSION := $(2)
 $(call gb_Library__Library_impl,$(1),$(call
gb_Library_get_linktargetname,$(1)))
 $(call gb_Library_add_default_nativeres,$(1),default)

Thanks,

Matúš
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to