Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b09c248

Browse files
committed
Fix PGXS conventions so that extensions can be built against Postgres
installations whose pg_config program does not appear first in the PATH. Per gripe from Eddie Stanley and subsequent discussions with Fabien Coelho and others.
1 parent 80f3b5a commit b09c248

File tree

38 files changed

+144
-78
lines changed

38 files changed

+144
-78
lines changed

contrib/adminpack/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/adminpack/Makefile,v 1.4 2007/02/09 17:03:59 petere Exp $
1+
# $PostgreSQL: pgsql/contrib/adminpack/Makefile,v 1.5 2007/06/26 22:05:01 tgl Exp $
22

33
MODULE_big = adminpack
44
PG_CPPFLAGS = -I$(libpq_srcdir)
@@ -8,7 +8,8 @@ DOCS = README.adminpack
88
OBJS = adminpack.o
99

1010
ifdef USE_PGXS
11-
PGXS := $(shell pg_config --pgxs)
11+
PG_CONFIG = pg_config
12+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1213
include $(PGXS)
1314
else
1415
subdir = contrib/adminpack

contrib/btree_gist/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/btree_gist/Makefile,v 1.10 2007/02/09 17:03:59 petere Exp $
1+
# $PostgreSQL: pgsql/contrib/btree_gist/Makefile,v 1.11 2007/06/26 22:05:01 tgl Exp $
22

33
MODULE_big = btree_gist
44

@@ -15,7 +15,8 @@ REGRESS = init int2 int4 int8 float4 float8 cash oid timestamp timestamptz t
1515
date interval macaddr inet cidr text varchar char bytea bit varbit numeric
1616

1717
ifdef USE_PGXS
18-
PGXS := $(shell pg_config --pgxs)
18+
PG_CONFIG = pg_config
19+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1920
include $(PGXS)
2021
else
2122
subdir = contrib/btree_gist

contrib/chkpass/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/chkpass/Makefile,v 1.8 2006/02/27 12:54:38 petere Exp $
1+
# $PostgreSQL: pgsql/contrib/chkpass/Makefile,v 1.9 2007/06/26 22:05:01 tgl Exp $
22

33
MODULE_big = chkpass
44
OBJS = chkpass.o
@@ -8,7 +8,8 @@ DATA = uninstall_chkpass.sql
88
DOCS = README.chkpass
99

1010
ifdef USE_PGXS
11-
PGXS := $(shell pg_config --pgxs)
11+
PG_CONFIG = pg_config
12+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1213
include $(PGXS)
1314
else
1415
subdir = contrib/chkpass

contrib/cube/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/cube/Makefile,v 1.19 2007/02/09 17:24:33 petere Exp $
1+
# $PostgreSQL: pgsql/contrib/cube/Makefile,v 1.20 2007/06/26 22:05:01 tgl Exp $
22

33
MODULE_big = cube
44
OBJS= cube.o cubeparse.o
@@ -13,7 +13,8 @@ EXTRA_CLEAN = y.tab.c y.tab.h
1313
SHLIB_LINK += $(filter -lm, $(LIBS))
1414

1515
ifdef USE_PGXS
16-
PGXS := $(shell pg_config --pgxs)
16+
PG_CONFIG = pg_config
17+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1718
include $(PGXS)
1819
else
1920
subdir = contrib/cube

contrib/dblink/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/dblink/Makefile,v 1.13 2006/09/10 22:07:02 tgl Exp $
1+
# $PostgreSQL: pgsql/contrib/dblink/Makefile,v 1.14 2007/06/26 22:05:01 tgl Exp $
22

33
MODULE_big = dblink
44
PG_CPPFLAGS = -I$(libpq_srcdir)
@@ -12,7 +12,8 @@ REGRESS = dblink
1212

1313

1414
ifdef USE_PGXS
15-
PGXS := $(shell pg_config --pgxs)
15+
PG_CONFIG = pg_config
16+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1617
include $(PGXS)
1718
else
1819
subdir = contrib/dblink

contrib/earthdistance/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/earthdistance/Makefile,v 1.17 2006/02/27 12:54:38 petere Exp $
1+
# $PostgreSQL: pgsql/contrib/earthdistance/Makefile,v 1.18 2007/06/26 22:05:02 tgl Exp $
22

33
MODULES = earthdistance
44
DATA_built = earthdistance.sql
@@ -9,7 +9,8 @@ REGRESS = earthdistance
99
SHLIB_LINK += $(filter -lm, $(LIBS))
1010

