Fix assorted issues with build and install paths containing spaces.
authorTom Lane <[email protected]>
Tue, 14 Jun 2011 20:03:20 +0000 (16:03 -0400)
committerTom Lane <[email protected]>
Tue, 14 Jun 2011 20:03:20 +0000 (16:03 -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/interfaces/ecpg/test/Makefile
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 b4f46da00ac975efb0680adb8bdc751ae5be3a3f..169b93457d08af3c170bb393c06a4275a2026eb2 100644 (file)
@@ -135,7 +135,7 @@ ifeq ($(PORTNAME), darwin)
     ifneq ($(SO_MAJOR_VERSION), 0)
       version_link = -compatibility_version $(SO_MAJOR_VERSION) -current_version $(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
     endif
-    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
     shlib      = lib$(NAME).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)$(DLSUFFIX)
     shlib_major        = lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)
   else
index cc5090f58c1c847b0534100545bf0d233a20345f..2bf44e929c3033400672c99236da8a8338819d4a 100644 (file)
@@ -90,4 +90,4 @@ checktcp: all
    ./pg_regress  --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) $(THREAD) --schedule=$(srcdir)/ecpg_schedule_tcp --create-role=connectuser,connectdb --host=localhost
 
 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
index cf15d0d72a1f3e46756d95dd44db1c5c4c5b5c87..e52426685c8a6b9b4ccb14c1b5214f0aff1b358c 100644 (file)
@@ -257,7 +257,7 @@ endif
 
 # against installed postmaster
 installcheck: submake
-   $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
+   $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir="$(PSQLDIR)" $(REGRESS_OPTS) $(REGRESS)
 
 # in-tree test doesn't work yet (no way to install my shared library)
 #check: all submake
index 023fdde5bd66b747746ea63f1aa4e7fb1e61b6f9..ec9c6b4ff7d2ac6bcd347937a13e4da22125f171 100644 (file)
@@ -71,7 +71,7 @@ installdirs: installdirs-lib
 uninstall: uninstall-lib
 
 installcheck: submake
-   $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
+   $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir="$(PSQLDIR)" $(REGRESS_OPTS) $(REGRESS)
 
 .PHONY: submake
 submake:
index 4f6e22b83ba03f4b658d217e43455c0152df5cd0..651e23b9d9cfcc1162493d4643a8a097a3291894 100644 (file)
@@ -73,7 +73,7 @@ installdirs: installdirs-lib
 uninstall: uninstall-lib
 
 installcheck: submake
-   $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
+   $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir="$(PSQLDIR)" $(REGRESS_OPTS) $(REGRESS)
 
 .PHONY: submake
 submake:
index 1b71c7c23195767cec22037473af49522aef0f84..5d82e5fb5fac48d854f8144e488036a45950ae1c 100644 (file)
@@ -59,7 +59,7 @@ uninstall: uninstall-lib
    $(MAKE) -C modules $@
 
 installcheck: submake
-   $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
+   $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir="$(PSQLDIR)" $(REGRESS_OPTS) $(REGRESS)
 
 .PHONY: submake
 submake:
index 8fe55ee357713df7193706a05e233cfcfbb9a411..83b02cb4aa2bd9b1d2bb7b499383d8e987e6643f 100644 (file)
@@ -144,10 +144,10 @@ check: all
    $(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(TEMP_CONF)
 
 installcheck: all
-   $(pg_regress_call) --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule
+   $(pg_regress_call) --psqldir="$(PSQLDIR)" --schedule=$(srcdir)/serial_schedule
 
 installcheck-parallel: all
-   $(pg_regress_call) --psqldir=$(PSQLDIR) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT)
+   $(pg_regress_call) --psqldir="$(PSQLDIR)" --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT)
 
 
 # old interfaces follow...
@@ -157,7 +157,7 @@ runtest: installcheck
 runtest-parallel: installcheck-parallel
 
 bigtest: all
-   $(pg_regress_call) --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule numeric_big 
+   $(pg_regress_call) --psqldir="$(PSQLDIR)" --schedule=$(srcdir)/serial_schedule numeric_big 
 
 bigcheck: all
    $(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) numeric_big