aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.global.in6
-rw-r--r--src/interfaces/ecpg/test/Makefile.regress5
2 files changed, 8 insertions, 3 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 3bf658d6b0c..26b2d5e4a9b 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -515,6 +515,12 @@ TAS = @TAS@
%.bz2: %
$(BZIP2) -c $< >$@
+# Direct builds of foo.c -> foo are disabled to avoid generating
+# *.dSYM junk on Macs. All builds should normally go through the
+# foo.c -> foo.o -> foo steps. This also ensures that dependency
+# tracking (see below) is used.
+%: %.c
+
ifndef PGXS
# Remake Makefile.global from Makefile.global.in if the latter
diff --git a/src/interfaces/ecpg/test/Makefile.regress b/src/interfaces/ecpg/test/Makefile.regress
index b2417081ee0..edfece07df6 100644
--- a/src/interfaces/ecpg/test/Makefile.regress
+++ b/src/interfaces/ecpg/test/Makefile.regress
@@ -7,9 +7,8 @@ override LIBS := -lecpg -lpgtypes $(filter -l%, $(libpq)) $(LIBS) $(PTHREAD_LIBS
ECPG = ../../preproc/ecpg --regression -I$(srcdir)/../../include
-%: %.c
- $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $*.o
- $(CC) $(CPPFLAGS) $(CFLAGS) $*.o $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
+%: %.o
+ $(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
%.c: %.pgc ../regression.h
$(ECPG) -o $@ -I$(srcdir) $<