Skip to content

Commit 1f5e6cd

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 8f1eaf8 commit 1f5e6cd

File tree

7 files changed

+16
-14
lines changed

7 files changed

+16
-14
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/makefiles/pgxs.mk

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

239239
# against installed postmaster
240240
installcheck: submake
241-
$(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
241+
$(top_builddir)/src/test/regress/pg_regress --psqldir="$(PSQLDIR)" $(REGRESS_OPTS) $(REGRESS)
242242

243243
# in-tree test doesn't work yet (no way to install my shared library)
244244
#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
@@ -92,7 +92,7 @@ output_files := $(foreach file, $(file_list), expected/$(file).out)
9292
all: $(input_files) $(output_files)
9393

9494
ifneq ($(PORTNAME),win32)
95-
abs_srcdir := $(shell cd $(srcdir) && pwd)
95+
abs_srcdir := $(shell cd "$(srcdir)" && pwd)
9696
abs_builddir := $(shell pwd)
9797
else
9898
abs_srcdir := $(shell cd $(srcdir) && sh -c "pwd -W")
@@ -148,17 +148,17 @@ all-spi:
148148
check: all
149149
-rm -rf ./testtablespace
150150
mkdir ./testtablespace
151-
./pg_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
151+
./pg_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule="$(srcdir)"/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
152152

153153
installcheck: all
154154
-rm -rf ./testtablespace
155155
mkdir ./testtablespace
156-
./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
156+
./pg_regress --psqldir="$(PSQLDIR)" --schedule="$(srcdir)"/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
157157

158158
installcheck-parallel: all
159159
-rm -rf ./testtablespace
160160
mkdir ./testtablespace
161-
./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
161+
./pg_regress --psqldir="$(PSQLDIR)" --schedule="$(srcdir)"/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
162162

163163

164164
# old interfaces follow...
@@ -168,10 +168,10 @@ runtest: installcheck
168168
runtest-parallel: installcheck-parallel
169169

170170
bigtest:
171-
./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) numeric_big
171+
./pg_regress --psqldir="$(PSQLDIR)" --schedule="$(srcdir)"/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) numeric_big
172172

173173
bigcheck:
174-
./pg_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) numeric_big
174+
./pg_regress --temp-install=./tmp_check --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule="$(srcdir)"/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE) numeric_big
175175

176176

177177
##

0 commit comments

Comments
 (0)