Skip to content

Commit ed0e292

Browse files
committed
Clean up dependencies for version.o.
This avoids the useless rebuild of pg_version that used to happen on each build or install pass.
1 parent 22cab26 commit ed0e292

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/bin/pg_version/Makefile.in

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
#-------------------------------------------------------------------------
22
#
3-
# Makefile.inc--
3+
# Makefile.in--
44
# Makefile for bin/pg_version
55
#
6-
# Copyright (c) 1994, Regents of the University of California
7-
#
6+
# Portions Copyright (c) 1996-2000, PostgreSQL, Inc
7+
# Portions Copyright (c) 1994, Regents of the University of California
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/Makefile.in,v 1.6 1999/01/17 06:19:14 momjian Exp $
10+
# $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/Makefile.in,v 1.7 2000/02/27 01:33:43 tgl Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

1414
SRCDIR= ../..
15-
include ../../Makefile.global
16-
17-
OBJS= pg_version.o ../../utils/version.o @STRERROR2@
15+
include $(SRCDIR)/Makefile.global
1816

1917
CFLAGS+= -I$(SRCDIR)/include
2018

19+
OBJS= pg_version.o $(SRCDIR)/utils/version.o @STRERROR2@
20+
2121
all: pg_version
2222

23-
pg_version: submake $(OBJS)
23+
pg_version: $(OBJS)
2424
$(CC) -o pg_version $(OBJS) $(LDFLAGS)
2525

26-
.PHONY: submake
27-
submake:
28-
$(MAKE) -C ../../utils version.o
26+
$(SRCDIR)/utils/version.o: $(SRCDIR)/utils/version.c $(SRCDIR)/include/version.h
27+
$(MAKE) -C $(SRCDIR)/utils version.o
2928

3029
install: pg_version
3130
$(INSTALL) $(INSTL_EXE_OPTS) pg_version$(X) $(BINDIR)/pg_version$(X)

0 commit comments

Comments
 (0)