Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7bf29f6

Browse files
committed
Generate a full set of version-numbered symlinks when building
a shared library, not just when installing it.
1 parent9b0e205 commit7bf29f6

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

‎src/Makefile.shlib

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1998, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.10 1999/05/19 18:04:51 momjian Exp $
9+
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.11 1999/06/30 23:54:18 tgl Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -190,16 +190,28 @@ endif
190190

191191
ifneq ($(shlib),)
192192
ifneq ($(PORTNAME), win)
193+
193194
$(shlib): $(OBJS)
194195
$(LD) $(LDFLAGS_SL) -o $@ $(OBJS) $(SHLIB_LINK)
196+
if [ "$(shlib)" != "lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)" ]; then \
197+
rm -f lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION); \
198+
$(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION); \
199+
fi
200+
if [ "$(shlib)" != "lib$(NAME)$(DLSUFFIX)" ]; then \
201+
rm -f lib$(NAME)$(DLSUFFIX); \
202+
$(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX); \
203+
fi
204+
195205
else
206+
196207
$(shlib) lib$(NAME).a: $(OBJS) $(SRCDIR)/utils/dllinit.o
197208
$(DLLTOOL) --export-all --output-def $(NAME).def $(OBJS)
198209
$(DLLWRAP) -o $(shlib) --dllname $(shlib) --def $(NAME).def $(OBJS) $(SRCDIR)/utils/dllinit.o $(DLLINIT) $(SHLIB_LINK)
199210
$(DLLTOOL) --dllname $(shlib) --def $(NAME).def --output-lib lib$(NAME).a
200211

201212
$(SRCDIR)/utils/dllinit.o: $(SRCDIR)/utils/dllinit.c
202213
$(MAKE) -C $(SRCDIR)/utils dllinit.o
214+
203215
endif
204216
endif
205217

@@ -224,3 +236,10 @@ ifneq ($(PORTNAME), win)
224236
$(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX); \
225237
fi
226238
endif
239+
240+
# Rule to delete shared library during "make clean"
241+
242+
.PHONY: clean-shlib
243+
244+
clean-shlib:
245+
rm -f $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) lib$(NAME)$(DLSUFFIX)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp