Skip to content

Commit eb5226e

Browse files
committed
Fix assorted issues with build and install paths containing spaces.
Apparently there is no buildfarm critter exercising this case after all, because it fails in several places. With this patch, build, install, check-world, and installcheck-world pass for me on OS X.
1 parent 440a528 commit eb5226e

File tree

8 files changed

+17
-15
lines changed

8 files changed

+17
-15
lines changed

config/mkinstalldirs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,15 @@ esac
105105

106106
for file
107107
do
108-
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
108+
# pathcomp starts with leading slash if present, else empty
109+
pathcomp=`echo "$file" | sed -ne 's|^\(.\).*$|\1|;s|[^/]||;p'`
110+
# swap spaces and slashes, then split on spaces
111+
set fnord `echo "$file" | tr ' /' '/ '`
109112
shift
110113

111-
pathcomp=
112114
for d
113115
do
114-
pathcomp="$pathcomp$d"
116+
pathcomp="$pathcomp"`echo "$d" | tr '/' ' '`
115117
case $pathcomp in
116118
-*) pathcomp=./$pathcomp ;;
117119
esac

src/Makefile.shlib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ ifeq ($(PORTNAME), darwin)
107107
ifeq ($(DLTYPE), library)
108108
# linkable library
109109
DLSUFFIX = .dylib
110-
LINK.shared = $(COMPILER) -dynamiclib -install_name $(libdir)/lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX) $(version_link) $(exported_symbols_list) -multiply_defined suppress
110+
LINK.shared = $(COMPILER) -dynamiclib -install_name "$(libdir)/lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)" $(version_link) $(exported_symbols_list) -multiply_defined suppress
111111
else
112112
# loadable module (default case)
113113
DLSUFFIX = .so

src/interfaces/ecpg/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ checktcp: all
9595
./pg_regress --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check --temp-port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) $(THREAD) --schedule=$(srcdir)/ecpg_schedule_tcp --create-role=connectuser,connectdb --host=localhost
9696

9797
installcheck: all
98-
./pg_regress --psqldir=$(PSQLDIR) --dbname=regress1,connectdb --top-builddir=$(top_builddir) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) $(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb
98+
./pg_regress --psqldir="$(PSQLDIR)" --dbname=regress1,connectdb --top-builddir=$(top_builddir) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) $(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb

src/makefiles/pgxs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ endif
255255

256256
# against installed postmaster
257257
installcheck: submake
258-
$(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
258+
$(top_builddir)/src/test/regress/pg_regress --psqldir="$(PSQLDIR)" $(REGRESS_OPTS) $(REGRESS)
259259

260260
# in-tree test doesn't work yet (no way to install my shared library)
261261
#check: all submake

src/pl/plperl/GNUmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ uninstall:
103103
rm -f '$(DESTDIR)$(pkglibdir)/plperl$(DLSUFFIX)'
104104

105105
installcheck: submake
106-
$(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
106+
$(top_builddir)/src/test/regress/pg_regress --psqldir="$(PSQLDIR)" $(REGRESS_OPTS) $(REGRESS)
107107

108108
.PHONY: submake
109109
submake:

src/pl/plpython/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ uninstall:
105105
rm -f '$(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)'
106106

107107
installcheck: submake
108-
$(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
108+
$(top_builddir)/src/test/regress/pg_regress --psqldir="$(PSQLDIR)" $(REGRESS_OPTS) $(REGRESS)
109109

110110
.PHONY: submake
111111
submake:

src/pl/tcl/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ uninstall:
9292
$(MAKE) -C modules $@
9393

9494
installcheck: submake
95-
$(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
95+
$(top_builddir)/src/test/regress/pg_regress --psqldir="$(PSQLDIR)" $(REGRESS_OPTS) $(REGRESS)
9696

9797
.PHONY: submake
9898
submake:

src/test/regress/GNUmakefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ ofile_list := $(subst .source,, $(notdir $(wildcard $(top_srcdir)/$(subdir)/outp
9898
output_files := $(foreach file, $(ofile_list), expected/$(file).out)
9999

100100
ifneq ($(PORTNAME),win32)
101-
abs_srcdir := $(shell cd $(srcdir) && pwd)
101+
abs_srcdir := $(shell cd "$(srcdir)" && pwd)
102102
abs_builddir := $(shell pwd)
103103
else
104104
abs_srcdir := $(shell cd $(srcdir) && pwd -W)
@@ -141,13 +141,13 @@ tablespace-setup:
141141
##
142142

143143
check: all
144-
./pg_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --srcdir=$(abs_srcdir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) $(TEMP_CONF)
144+
./pg_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --srcdir="$(abs_srcdir)" --temp-port=$(TEMP_PORT) --schedule="$(srcdir)"/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) $(TEMP_CONF)
145145

146146
installcheck: all
147-
./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule --srcdir=$(abs_srcdir) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
147+
./pg_regress --psqldir="$(PSQLDIR)" --schedule="$(srcdir)"/serial_schedule --srcdir="$(abs_srcdir)" --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
148148

149149
installcheck-parallel: all
150-
./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/parallel_schedule --srcdir=$(abs_srcdir) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
150+
./pg_regress --psqldir="$(PSQLDIR)" --schedule="$(srcdir)"/parallel_schedule --srcdir="$(abs_srcdir)" --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
151151

152152

153153
# old interfaces follow...
@@ -157,10 +157,10 @@ runtest: installcheck
157157
runtest-parallel: installcheck-parallel
158158

159159
bigtest: all
160-
./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule --srcdir=$(abs_srcdir) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) numeric_big
160+
./pg_regress --psqldir="$(PSQLDIR)" --schedule="$(srcdir)"/serial_schedule --srcdir="$(abs_srcdir)" --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) numeric_big
161161

162162
bigcheck: all
163-
./pg_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --srcdir=$(abs_srcdir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) numeric_big
163+
./pg_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --srcdir="$(abs_srcdir)" --temp-port=$(TEMP_PORT) --schedule="$(srcdir)"/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) numeric_big
164164

165165

166166
##

0 commit comments

Comments
 (0)