Skip to content

Commit 69e9768

Browse files
committed
ecpg: Improve test building
Further improve on commit c75e143. 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.
1 parent 0ed7445 commit 69e9768

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/Makefile.global.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,12 @@ TAS = @TAS@
515515
%.bz2: %
516516
$(BZIP2) -c $< >$@
517517

518+
# Direct builds of foo.c -> foo are disabled to avoid generating
519+
# *.dSYM junk on Macs. All builds should normally go through the
520+
# foo.c -> foo.o -> foo steps. This also ensures that dependency
521+
# tracking (see below) is used.
522+
%: %.c
523+
518524
ifndef PGXS
519525

520526
# Remake Makefile.global from Makefile.global.in if the latter

src/interfaces/ecpg/test/Makefile.regress

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ override LIBS := -lecpg -lpgtypes $(filter -l%, $(libpq)) $(LIBS) $(PTHREAD_LIBS
77

88
ECPG = ../../preproc/ecpg --regression -I$(srcdir)/../../include
99

10-
%: %.c
11-
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $*.o
12-
$(CC) $(CPPFLAGS) $(CFLAGS) $*.o $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
10+
%: %.o
11+
$(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
1312

1413
%.c: %.pgc ../regression.h
1514
$(ECPG) -o $@ -I$(srcdir) $<

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy