Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit69e9768

Browse files
committed
ecpg: Improve test building
Further improve on commitc75e143.Instead of building both .o files and binaries in the same make rule,just rely on the normal .c -> .o rule. This will ensure thatdependency tracking is used when enabled. To do this, disable theimplicit direct .c -> binary rule globally, which will also preventthe original problem (*.dSYM junk) from reappearing elsewhere.
1 parent0ed7445 commit69e9768

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
ifndefPGXS
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)

[8]ページ先頭

©2009-2025 Movatter.jp