summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNoah Misch2015-03-01 18:05:23 +0000
committerNoah Misch2015-03-01 18:06:33 +0000
commit22dd465d34f55b5a5b1790a5b5582fef9558d84b (patch)
treea13389929ea9f5f2a1959c7af668cfad400ebd96 /src/common
parentfdacbf9e89267a3c3eb382b285bdb724ad5c6e44 (diff)
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).
Diffstat (limited to 'src/common')
-rw-r--r--src/common/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/Makefile b/src/common/Makefile
index e5c345d7def..d99ed4bada4 100644
--- a/src/common/Makefile
+++ b/src/common/Makefile
@@ -42,6 +42,7 @@ uninstall:
rm -f '$(DESTDIR)$(libdir)/libpgcommon.a'
libpgcommon.a: $(OBJS_FRONTEND)
+ rm -f $@
$(AR) $(AROPT) $@ $^
#
@@ -49,6 +50,7 @@ libpgcommon.a: $(OBJS_FRONTEND)
#
libpgcommon_srv.a: $(OBJS_SRV)
+ rm -f $@
$(AR) $(AROPT) $@ $^
# Because this uses its own compilation rule, it doesn't use the