1111
ifdef USE_PGXS
12-
PGXS := $(shell pg_config --pgxs)
12+
PG_CONFIG = pg_config
13+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1314
include $(PGXS)
1415
else
1516
subdir = contrib/earthdistance

contrib/fuzzystrmatch/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/fuzzystrmatch/Makefile,v 1.8 2006/10/19 17:40:03 tgl Exp $
1+
# $PostgreSQL: pgsql/contrib/fuzzystrmatch/Makefile,v 1.9 2007/06/26 22:05:02 tgl Exp $
22

33
MODULE_big = fuzzystrmatch
44
OBJS = fuzzystrmatch.o dmetaphone.o
@@ -7,7 +7,8 @@ DATA = uninstall_fuzzystrmatch.sql
77
DOCS = README.fuzzystrmatch README.soundex
88

99
ifdef USE_PGXS
10-
PGXS := $(shell pg_config --pgxs)
10+
PG_CONFIG = pg_config
11+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1112
include $(PGXS)
1213
else
1314
subdir = contrib/fuzzystrmatch

contrib/intagg/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
# Makefile for integer aggregator
33
# Copyright (C) 2001 Digital Music Network.
44
# by Mark L. Woodward
5-
# $PostgreSQL: pgsql/contrib/intagg/Makefile,v 1.7 2006/02/27 12:54:39 petere Exp $
5+
# $PostgreSQL: pgsql/contrib/intagg/Makefile,v 1.8 2007/06/26 22:05:02 tgl Exp $
66

77
MODULES = int_aggregate
88
DATA_built = int_aggregate.sql
99
DATA = uninstall_int_aggregate.sql
1010
DOCS = README.int_aggregate
1111

1212
ifdef USE_PGXS
13-
PGXS := $(shell pg_config --pgxs)
13+
PG_CONFIG = pg_config
14+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1415
include $(PGXS)
1516
else
1617
subdir = contrib/intagg

contrib/intarray/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/intarray/Makefile,v 1.14 2006/05/03 16:31:07 teodor Exp $
1+
# $PostgreSQL: pgsql/contrib/intarray/Makefile,v 1.15 2007/06/26 22:05:02 tgl Exp $
22

33
MODULE_big = _int
44
OBJS = _int_bool.o _int_gist.o _int_op.o _int_tool.o _intbig_gist.o _int_gin.o
@@ -8,7 +8,8 @@ DOCS = README.intarray
88
REGRESS = _int
99

1010
ifdef USE_PGXS
11-
PGXS := $(shell pg_config --pgxs)
11+
PG_CONFIG = pg_config
12+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1213
include $(PGXS)
1314
else
1415
subdir = contrib/intarray

contrib/isn/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# $PostgreSQL: pgsql/contrib/isn/Makefile,v 1.1 2006/09/09 04:07:52 tgl Exp $
1+
# $PostgreSQL: pgsql/contrib/isn/Makefile,v 1.2 2007/06/26 22:05:02 tgl Exp $
22

33
MODULES = isn
44
DATA_built = isn.sql
55
DATA = uninstall_isn.sql
66
DOCS = README.isn
77

88
ifdef USE_PGXS
9-
PGXS = $(shell pg_config --pgxs)
9+
PG_CONFIG = pg_config
10+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1011
include $(PGXS)
1112
else
1213
subdir = contrib/isn

contrib/lo/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# $PostgreSQL: pgsql/contrib/lo/Makefile,v 1.15 2006/09/11 15:14:46 tgl Exp $
1+
# $PostgreSQL: pgsql/contrib/lo/Makefile,v 1.16 2007/06/26 22:05:02 tgl Exp $
22

33
MODULES = lo
44
DATA_built = lo.sql
55
DATA = uninstall_lo.sql
66
DOCS = README.lo
77

88
ifdef USE_PGXS
9-
PGXS := $(shell pg_config --pgxs)
9+
PG_CONFIG = pg_config
10+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1011
include $(PGXS)
1112
else
1213
subdir = contrib/lo

contrib/ltree/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/ltree/Makefile,v 1.6 2007/02/09 17:04:00 petere Exp $
1+
# $PostgreSQL: pgsql/contrib/ltree/Makefile,v 1.7 2007/06/26 22:05:02 tgl Exp $
22

33
PG_CPPFLAGS = -DLOWER_NODE
44
MODULE_big = ltree
@@ -10,7 +10,8 @@ DOCS = README.ltree
1010
REGRESS = ltree
1111

