1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-09 22:41:56 +03:00

ecpg: Improve test building

Further improve on commit c75e143646.
Instead of building both .o files and binaries in the same make rule,
just rely on the normal .c -> .o rule.  This will ensure that
dependency tracking is used when enabled.  To do this, disable the
implicit direct .c -> binary rule globally, which will also prevent
the original problem (*.dSYM junk) from reappearing elsewhere.
This commit is contained in:
Peter Eisentraut
2012-02-02 20:24:38 +02:00
parent 0ed7445d73
commit 69e9768e7b
2 changed files with 8 additions and 3 deletions

View File

@ -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) $<