diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2012-05-08 20:08:53 +0300 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2012-05-08 20:10:50 +0300 |
commit | 3420b241a7dbad8e5fe62395054bf8596f33d143 (patch) | |
tree | 54ea51926f02f92fd50a77987d5dd4ddd1de72e2 | |
parent | dcb2c5838183d3d305dbf713d4519d094f835b2f (diff) |
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).
-rw-r--r-- | src/port/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/port/Makefile b/src/port/Makefile index 0225b397a30..bace576d803 100644 --- a/src/port/Makefile +++ b/src/port/Makefile @@ -62,7 +62,14 @@ thread.o: CFLAGS+=$(PTHREAD_CFLAGS) libpgport_srv.a: $(OBJS_SRV) $(AR) $(AROPT) $@ $^ -%_srv.o: %.c +# Because this uses its own compilation rule, it doesn'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). +%_srv.o: %.c %.o $(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@ $(OBJS_SRV): | submake-errcodes |