1212
ifdef USE_PGXS
13-
PGXS := $(shell pg_config --pgxs)
13+
PG_CONFIG = pg_config
14+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1415
include $(PGXS)
1516
else
1617
subdir = contrib/ltree

contrib/oid2name/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/oid2name/Makefile,v 1.8 2005/09/27 17:13:06 tgl Exp $
1+
# $PostgreSQL: pgsql/contrib/oid2name/Makefile,v 1.9 2007/06/26 22:05:02 tgl Exp $
22

33
PROGRAM = oid2name
44
OBJS = oid2name.o
@@ -9,7 +9,8 @@ PG_LIBS = $(libpq_pgport)
99
DOCS = README.oid2name
1010

1111
ifdef USE_PGXS
12-
PGXS := $(shell pg_config --pgxs)
12+
PG_CONFIG = pg_config
13+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1314
include $(PGXS)
1415
else
1516
subdir = contrib/oid2name

contrib/pageinspect/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# pageinspect Makefile
44
#
5-
# $PostgreSQL: pgsql/contrib/pageinspect/Makefile,v 1.1 2007/05/17 19:11:24 momjian Exp $
5+
# $PostgreSQL: pgsql/contrib/pageinspect/Makefile,v 1.2 2007/06/26 22:05:02 tgl Exp $
66
#
77
#-------------------------------------------------------------------------
88

@@ -13,7 +13,8 @@ DATA_built = pageinspect.sql
1313
DATA = uninstall_pageinspect.sql
1414

1515
ifdef USE_PGXS
16-
PGXS := $(shell pg_config --pgxs)
16+
PG_CONFIG = pg_config
17+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1718
include $(PGXS)
1819
else
1920
subdir = contrib/pageinspect

contrib/pg_buffercache/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/pg_buffercache/Makefile,v 1.3 2006/02/27 12:54:39 petere Exp $
1+
# $PostgreSQL: pgsql/contrib/pg_buffercache/Makefile,v 1.4 2007/06/26 22:05:02 tgl Exp $
22

33
MODULE_big = pg_buffercache
44
OBJS = pg_buffercache_pages.o
@@ -8,7 +8,8 @@ DATA = uninstall_pg_buffercache.sql
88
DOCS = README.pg_buffercache
99

1010
ifdef USE_PGXS
11-
PGXS := $(shell pg_config --pgxs)
11+
PG_CONFIG = pg_config
12+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1213
include $(PGXS)
1314
else
1415
subdir = contrib/pg_buffercache

contrib/pg_freespacemap/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/pg_freespacemap/Makefile,v 1.2 2006/09/30 18:15:48 tgl Exp $
1+
# $PostgreSQL: pgsql/contrib/pg_freespacemap/Makefile,v 1.3 2007/06/26 22:05:02 tgl Exp $
22

33
MODULE_big = pg_freespacemap
44
OBJS = pg_freespacemap.o
@@ -8,7 +8,8 @@ DATA = uninstall_pg_freespacemap.sql
88
DOCS = README.pg_freespacemap
99

1010
ifdef USE_PGXS
11-
PGXS := $(shell pg_config --pgxs)
11+
PG_CONFIG = pg_config
12+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1213
include $(PGXS)
1314
else
1415
subdir = contrib/pg_freespacemap

contrib/pg_standby/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/pg_standby/Makefile,v 1.2 2007/02/09 17:04:00 petere Exp $
1+
# $PostgreSQL: pgsql/contrib/pg_standby/Makefile,v 1.3 2007/06/26 22:05:02 tgl Exp $
22

33
PROGRAM = pg_standby
44
OBJS = pg_standby.o
@@ -9,7 +9,8 @@ PG_LIBS = $(libpq_pgport)
99
DOCS = README.pg_standby
1010

1111
ifdef USE_PGXS
12-
PGXS := $(shell pg_config --pgxs)
12+
PG_CONFIG = pg_config
13+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1314
include $(PGXS)
1415
else
1516
subdir = contrib/pg_standby

contrib/pg_standby/pg_standby.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
* Current maintainer: Simon Riggs
2020
*/
2121
#include "postgres_fe.h"
22-
#include "pg_config_manual.h"
2322

2423
#include <ctype.h>
2524
#include <dirent.h>

contrib/pg_trgm/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/pg_trgm/Makefile,v 1.7 2007/03/14 14:15:40 teodor Exp $
1+
# $PostgreSQL: pgsql/contrib/pg_trgm/Makefile,v 1.8 2007/06/26 22:05:02 tgl Exp $
22

33
MODULE_big = pg_trgm
44
OBJS = trgm_op.o trgm_gist.o trgm_gin.o
@@ -10,7 +10,8 @@ REGRESS = pg_trgm
1010

1111

1212
ifdef USE_PGXS
13-
PGXS := $(shell pg_config --pgxs)
13+
PG_CONFIG = pg_config
14+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1415
include $(PGXS)
1516
else
1617
subdir = contrib/pg_trgm

contrib/pgbench/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/pgbench/Makefile,v 1.14 2005/09/27 17:13:08 tgl Exp $
1+
# $PostgreSQL: pgsql/contrib/pgbench/Makefile,v 1.15 2007/06/26 22:05:03 tgl Exp $
22

33
PROGRAM = pgbench
44
OBJS = pgbench.o
@@ -9,7 +9,8 @@ PG_LIBS = $(libpq_pgport)
99
DOCS = README.pgbench README.pgbench_jis
1010

1111
ifdef USE_PGXS
12-
PGXS := $(shell pg_config --pgxs)
12+
PG_CONFIG = pg_config
13+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1314
include $(PGXS)
1415
else
1516
subdir = contrib/pgbench

contrib/pgcrypto/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# $PostgreSQL: pgsql/contrib/pgcrypto/Makefile,v 1.25 2007/01/14 20:55:14 alvherre Exp $
2+
# $PostgreSQL: pgsql/contrib/pgcrypto/Makefile,v 1.26 2007/06/26 22:05:03 tgl Exp $
33
#
44

55
INT_SRCS = md5.c sha1.c sha2.c internal.c internal-sha2.c blf.c rijndael.c \
@@ -39,7 +39,8 @@ REGRESS = init md5 sha1 hmac-md5 hmac-sha1 blowfish rijndael \
3939

4040

4141
ifdef USE_PGXS
42-
PGXS := $(shell pg_config --pgxs)
42+
PG_CONFIG = pg_config
43+
PGXS := $(shell $(PG_CONFIG) --pgxs)
4344
include $(PGXS)
4445
else
4546
subdir = contrib/pgcrypto

contrib/pgrowlocks/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# pgrowlocks Makefile
44
#
5-
# $PostgreSQL: pgsql/contrib/pgrowlocks/Makefile,v 1.3 2006/10/19 17:40:03 tgl Exp $
5+
# $PostgreSQL: pgsql/contrib/pgrowlocks/Makefile,v 1.4 2007/06/26 22:05:03 tgl Exp $
66
#
77
#-------------------------------------------------------------------------
88

@@ -13,7 +13,8 @@ DATA_built = pgrowlocks.sql
1313
DATA = uninstall_pgrowlocks.sql
1414

1515
ifdef USE_PGXS
16-
PGXS = $(shell pg_config --pgxs)
16+
PG_CONFIG = pg_config
17+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1718
include $(PGXS)
1819
else
1920
subdir = contrib/pgrowlocks

contrib/pgstattuple/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# pgstattuple Makefile
44
#
5-
# $PostgreSQL: pgsql/contrib/pgstattuple/Makefile,v 1.7 2006/10/19 17:40:03 tgl Exp $
5+
# $PostgreSQL: pgsql/contrib/pgstattuple/Makefile,v 1.8 2007/06/26 22:05:03 tgl Exp $
66
#
77
#-------------------------------------------------------------------------
88

@@ -13,7 +13,8 @@ DATA_built = pgstattuple.sql
1313
DATA = uninstall_pgstattuple.sql
1414

1515
ifdef USE_PGXS
16-
PGXS := $(shell pg_config --pgxs)
16+
PG_CONFIG = pg_config
17+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1718
include $(PGXS)
1819
else
1920
subdir = contrib/pgstattuple

contrib/seg/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/seg/Makefile,v 1.18 2007/02/09 17:24:33 petere Exp $
1+
# $PostgreSQL: pgsql/contrib/seg/Makefile,v 1.19 2007/06/26 22:05:03 tgl Exp $
22

33
MODULE_big = seg
44
OBJS = seg.o segparse.o
@@ -10,7 +10,8 @@ REGRESS = seg
1010
EXTRA_CLEAN = y.tab.c y.tab.h
1111

1212
ifdef USE_PGXS
13-
PGXS := $(shell pg_config --pgxs)
13+
PG_CONFIG = pg_config
14+
PGXS := $(shell $(PG_CONFIG) --pgxs)
1415
include $(PGXS)
1516
else
1617
subdir = contrib/seg

0 commit comments

Comments
 (0)