mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
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.
This commit is contained in:
@ -105,13 +105,15 @@ esac
|
|||||||
|
|
||||||
for file
|
for file
|
||||||
do
|
do
|
||||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
# pathcomp starts with leading slash if present, else empty
|
||||||
|
pathcomp=`echo "$file" | sed -ne 's|^\(.\).*$|\1|;s|[^/]||;p'`
|
||||||
|
# swap spaces and slashes, then split on spaces
|
||||||
|
set fnord `echo "$file" | tr ' /' '/ '`
|
||||||
shift
|
shift
|
||||||
|
|
||||||
pathcomp=
|
|
||||||
for d
|
for d
|
||||||
do
|
do
|
||||||
pathcomp="$pathcomp$d"
|
pathcomp="$pathcomp"`echo "$d" | tr '/' ' '`
|
||||||
case $pathcomp in
|
case $pathcomp in
|
||||||
-*) pathcomp=./$pathcomp ;;
|
-*) pathcomp=./$pathcomp ;;
|
||||||
esac
|
esac
|
||||||
|
@ -107,7 +107,7 @@ ifeq ($(PORTNAME), darwin)
|
|||||||
ifeq ($(DLTYPE), library)
|
ifeq ($(DLTYPE), library)
|
||||||
# linkable library
|
# linkable library
|
||||||
DLSUFFIX = .dylib
|
DLSUFFIX = .dylib
|
||||||
LINK.shared = $(COMPILER) -dynamiclib -install_name $(libdir)/lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX) $(version_link) $(exported_symbols_list) -multiply_defined suppress
|
LINK.shared = $(COMPILER) -dynamiclib -install_name "$(libdir)/lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)" $(version_link) $(exported_symbols_list) -multiply_defined suppress
|
||||||
else
|
else
|
||||||
# loadable module (default case)
|
# loadable module (default case)
|
||||||
DLSUFFIX = .so
|
DLSUFFIX = .so
|
||||||
|
@ -95,4 +95,4 @@ checktcp: all
|
|||||||
./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
|
./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
|
||||||
|
|
||||||
installcheck: all
|
installcheck: all
|
||||||
./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
|
./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
|
||||||
|
@ -255,7 +255,7 @@ endif
|
|||||||
|
|
||||||
# against installed postmaster
|
# against installed postmaster
|
||||||
installcheck: submake
|
installcheck: submake
|
||||||
$(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
|
$(top_builddir)/src/test/regress/pg_regress --psqldir="$(PSQLDIR)" $(REGRESS_OPTS) $(REGRESS)
|
||||||
|
|
||||||
# in-tree test doesn't work yet (no way to install my shared library)
|
# in-tree test doesn't work yet (no way to install my shared library)
|
||||||
#check: all submake
|
#check: all submake
|
||||||
|
@ -103,7 +103,7 @@ uninstall:
|
|||||||
rm -f '$(DESTDIR)$(pkglibdir)/plperl$(DLSUFFIX)'
|
rm -f '$(DESTDIR)$(pkglibdir)/plperl$(DLSUFFIX)'
|
||||||
|
|
||||||
installcheck: submake
|
installcheck: submake
|
||||||
$(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
|
$(top_builddir)/src/test/regress/pg_regress --psqldir="$(PSQLDIR)" $(REGRESS_OPTS) $(REGRESS)
|
||||||
|
|
||||||
.PHONY: submake
|
.PHONY: submake
|
||||||
submake:
|
submake:
|
||||||
|
@ -105,7 +105,7 @@ uninstall:
|
|||||||
rm -f '$(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)'
|
rm -f '$(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)'
|
||||||
|
|
||||||
installcheck: submake
|
installcheck: submake
|
||||||
$(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
|
$(top_builddir)/src/test/regress/pg_regress --psqldir="$(PSQLDIR)" $(REGRESS_OPTS) $(REGRESS)
|
||||||
|
|
||||||
.PHONY: submake
|
.PHONY: submake
|
||||||
submake:
|
submake:
|
||||||
|
@ -92,7 +92,7 @@ uninstall:
|
|||||||
$(MAKE) -C modules $@
|
$(MAKE) -C modules $@
|
||||||
|
|
||||||
installcheck: submake
|
installcheck: submake
|
||||||
$(top_builddir)/src/test/regress/pg_regress --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
|
$(top_builddir)/src/test/regress/pg_regress --psqldir="$(PSQLDIR)" $(REGRESS_OPTS) $(REGRESS)
|
||||||
|
|
||||||
.PHONY: submake
|
.PHONY: submake
|
||||||
submake:
|
submake:
|
||||||
|
@ -98,7 +98,7 @@ ofile_list := $(subst .source,, $(notdir $(wildcard $(top_srcdir)/$(subdir)/outp
|
|||||||
output_files := $(foreach file, $(ofile_list), expected/$(file).out)
|
output_files := $(foreach file, $(ofile_list), expected/$(file).out)
|
||||||
|
|
||||||
ifneq ($(PORTNAME),win32)
|
ifneq ($(PORTNAME),win32)
|
||||||
abs_srcdir := $(shell cd $(srcdir) && pwd)
|
abs_srcdir := $(shell cd "$(srcdir)" && pwd)
|
||||||
abs_builddir := $(shell pwd)
|
abs_builddir := $(shell pwd)
|
||||||
else
|
else
|
||||||
abs_srcdir := $(shell cd $(srcdir) && pwd -W)
|
abs_srcdir := $(shell cd $(srcdir) && pwd -W)
|
||||||
@ -141,13 +141,13 @@ tablespace-setup:
|
|||||||
##
|
##
|
||||||
|
|
||||||
check: all
|
check: all
|
||||||
./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)
|
./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)
|
||||||
|
|
||||||
installcheck: all
|
installcheck: all
|
||||||
./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule --srcdir=$(abs_srcdir) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
|
./pg_regress --psqldir="$(PSQLDIR)" --schedule="$(srcdir)"/serial_schedule --srcdir="$(abs_srcdir)" --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
|
||||||
|
|
||||||
installcheck-parallel: all
|
installcheck-parallel: all
|
||||||
./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/parallel_schedule --srcdir=$(abs_srcdir) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
|
./pg_regress --psqldir="$(PSQLDIR)" --schedule="$(srcdir)"/parallel_schedule --srcdir="$(abs_srcdir)" --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
|
||||||
|
|
||||||
|
|
||||||
# old interfaces follow...
|
# old interfaces follow...
|
||||||
@ -157,10 +157,10 @@ runtest: installcheck
|
|||||||
runtest-parallel: installcheck-parallel
|
runtest-parallel: installcheck-parallel
|
||||||
|
|
||||||
bigtest: all
|
bigtest: all
|
||||||
./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule --srcdir=$(abs_srcdir) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) numeric_big
|
./pg_regress --psqldir="$(PSQLDIR)" --schedule="$(srcdir)"/serial_schedule --srcdir="$(abs_srcdir)" --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) numeric_big
|
||||||
|
|
||||||
bigcheck: all
|
bigcheck: all
|
||||||
./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
|
./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
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
|
Reference in New Issue
Block a user