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

Commit585f16d

Browse files
committed
Unlink static libraries before rebuilding them.
When the library already exists in the build directory, "ar" preservesmembers not named on its command line. This mattered when, for example,a "configure" rerun dropped a file from $(LIBOBJS). libpgport carriedthe obsolete member until "make clean". Back-patch to 9.0 (allsupported versions).
1 parent1b55878 commit585f16d

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

‎src/Makefile.shlib

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ all-shared-lib: $(shlib)
316316

317317
ifndef haslibarule
318318
$(stlib): $(OBJS) | $(SHLIB_PREREQS)
319+
rm -f $@
319320
$(LINK.static) $@ $^
320321
$(RANLIB) $@
321322
endif #haslibarule
@@ -357,6 +358,7 @@ else # PORTNAME == aix
357358

358359
# AIX case
359360
$(shlib) $(stlib): $(OBJS) | $(SHLIB_PREREQS)
361+
rm -f $(stlib)
360362
$(LINK.static) $(stlib) $^
361363
$(RANLIB) $(stlib)
362364
$(MKLDEXPORT) $(stlib) >$(exports_file)
@@ -377,6 +379,7 @@ $(shlib): $(OBJS) | $(SHLIB_PREREQS)
377379
$(CC) $(CFLAGS) -shared -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) $(LDAP_LIBS_BE)
378380

379381
$(stlib): $(OBJS) | $(SHLIB_PREREQS)
382+
rm -f $@
380383
$(LINK.static) $@ $^
381384
$(RANLIB) $@
382385

‎src/common/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,15 @@ uninstall:
4242
rm -f'$(DESTDIR)$(libdir)/libpgcommon.a'
4343

4444
libpgcommon.a:$(OBJS_FRONTEND)
45+
rm -f$@
4546
$(AR)$(AROPT)$@$^
4647

4748
#
4849
# Server versions of object files
4950
#
5051

5152
libpgcommon_srv.a:$(OBJS_SRV)
53+
rm -f$@
5254
$(AR)$(AROPT)$@$^
5355

5456
# Because this uses its own compilation rule, it doesn't use the

‎src/port/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ uninstall:
5252
rm -f'$(DESTDIR)$(libdir)/libpgport.a'
5353

5454
libpgport.a:$(OBJS)
55+
rm -f$@
5556
$(AR)$(AROPT)$@$^
5657

5758
# thread.o needs PTHREAD_CFLAGS (but thread_srv.o does not)
@@ -62,6 +63,7 @@ thread.o: CFLAGS+=$(PTHREAD_CFLAGS)
6263
#
6364

6465
libpgport_srv.a:$(OBJS_SRV)
66+
rm -f$@
6567
$(AR)$(AROPT)$@$^
6668

6769
# Because this uses its own compilation rule, it doesn't use the

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp