Use $(do-install-so) for installing shared objects.
authorroland <roland>
Sat, 16 Dec 1995 21:19:41 +0000 (21:19 +0000)
committerroland <roland>
Sat, 16 Dec 1995 21:19:41 +0000 (21:19 +0000)
(do-install-so): New canned sequence.  Make a symlink LIB.so after
installing LIB.so.VERSION.

Makerules

index 32dacce..530b1ac 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -482,14 +482,21 @@ install-lib-nosubdir: $(foreach so,$(install-lib.so),\
 
 install: $(slibdir)/libc.so$(libc.so-version)
 $(slibdir)/lib$(libprefix)c.so$(libc.so-version): $(common-objpfx)libc.so
-       $(do-install-program)
+       $(do-install-so)
+
+define do-install-so
+$(do-install-program)
+$(patsubst %,ln -s -f $(@F) $(@D)/$(patsubst %$*.so,%,$(<F))$(libprefix)$*.so,\
+          $(filter-out %.so,$@))
+endef
 
-$(foreach v,$(sort $(foreach so,$(install-lib.so),.so$($(so)-version))),\
+so-versions := $(sort $(foreach so,$(install-lib.so),.so$($(so)-version)))
+$(foreach v,$(so-versions),\
          $(libdir)/lib$(libprefix)%$v): $(common-objpfx)lib%.so
-       $(do-install-program)
-$(foreach v,$(sort $(foreach so,$(install-lib.so),.so$($(so)-version))),\
+       $(do-install-so)
+$(foreach v,$(so-versions),\
          $(libdir)/$(libprefix)%$v): $(common-objpfx)%.so
-       $(do-install-program)
+       $(do-install-so)
 endif
 
 ifdef install-bin