mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-15 08:20:16 +08: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:
parent
0ed7445d73
commit
69e9768e7b
@ -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
|
||||
|
@ -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) $<
|
||||
|
Loading…
Reference in New Issue
Block a user