Commit 7bf29f6b authored by Tom Lane's avatar Tom Lane

Generate a full set of version-numbered symlinks when building

a shared library, not just when installing it.
parent 9b0e2057
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Copyright (c) 1998, Regents of the University of California # Copyright (c) 1998, Regents of the University of California
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.10 1999/05/19 18:04:51 momjian Exp $ # $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.11 1999/06/30 23:54:18 tgl Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -190,9 +190,20 @@ endif ...@@ -190,9 +190,20 @@ endif
ifneq ($(shlib),) ifneq ($(shlib),)
ifneq ($(PORTNAME), win) ifneq ($(PORTNAME), win)
$(shlib): $(OBJS) $(shlib): $(OBJS)
$(LD) $(LDFLAGS_SL) -o $@ $(OBJS) $(SHLIB_LINK) $(LD) $(LDFLAGS_SL) -o $@ $(OBJS) $(SHLIB_LINK)
if [ "$(shlib)" != "lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)" ]; then \
rm -f lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION); \
$(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION); \
fi
if [ "$(shlib)" != "lib$(NAME)$(DLSUFFIX)" ]; then \
rm -f lib$(NAME)$(DLSUFFIX); \
$(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX); \
fi
else else
$(shlib) lib$(NAME).a: $(OBJS) $(SRCDIR)/utils/dllinit.o $(shlib) lib$(NAME).a: $(OBJS) $(SRCDIR)/utils/dllinit.o
$(DLLTOOL) --export-all --output-def $(NAME).def $(OBJS) $(DLLTOOL) --export-all --output-def $(NAME).def $(OBJS)
$(DLLWRAP) -o $(shlib) --dllname $(shlib) --def $(NAME).def $(OBJS) $(SRCDIR)/utils/dllinit.o $(DLLINIT) $(SHLIB_LINK) $(DLLWRAP) -o $(shlib) --dllname $(shlib) --def $(NAME).def $(OBJS) $(SRCDIR)/utils/dllinit.o $(DLLINIT) $(SHLIB_LINK)
...@@ -200,6 +211,7 @@ $(shlib) lib$(NAME).a: $(OBJS) $(SRCDIR)/utils/dllinit.o ...@@ -200,6 +211,7 @@ $(shlib) lib$(NAME).a: $(OBJS) $(SRCDIR)/utils/dllinit.o
$(SRCDIR)/utils/dllinit.o: $(SRCDIR)/utils/dllinit.c $(SRCDIR)/utils/dllinit.o: $(SRCDIR)/utils/dllinit.c
$(MAKE) -C $(SRCDIR)/utils dllinit.o $(MAKE) -C $(SRCDIR)/utils dllinit.o
endif endif
endif endif
...@@ -224,3 +236,10 @@ ifneq ($(PORTNAME), win) ...@@ -224,3 +236,10 @@ ifneq ($(PORTNAME), win)
$(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX); \ $(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX); \
fi fi
endif endif
# Rule to delete shared library during "make clean"
.PHONY: clean-shlib
clean-shlib:
rm -f $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) lib$(NAME)$(DLSUFFIX)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment