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

Commit3810c23

Browse files
committed
Adjust src/tutorial Makefile so that it can use pgxs. This allows the
tutorial to be used without necessarily having a configured source tree.
1 parentc06b31d commit3810c23

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

‎src/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/src/Makefile,v 1.35 2004/10/06 08:49:59 momjian Exp $
7+
# $PostgreSQL: pgsql/src/Makefile,v 1.36 2005/01/13 18:23:21 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -53,7 +53,7 @@ clean:
5353
$(MAKE) -C pl$@
5454
$(MAKE) -C makefiles$@
5555
$(MAKE) -Ctest$@
56-
$(MAKE) -C tutorial$@
56+
$(MAKE) -C tutorialNO_PGXS=1$@
5757
$(MAKE) -C utils$@
5858
$(MAKE) -C tools/thread$@
5959

@@ -67,7 +67,7 @@ distclean maintainer-clean:
6767
-$(MAKE) -C pl$@
6868
-$(MAKE) -C makefiles$@
6969
-$(MAKE) -Ctest$@
70-
-$(MAKE) -C tutorial$@
70+
-$(MAKE) -C tutorialNO_PGXS=1$@
7171
-$(MAKE) -C utils$@
7272
-$(MAKE) -C tools/thread$@
7373
rm -f Makefile.port Makefile.global

‎src/tutorial/Makefile

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,32 @@
33
# Makefile--
44
# Makefile for tutorial
55
#
6+
# By default, this builds against an existing PostgreSQL installation
7+
# (the one identified by whichever pg_config is first in your path).
8+
# Within a configured source tree, you can say "gmake NO_PGXS=1 all"
9+
# to build using the surrounding source tree.
10+
#
611
# IDENTIFICATION
7-
# $PostgreSQL: pgsql/src/tutorial/Makefile,v 1.17 2003/11/29 19:52:14 pgsql Exp $
12+
# $PostgreSQL: pgsql/src/tutorial/Makefile,v 1.18 2005/01/13 18:23:22 tgl Exp $
813
#
914
#-------------------------------------------------------------------------
1015

11-
subdir = src/tutorial
12-
top_builddir = ../..
13-
include$(top_builddir)/src/Makefile.global
16+
MODULES = complex funcs
17+
DATA_built = advanced.sql basics.sql complex.sql funcs.sql syscat.sql
1418

15-
overrideCFLAGS+=$(CFLAGS_SL)
1619
SHLIB_LINK =$(BE_DLLLIBS)
1720

18-
#
19-
# DLOBJS are the dynamically-loaded object files. The "funcs" queries
20-
# include CREATE FUNCTIONs that load routines from these files.
21-
#
22-
DLOBJS= complex$(DLSUFFIX) funcs$(DLSUFFIX)
23-
24-
QUERIES= advanced.sql basics.sql complex.sql funcs.sql syscat.sql
25-
26-
all:$(DLOBJS)$(QUERIES)
21+
ifdefNO_PGXS
22+
subdir = src/tutorial
23+
top_builddir = ../..
24+
include$(top_builddir)/src/Makefile.global
25+
include$(top_srcdir)/src/makefiles/pgxs.mk
26+
else
27+
PGXS =$(shell pg_config --pgxs)
28+
include$(PGXS)
29+
endif
2730

2831
%.sql:%.source
2932
rm -f$@;\
3033
C=`pwd`;\
3134
sed -e"s:_OBJWD_:$$C:g"<$<>$@
32-
33-
cleandistcleanmaintainer-clean:
34-
rm -f$(DLOBJS)$(QUERIES)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp