mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Unlink static libraries before rebuilding them.
When the library already exists in the build directory, "ar" preserves members not named on its command line. This mattered when, for example, a "configure" rerun dropped a file from $(LIBOBJS). libpgport carried the obsolete member until "make clean". Back-patch to 9.0 (all supported versions).
This commit is contained in:
@ -343,6 +343,7 @@ all-shared-lib: $(shlib)
|
|||||||
|
|
||||||
ifndef haslibarule
|
ifndef haslibarule
|
||||||
$(stlib): $(OBJS) | $(SHLIB_PREREQS)
|
$(stlib): $(OBJS) | $(SHLIB_PREREQS)
|
||||||
|
rm -f $@
|
||||||
$(LINK.static) $@ $^
|
$(LINK.static) $@ $^
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
endif #haslibarule
|
endif #haslibarule
|
||||||
@ -385,6 +386,7 @@ else # PORTNAME == aix
|
|||||||
|
|
||||||
# AIX case
|
# AIX case
|
||||||
$(shlib) $(stlib): $(OBJS) | $(SHLIB_PREREQS)
|
$(shlib) $(stlib): $(OBJS) | $(SHLIB_PREREQS)
|
||||||
|
rm -f $(stlib)
|
||||||
$(LINK.static) $(stlib) $^
|
$(LINK.static) $(stlib) $^
|
||||||
$(RANLIB) $(stlib)
|
$(RANLIB) $(stlib)
|
||||||
$(MKLDEXPORT) $(stlib) >$(exports_file)
|
$(MKLDEXPORT) $(stlib) >$(exports_file)
|
||||||
@ -405,6 +407,7 @@ $(shlib): $(OBJS) | $(SHLIB_PREREQS)
|
|||||||
$(CC) $(CFLAGS) -shared -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) $(LDAP_LIBS_BE)
|
$(CC) $(CFLAGS) -shared -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) $(LDAP_LIBS_BE)
|
||||||
|
|
||||||
$(stlib): $(OBJS) | $(SHLIB_PREREQS)
|
$(stlib): $(OBJS) | $(SHLIB_PREREQS)
|
||||||
|
rm -f $@
|
||||||
$(LINK.static) $@ $^
|
$(LINK.static) $@ $^
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@ uninstall:
|
|||||||
rm -f '$(DESTDIR)$(libdir)/libpgport.a'
|
rm -f '$(DESTDIR)$(libdir)/libpgport.a'
|
||||||
|
|
||||||
libpgport.a: $(OBJS)
|
libpgport.a: $(OBJS)
|
||||||
|
rm -f $@
|
||||||
$(AR) $(AROPT) $@ $^
|
$(AR) $(AROPT) $@ $^
|
||||||
|
|
||||||
# thread.o needs PTHREAD_CFLAGS (but thread_srv.o does not)
|
# thread.o needs PTHREAD_CFLAGS (but thread_srv.o does not)
|
||||||
@ -61,6 +62,7 @@ thread.o: thread.c
|
|||||||
#
|
#
|
||||||
|
|
||||||
libpgport_srv.a: $(OBJS_SRV)
|
libpgport_srv.a: $(OBJS_SRV)
|
||||||
|
rm -f $@
|
||||||
$(AR) $(AROPT) $@ $^
|
$(AR) $(AROPT) $@ $^
|
||||||
|
|
||||||
%_srv.o: %.c
|
%_srv.o: %.c
|
||||||
|
Reference in New Issue
Block a user