Skip to content

Commit 6423a8e

Browse files
committed
Fix contrib/rserv to install successfully when built outside source tree.
(Not that it will actually work with 7.3, I fear.)
1 parent c87867f commit 6423a8e

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

contrib/contrib-global.mk

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Header: /cvsroot/pgsql/contrib/contrib-global.mk,v 1.3 2002/09/05 18:28:45 petere Exp $
1+
# $Header: /cvsroot/pgsql/contrib/contrib-global.mk,v 1.4 2002/11/01 23:45:37 tgl Exp $
22

33
# This file contains generic rules to build many kinds of simple
44
# contrib modules. You only need to set a few variables and include
@@ -24,6 +24,8 @@
2424
# which need to be built first
2525
# DOCS -- random files to install under $PREFIX/doc/contrib
2626
# SCRIPTS -- script files (not binaries) to install into $PREFIX/bin
27+
# SCRIPTS_built -- script files (not binaries) to install into $PREFIX/bin,
28+
# which need to be built first
2729
# REGRESS -- list of regression test cases (without suffix)
2830
#
2931
# or at most one of these two:
@@ -52,7 +54,7 @@ ifdef PG_CPPFLAGS
5254
override CPPFLAGS := $(PG_CPPFLAGS) $(CPPFLAGS)
5355
endif
5456

55-
all: $(PROGRAM) $(DATA_built) $(addsuffix $(DLSUFFIX), $(MODULES))
57+
all: $(PROGRAM) $(DATA_built) $(SCRIPTS_built) $(addsuffix $(DLSUFFIX), $(MODULES))
5658

5759
ifdef MODULE_big
5860
# shared library parameters
@@ -100,6 +102,12 @@ ifdef SCRIPTS
100102
$(INSTALL_SCRIPT) $$file $(DESTDIR)$(bindir); \
101103
done
102104
endif # SCRIPTS
105+
ifdef SCRIPTS_built
106+
@for file in $(SCRIPTS_built); do \
107+
echo "$(INSTALL_SCRIPT) $$file $(DESTDIR)$(bindir)"; \
108+
$(INSTALL_SCRIPT) $$file $(DESTDIR)$(bindir); \
109+
done
110+
endif # SCRIPTS_built
103111

104112

105113
installdirs:
@@ -112,7 +120,7 @@ endif
112120
ifdef DOCS
113121
$(mkinstalldirs) $(DESTDIR)$(docdir)/contrib
114122
endif
115-
ifneq (,$(PROGRAM)$(SCRIPTS))
123+
ifneq (,$(PROGRAM)$(SCRIPTS)$(SCRIPTS_built))
116124
$(mkinstalldirs) $(DESTDIR)$(bindir)
117125
endif
118126

@@ -136,6 +144,9 @@ endif
136144
ifdef SCRIPTS
137145
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(SCRIPTS))
138146
endif
147+
ifdef SCRIPTS_built
148+
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(SCRIPTS_built))
149+
endif
139150

140151

141152
clean:
@@ -145,6 +156,9 @@ endif
145156
ifdef DATA_built
146157
rm -f $(DATA_built)
147158
endif
159+
ifdef SCRIPTS_built
160+
rm -f $(SCRIPTS_built)
161+
endif
148162
ifdef PROGRAM
149163
rm -f $(PROGRAM)$(X)
150164
endif

contrib/rserv/Makefile

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,17 @@ DATA = RServ.pm
1111
DATA_built = master.sql slave.sql
1212
SQLS = $(DATA_built)
1313
DOCS = README.rserv
14-
SCRIPTS = RservTest
15-
SCRIPTS += MasterInit MasterAddTable Replicate MasterSync CleanLog
16-
SCRIPTS += SlaveInit SlaveAddTable GetSyncID
17-
SCRIPTS += PrepareSnapshot ApplySnapshot
18-
SCRIPTS += InitRservTest
19-
EXTRA_CLEAN = $(SCRIPTS)
14+
SCRIPTS_built = RservTest
15+
SCRIPTS_built += MasterInit MasterAddTable Replicate MasterSync CleanLog
16+
SCRIPTS_built += SlaveInit SlaveAddTable GetSyncID
17+
SCRIPTS_built += PrepareSnapshot ApplySnapshot
18+
SCRIPTS_built += InitRservTest
2019

21-
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
22-
override CFLAGS += $(CFLAGS_SL)
23-
SHLIB_LINK = $(BE_DLLLIBS)
24-
25-
26-
all: $(SCRIPTS) $(SQLS) $(addsuffix $(DLSUFFIX), $(MODULES))
2720

2821
$(SQLS): %.sql: %.sql.in
2922
sed 's,@MODULE_FILENAME@,$$libdir/$(NAME),g' $< >$@
3023

31-
$(SCRIPTS): %: %.in
24+
$(SCRIPTS_built): %: %.in
3225
sed -e 's,@MODULE_FILENAME@,$$libdir/$(NAME),g' \
3326
-e 's:@SQLDIR@:$(datadir)/contrib:g' \
3427
-e 's:@BINDIR@:$(bindir):g' \

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