]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix assorted issues with build and install paths containing spaces.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Jun 2011 20:39:47 +0000 (16:39 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 14 Jun 2011 20:39:47 +0000 (16:39 -0400)
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.

config/mkinstalldirs
src/Makefile.shlib
src/makefiles/pgxs.mk
src/pl/plperl/GNUmakefile
src/pl/plpython/Makefile
src/pl/tcl/Makefile
src/test/regress/GNUmakefile

index 070b418022b7b4d5323b008964845cf3de1ba502..d7b533bccefaa7c8954b8bb02f76daa83d09ab79 100755 (executable)
@@ -105,13 +105,15 @@ esac
 
 for file
 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
 
-  pathcomp=
   for d
   do
-    pathcomp="$pathcomp$d"
+    pathcomp="$pathcomp"`echo "$d" | tr '/' ' '`
     case $pathcomp in
       -*) pathcomp=./$pathcomp ;;
     esac
index 10cc94a488813c8d1059977740538d2fff3726cb..1de8838a4fea36cb71ea0457bf898b0a3dfccf23 100644 (file)
@@ -107,7 +107,7 @@ ifeq ($(PORTNAME), darwin)
   ifeq ($(DLTYPE), library)
     # linkable library
     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
     # loadable module (default case)
     DLSUFFIX           := .so
index 607201caaf84c029f2383ca010cc345d21fc9f76..a825fe6e11188234cdc396bcf3454d1543ab3865 100644 (file)
@@ -238,7 +238,7 @@ endif
 
 # against installed postmaster
 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)
 #check: all submake
index 2da437d470ebf15536ded8f58bb5d7c46b432acb..fed7508ad8c6ed048a75b5acb85eb8898108fa55 100644 (file)
@@ -103,7 +103,7 @@ uninstall:
        rm -f '$(DESTDIR)$(pkglibdir)/plperl$(DLSUFFIX)'
 
 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
 submake:
index 9d02f4d7f41007ba169c21a902b17ad68d4c2afd..c51659863941ef1580599e34a1cc9bebe141bf96 100644 (file)
@@ -105,7 +105,7 @@ uninstall:
        rm -f '$(DESTDIR)$(pkglibdir)/plpython$(DLSUFFIX)'
 
 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
 submake:
index 6fc6cc272ffa8c26dbe9465dddb5c654adb1a15a..29905d0266c373eef99d5c2c50bfe8696563cbc8 100644 (file)
@@ -92,7 +92,7 @@ uninstall:
        $(MAKE) -C modules $@
 
 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
 submake:
index d126ae5fa40e8944e8b7c679dd7e2cad4ea39999..e1553fcf607565263451765fbca3ced95bd91964 100644 (file)
@@ -92,7 +92,7 @@ output_files := $(foreach file, $(file_list), expected/$(file).out)
 all: $(input_files) $(output_files)
 
 ifneq ($(PORTNAME),win32)
-abs_srcdir := $(shell cd $(srcdir) && pwd)
+abs_srcdir := $(shell cd "$(srcdir)" && pwd)
 abs_builddir := $(shell pwd)
 else
 abs_srcdir := $(shell cd $(srcdir) && sh -c "pwd -W")
@@ -148,17 +148,17 @@ all-spi:
 check: all
        -rm -rf ./testtablespace
        mkdir ./testtablespace
-       ./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)
+       ./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)
 
 installcheck: all
        -rm -rf ./testtablespace
        mkdir ./testtablespace
-       ./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
+       ./pg_regress --psqldir="$(PSQLDIR)" --schedule="$(srcdir)"/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
 
 installcheck-parallel: all
        -rm -rf ./testtablespace
        mkdir ./testtablespace
-       ./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
+       ./pg_regress --psqldir="$(PSQLDIR)" --schedule="$(srcdir)"/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
 
 
 # old interfaces follow...
@@ -168,10 +168,10 @@ runtest: installcheck
 runtest-parallel: installcheck-parallel
 
 bigtest:
-       ./pg_regress --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) numeric_big 
+       ./pg_regress --psqldir="$(PSQLDIR)" --schedule="$(srcdir)"/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) numeric_big 
 
 bigcheck:
-       ./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
+       ./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
 
 
 ##