Skip to content

Commit 3420b24

Browse files
committed
Fix dependency tracking for src/port/%_srv.o files
Because they use their own compilation rule, they don't use the dependency tracking logic from Makefile.global. To make sure that dependency tracking works anyway for the *_srv.o files, depend on their *.o siblings as well, which do have proper dependencies. It's a hack that might fail someday if there is a *_srv.o without a corresponding *.o, but it works for now (and those would probably go into src/backend/port/ anyway).
1 parent dcb2c58 commit 3420b24

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/port/Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,14 @@ thread.o: CFLAGS+=$(PTHREAD_CFLAGS)
6262
libpgport_srv.a: $(OBJS_SRV)
6363
$(AR) $(AROPT) $@ $^
6464

65-
%_srv.o: %.c
65+
# Because this uses its own compilation rule, it doesn't use the
66+
# dependency tracking logic from Makefile.global. To make sure that
67+
# dependency tracking works anyway for the *_srv.o files, depend on
68+
# their *.o siblings as well, which do have proper dependencies. It's
69+
# a hack that might fail someday if there is a *_srv.o without a
70+
# corresponding *.o, but it works for now (and those would probably go
71+
# into src/backend/port/ anyway).
72+
%_srv.o: %.c %.o
6673
$(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@
6774

6875
$(OBJS_SRV): | submake-errcodes

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy