]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix ecpg test building process to not generate *.dSYM junk on Macs.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 20 Oct 2010 04:55:15 +0000 (00:55 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 20 Oct 2010 04:55:15 +0000 (00:55 -0400)
The trick is to not try to build executables directly from .c files,
but to always build the intermediate .o files.  For obscure reasons,
Darwin's version of gcc will leave debug cruft behind in the first
case but not the second.  Per complaint from Robert Haas.

src/interfaces/ecpg/test/Makefile.regress

index c5e017e74a99785867d4d9aa89663e14f684e4b5..a130482d29e949d6dfa3f512363f9a3bd84c8158 100644 (file)
@@ -8,11 +8,11 @@ override LIBS := -lecpg -lpgtypes $(libpq) $(LIBS) $(PTHREAD_LIBS)
 ECPG = ../../preproc/ecpg -I$(srcdir)/../../include
 
 %: %.c
-       $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) $(LIBS) -o $@
+       $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $*.o
+       $(CC) $(CPPFLAGS) $(CFLAGS) $*.o $(LDFLAGS) $(LIBS) -o $@
 
 %.c: %.pgc ../regression.h
        $(ECPG) -o $@ -I$(srcdir) $<
 
 clean:
        rm -f $(TESTS) $(TESTS:%=%.o) $(TESTS:%=%.c)
-