summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/Makefile7
-rwxr-xr-xconfig/install-sh528
-rwxr-xr-xconfig/mkinstalldirs152
-rwxr-xr-xconfigure56
-rw-r--r--configure.in9
-rw-r--r--doc/src/sgml/Makefile14
-rw-r--r--src/Makefile4
-rw-r--r--src/Makefile.global.in6
-rw-r--r--src/Makefile.shlib6
-rw-r--r--src/backend/Makefile10
-rw-r--r--src/backend/catalog/Makefile4
-rw-r--r--src/backend/snowball/Makefile4
-rw-r--r--src/backend/tsearch/Makefile4
-rw-r--r--src/backend/utils/mb/conversion_procs/Makefile4
-rw-r--r--src/bin/initdb/Makefile4
-rw-r--r--src/bin/pg_config/Makefile4
-rw-r--r--src/bin/pg_controldata/Makefile4
-rw-r--r--src/bin/pg_ctl/Makefile4
-rw-r--r--src/bin/pg_dump/Makefile4
-rw-r--r--src/bin/pg_resetxlog/Makefile4
-rw-r--r--src/bin/psql/Makefile4
-rw-r--r--src/bin/scripts/Makefile4
-rw-r--r--src/include/Makefile6
-rw-r--r--src/interfaces/ecpg/include/Makefile2
-rw-r--r--src/interfaces/ecpg/preproc/Makefile4
-rw-r--r--src/interfaces/libpq/Makefile4
-rw-r--r--src/makefiles/Makefile4
-rw-r--r--src/makefiles/pgxs.mk12
-rw-r--r--src/nls-global.mk6
-rw-r--r--src/pl/tcl/modules/Makefile4
-rw-r--r--src/port/Makefile4
-rw-r--r--src/test/regress/GNUmakefile6
-rw-r--r--src/timezone/Makefile4
-rw-r--r--src/timezone/tznames/Makefile4
34 files changed, 503 insertions, 397 deletions
diff --git a/config/Makefile b/config/Makefile
index c5ec0f7da4..2e881b7704 100644
--- a/config/Makefile
+++ b/config/Makefile
@@ -1,4 +1,4 @@
-# $PostgreSQL: pgsql/config/Makefile,v 1.2 2005/12/09 21:19:34 petere Exp $
+# $PostgreSQL: pgsql/config/Makefile,v 1.3 2009/08/26 22:24:42 petere Exp $
subdir = config
top_builddir = ..
@@ -7,10 +7,9 @@ include $(top_builddir)/src/Makefile.global
install: all installdirs
$(INSTALL_SCRIPT) $(srcdir)/install-sh '$(DESTDIR)$(pgxsdir)/config/install-sh'
- $(INSTALL_SCRIPT) $(srcdir)/mkinstalldirs '$(DESTDIR)$(pgxsdir)/config/mkinstalldirs'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(pgxsdir)/config'
+ $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/config'
uninstall:
- rm -f '$(DESTDIR)$(pgxsdir)/config/install-sh' '$(DESTDIR)$(pgxsdir)/config/mkinstalldirs'
+ rm -f '$(DESTDIR)$(pgxsdir)/config/install-sh'
diff --git a/config/install-sh b/config/install-sh
index 8692ce9fd9..bdcfd39c63 100755
--- a/config/install-sh
+++ b/config/install-sh
@@ -1,9 +1,9 @@
#!/bin/sh
# install - install a program, script, or datafile
-# $PostgreSQL: pgsql/config/install-sh,v 1.7 2007/11/13 18:50:54 momjian Exp $
+# $PostgreSQL: pgsql/config/install-sh,v 1.8 2009/08/26 22:24:42 petere Exp $
-scriptversion=2005-02-02.21
+scriptversion=2009-08-26.20
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,44 +41,74 @@ scriptversion=2005-02-02.21
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
-# from scratch. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-# Darwin normal strip removes symbols from shared libraries
-# that are later needed for dynamic linking, so use strip -x.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+# Darwin normal strip removes symbols from shared libraries that are
+# later needed for dynamic linking, so use strip -x.
# http://archives.postgresql.org/pgsql-hackers/2007-10/msg01470.php
-if test `expr "\`uname -a\`" : 'Darwin'` -ne 0
-then stripprog="${STRIPPROG-strip -x}"
-else stripprog="${STRIPPROG-strip}"
-fi
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+case `uname -s` in
+ Darwin) stripprog="${STRIPPROG-strip -x}";;
+esac
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
-chmodcmd="$chmodprog 0755"
-chowncmd=
chgrpcmd=
-stripcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
rmcmd="$rmprog -f"
-mvcmd="$mvprog"
+stripcmd=
+
src=
dst=
dir_arg=
-dstarg=
+dst_arg=
+
+copy_on_change=false
no_target_directory=
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
@@ -88,81 +118,86 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--c (ignored)
--d create directories instead of installing files.
--g GROUP $chgrpprog installed files to GROUP.
--m MODE $chmodprog installed files to MODE.
--o USER $chownprog installed files to USER.
--s $stripprog installed files.
--t DIRECTORY install into DIRECTORY.
--T report an error if DSTFILE is a directory.
---help display this help and exit.
---version display version info and exit.
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
"
-while test -n "$1"; do
+while test $# -ne 0; do
case $1 in
- -c) shift
- continue;;
+ -c) ;;
+
+ -C) copy_on_change=true;;
- -d) dir_arg=true
- shift
- continue;;
+ -d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
+ shift;;
--help) echo "$usage"; exit $?;;
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
+ shift;;
- -s) stripcmd=$stripprog
- shift
- continue;;
+ -s) stripcmd=$stripprog;;
- -t) dstarg=$2
- shift
- shift
- continue;;
+ -t) dst_arg=$2
+ shift;;
- -T) no_target_directory=true
- shift
- continue;;
+ -T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
- *) # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- test -n "$dir_arg$dstarg" && break
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dstarg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dstarg"
- shift # fnord
- fi
- shift # arg
- dstarg=$arg
- done
+ --) shift
break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
esac
+ shift
done
-if test -z "$1"; then
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ done
+fi
+
+if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
@@ -172,24 +207,47 @@ if test -z "$1"; then
exit 0
fi
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
for src
do
# Protect names starting with `-'.
case $src in
- -*) src=./$src ;;
+ -*) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
- src=
-
- if test -d "$dst"; then
- mkdircmd=:
- chmodcmd=
- else
- mkdircmd=$mkdirprog
- fi
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
else
+
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
@@ -198,71 +256,199 @@ do
exit 1
fi
- if test -z "$dstarg"; then
+ if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
- dst=$dstarg
+ dst=$dst_arg
# Protect names starting with `-'.
case $dst in
- -*) dst=./$dst ;;
+ -*) dst=./$dst;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
- echo "$0: $dstarg: Is a directory" >&2
+ echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
- dst=$dst/`basename "$src"`
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
fi
fi
- # This sed command emulates the dirname command.
- dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
- # Make sure that the destination directory exists.
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
- # Skip lots of stat calls in the usual case.
- if test ! -d "$dstdir"; then
- defaultIFS='
- '
- IFS="${IFS-$defaultIFS}"
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
- oIFS=$IFS
- # Some sh's can't handle IFS=/ for some reason.
- IFS='%'
- set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
- shift
- IFS=$oIFS
+ case $dstdir in
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
+ esac
- pathcomp=
+ eval "$initialize_posix_glob"
- while test $# -ne 0 ; do
- pathcomp=$pathcomp$1
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
shift
- if test ! -d "$pathcomp"; then
- $mkdirprog "$pathcomp"
- # mkdir can fail with a `File exist' error in case several
- # install-sh are creating the directory concurrently. This
- # is OK.
- test -d "$pathcomp" || exit
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
- pathcomp=$pathcomp/
- done
+ fi
fi
if test -n "$dir_arg"; then
- $doit $mkdircmd "$dst" \
- && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
- dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
@@ -270,10 +456,9 @@ do
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
- trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
- $doit $cpprog "$src" "$dsttmp" &&
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@@ -281,48 +466,59 @@ do
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
- # Now rename the file to the real destination.
- { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
- || {
- # The rename failed, perhaps because mv can't rename something else
- # to itself, or perhaps because mv is so ancient that it does not
- # support -f.
-
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- if test -f "$dstdir/$dstfile"; then
- $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
- || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
- || {
- echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
- (exit 1); exit 1
- }
- else
- :
- fi
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
- }
- }
- fi || { (exit 1); exit 1; }
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
done
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
- (exit 0); exit 0
-}
-
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
diff --git a/config/mkinstalldirs b/config/mkinstalldirs
deleted file mode 100755
index 070b418022..0000000000
--- a/config/mkinstalldirs
+++ /dev/null
@@ -1,152 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-
-# $PostgreSQL: pgsql/config/mkinstalldirs,v 1.5 2006/03/11 04:38:28 momjian Exp $
-
-scriptversion=2005-02-02.21
-
-# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain.
-#
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-errstatus=0
-dirmode=""
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
-
-Create each directory DIR (with mode MODE, if specified), including all
-leading file name components.
-
-Report bugs to <bug-automake@gnu.org>."
-
-# process command line arguments
-while test $# -gt 0 ; do
- case $1 in
- -h | --help | --h*) # -h for help
- echo "$usage"
- exit $?
- ;;
- -m) # -m PERM arg
- shift
- test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
- dirmode=$1
- shift
- ;;
- --version)
- echo "$0 $scriptversion"
- exit $?
- ;;
- --) # stop option processing
- shift
- break
- ;;
- -*) # unknown option
- echo "$usage" 1>&2
- exit 1
- ;;
- *) # first non-opt arg
- break
- ;;
- esac
-done
-
-for file
-do
- if test -d "$file"; then
- shift
- else
- break
- fi
-done
-
-case $# in
- 0) exit 0 ;;
-esac
-
-# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
-# mkdir -p a/c at the same time, both will detect that a is missing,
-# one will create a, then the other will try to create a and die with
-# a "File exists" error. This is a problem when calling mkinstalldirs
-# from a parallel make. We use --version in the probe to restrict
-# ourselves to GNU mkdir, which is thread-safe.
-case $dirmode in
- '')
- if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- echo "mkdir -p -- $*"
- exec mkdir -p -- "$@"
- else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- test -d ./-p && rmdir ./-p
- test -d ./--version && rmdir ./--version
- fi
- ;;
- *)
- if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
- test ! -d ./--version; then
- echo "mkdir -m $dirmode -p -- $*"
- exec mkdir -m "$dirmode" -p -- "$@"
- else
- # Clean up after NextStep and OpenStep mkdir.
- for d in ./-m ./-p ./--version "./$dirmode";
- do
- test -d $d && rmdir $d
- done
- fi
- ;;
-esac
-
-for file
-do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
- shift
-
- pathcomp=
- for d
- do
- pathcomp="$pathcomp$d"
- case $pathcomp in
- -*) pathcomp=./$pathcomp ;;
- esac
-
- if test ! -d "$pathcomp"; then
- echo "mkdir $pathcomp"
-
- mkdir "$pathcomp" || lasterr=$?
-
- if test ! -d "$pathcomp"; then
- errstatus=$lasterr
- else
- if test ! -z "$dirmode"; then
- echo "chmod $dirmode $pathcomp"
- lasterr=""
- chmod "$dirmode" "$pathcomp" || lasterr=$?
-
- if test ! -z "$lasterr"; then
- errstatus=$lasterr
- fi
- fi
- fi
- fi
-
- pathcomp="$pathcomp/"
- done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/configure b/configure
index 61b3c72e52..34a5dc0a1b 100755
--- a/configure
+++ b/configure
@@ -687,6 +687,7 @@ FLEXFLAGS
FLEX
BISONFLAGS
BISON
+MKDIR_P
AWK
LN_S
TAR
@@ -6676,6 +6677,54 @@ fi
test -n "$AWK" && break
done
+{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+done
+IFS=$as_save_IFS
+
+fi
+
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ test -d ./--version && rmdir ./--version
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+# When Autoconf chooses install-sh as mkdir -p program it tries to generate
+# a relative path to it in each makefile where it subsitutes it. This clashes
+# with our Makefile.global concept. This workaround helps.
+case $MKDIR_P in
+ *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
+esac
# Let the user override the search
if test -z "$BISON"; then
@@ -29011,6 +29060,7 @@ gives unlimited permission to copy, distribute and modify it."
ac_pwd='$ac_pwd'
srcdir='$srcdir'
+MKDIR_P='$MKDIR_P'
AWK='$AWK'
test -n "\$AWK" || AWK=awk
_ACEOF
@@ -29622,6 +29672,11 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
# CONFIG_FILE
#
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -29677,6 +29732,7 @@ s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
diff --git a/configure.in b/configure.in
index ba0dc1cb7d..5cd5d13725 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.608 2009/08/04 22:04:36 petere Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.609 2009/08/26 22:24:42 petere Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@@ -821,6 +821,13 @@ fi
AC_PATH_PROG(TAR, tar)
AC_PROG_LN_S
AC_PROG_AWK
+AC_PROG_MKDIR_P
+# When Autoconf chooses install-sh as mkdir -p program it tries to generate
+# a relative path to it in each makefile where it subsitutes it. This clashes
+# with our Makefile.global concept. This workaround helps.
+case $MKDIR_P in
+ *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
+esac
PGAC_PATH_BISON
PGAC_PATH_FLEX
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile
index a46352530a..64cc837f04 100644
--- a/doc/src/sgml/Makefile
+++ b/doc/src/sgml/Makefile
@@ -2,7 +2,7 @@
#
# PostgreSQL documentation makefile
#
-# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.127 2009/08/17 21:29:30 petere Exp $
+# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.128 2009/08/26 22:24:42 petere Exp $
#
#----------------------------------------------------------------------------
@@ -99,20 +99,20 @@ endif
# The draft target creates HTML output in draft mode, without index (for faster build).
draft: postgres.sgml $(ALMOSTALLSGML) stylesheet.dsl
- $(mkinstalldirs) $(srcdir)/html
+ $(MKDIR_P) $(srcdir)/html
$(JADE.html.call) -V draft-mode $<
cp $(srcdir)/stylesheet.css $(srcdir)/html/
html: html-stamp
$(srcdir)/html-stamp: postgres.sgml $(ALLSGML) stylesheet.dsl
- $(mkinstalldirs) $(srcdir)/html
+ $(MKDIR_P) $(srcdir)/html
$(JADE.html.call) -i include-index $<
cp $(srcdir)/stylesheet.css $(srcdir)/html/
touch $@
$(srcdir)/HTML.index: postgres.sgml $(ALMOSTALLSGML) stylesheet.dsl
- @$(mkinstalldirs) $(srcdir)/html
+ @$(MKDIR_P) $(srcdir)/html
$(JADE.html.call) -V html-index $<
$(srcdir)/bookindex.sgml: HTML.index
@@ -292,7 +292,7 @@ endif
install: $(if $(found_html),install-html) $(if $(found_man),install-man)
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(htmldir)'/html $(addprefix '$(DESTDIR)$(mandir)'/man, 1 3 $(sqlmansectnum))
+ $(MKDIR_P) '$(DESTDIR)$(htmldir)'/html $(addprefix '$(DESTDIR)$(mandir)'/man, 1 3 $(sqlmansectnum))
uninstall:
rm -f '$(DESTDIR)$(htmldir)/html/'* $(addprefix '$(DESTDIR)$(mandir)'/man, 1/* 3/* $(sqlmansectnum)/*)
@@ -335,11 +335,11 @@ all: all-man
all-man: $(fixed_manpage_files)
$(fixed_nonsql_manpage_files): fixedman/%: %
- @$(mkinstalldirs) $(dir $@)
+ @$(MKDIR_P) $(dir $@)
$(fix_sqlmansectnum) $< >$@
$(fixed_sql_manpage_files): fixedman/man$(sqlmansectnum)/%.$(sqlmansect): man7/%.7
- @$(mkinstalldirs) $(dir $@)
+ @$(MKDIR_P) $(dir $@)
$(fix_sqlmansectnum) $< >$@
install-man: all-man
diff --git a/src/Makefile b/src/Makefile
index 8c869573bf..966cb94687 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/Makefile,v 1.46 2009/08/07 20:50:22 petere Exp $
+# $PostgreSQL: pgsql/src/Makefile,v 1.47 2009/08/26 22:24:42 petere Exp $
#
#-------------------------------------------------------------------------
@@ -37,7 +37,7 @@ install-local: installdirs-local
installdirs: installdirs-local
installdirs-local:
- $(mkinstalldirs) '$(DESTDIR)$(pgxsdir)/$(subdir)'
+ $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)'
uninstall: uninstall-local
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 5141e7dfdd..c781e22f48 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -1,5 +1,5 @@
# -*-makefile-*-
-# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.257 2009/08/09 22:47:59 petere Exp $
+# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.258 2009/08/26 22:24:42 petere Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -19,7 +19,6 @@
# Meta configuration
.PHONY: all install install-strip installdirs uninstall clean distclean maintainer-clean distprep check installcheck maintainer-check coverage html man
-.SILENT: installdirs
# make `all' the default target
all:
@@ -284,7 +283,8 @@ INSTALL_SHLIB = $(INSTALL_SHLIB_ENV) $(INSTALL) $(INSTALL_SHLIB_OPTS) $(INSTALL_
# Override in Makefile.port if necessary
INSTALL_SHLIB_OPTS = -m 755
-mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+MKDIR_P = @MKDIR_P@
+
missing = $(SHELL) $(top_srcdir)/config/missing
STRIP = @STRIP@
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index b4f46da00a..748e6bb77d 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -6,7 +6,7 @@
# Copyright (c) 1998, Regents of the University of California
#
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.120 2009/01/05 09:27:19 petere Exp $
+# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.121 2009/08/26 22:24:42 petere Exp $
#
#-------------------------------------------------------------------------
@@ -517,9 +517,9 @@ endif # enable_shared
installdirs-lib:
ifdef soname
- $(mkinstalldirs) '$(DESTDIR)$(libdir)'
+ $(MKDIR_P) '$(DESTDIR)$(libdir)'
else
- $(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
+ $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'
endif
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 86526d5f1a..5ee3c4193d 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/backend/Makefile,v 1.132 2009/01/01 17:23:34 momjian Exp $
+# $PostgreSQL: pgsql/src/backend/Makefile,v 1.133 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -194,19 +194,19 @@ endif
.PHONY: install-bin
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(bindir)' '$(DESTDIR)$(datadir)'
+ $(MKDIR_P) '$(DESTDIR)$(bindir)' '$(DESTDIR)$(datadir)'
ifeq ($(PORTNAME), cygwin)
ifeq ($(MAKE_DLL), true)
- $(mkinstalldirs) '$(DESTDIR)$(libdir)'
+ $(MKDIR_P) '$(DESTDIR)$(libdir)'
endif
endif
ifeq ($(PORTNAME), win32)
ifeq ($(MAKE_DLL), true)
- $(mkinstalldirs) '$(DESTDIR)$(libdir)'
+ $(MKDIR_P) '$(DESTDIR)$(libdir)'
endif
endif
ifeq ($(MAKE_EXPORTS), true)
- $(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
+ $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'
endif
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
index ed06048894..e4414ed2bf 100644
--- a/src/backend/catalog/Makefile
+++ b/src/backend/catalog/Makefile
@@ -2,7 +2,7 @@
#
# Makefile for backend/catalog
#
-# $PostgreSQL: pgsql/src/backend/catalog/Makefile,v 1.70 2009/05/12 00:56:05 tgl Exp $
+# $PostgreSQL: pgsql/src/backend/catalog/Makefile,v 1.71 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -60,7 +60,7 @@ install-data: $(BKIFILES) installdirs
$(INSTALL_DATA) $(srcdir)/sql_features.txt '$(DESTDIR)$(datadir)/sql_features.txt'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(datadir)'
+ $(MKDIR_P) '$(DESTDIR)$(datadir)'
.PHONY: uninstall-data
uninstall-data:
diff --git a/src/backend/snowball/Makefile b/src/backend/snowball/Makefile
index a1d22f24c6..1b3d5a5a3f 100644
--- a/src/backend/snowball/Makefile
+++ b/src/backend/snowball/Makefile
@@ -2,7 +2,7 @@
#
# Makefile for src/backend/snowball
#
-# $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.6 2008/04/07 14:15:58 petere Exp $
+# $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.7 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -125,7 +125,7 @@ install: all installdirs install-lib
done
installdirs: installdirs-lib
- $(mkinstalldirs) '$(DESTDIR)$(datadir)' '$(DESTDIR)$(datadir)/$(DICTDIR)'
+ $(MKDIR_P) '$(DESTDIR)$(datadir)' '$(DESTDIR)$(datadir)/$(DICTDIR)'
uninstall: uninstall-lib
rm -f '$(DESTDIR)$(datadir)/$(SQLSCRIPT)'
diff --git a/src/backend/tsearch/Makefile b/src/backend/tsearch/Makefile
index dd9ef556b2..e4643f9199 100644
--- a/src/backend/tsearch/Makefile
+++ b/src/backend/tsearch/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 2006-2009, PostgreSQL Global Development Group
#
-# $PostgreSQL: pgsql/src/backend/tsearch/Makefile,v 1.9 2009/01/01 17:23:48 momjian Exp $
+# $PostgreSQL: pgsql/src/backend/tsearch/Makefile,v 1.10 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
subdir = src/backend/tsearch
@@ -30,7 +30,7 @@ install-data: $(DICTFILES) installdirs
done
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(datadir)' '$(DESTDIR)$(datadir)/$(DICTDIR)'
+ $(MKDIR_P) '$(DESTDIR)$(datadir)' '$(DESTDIR)$(datadir)/$(DICTDIR)'
.PHONY: uninstall-data
uninstall-data:
diff --git a/src/backend/utils/mb/conversion_procs/Makefile b/src/backend/utils/mb/conversion_procs/Makefile
index 17b5f71503..7bdd9f1f24 100644
--- a/src/backend/utils/mb/conversion_procs/Makefile
+++ b/src/backend/utils/mb/conversion_procs/Makefile
@@ -4,7 +4,7 @@
# Makefile for utils/mb/conversion_procs
#
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/backend/utils/mb/conversion_procs/Makefile,v 1.22 2009/08/07 20:50:22 petere Exp $
+# $PostgreSQL: pgsql/src/backend/utils/mb/conversion_procs/Makefile,v 1.23 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -208,7 +208,7 @@ install: $(SQLSCRIPT) installdirs
@for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit; done
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(datadir)' '$(DESTDIR)$(pkglibdir)'
+ $(MKDIR_P) '$(DESTDIR)$(datadir)' '$(DESTDIR)$(pkglibdir)'
uninstall:
rm -f '$(DESTDIR)$(datadir)/$(SQLSCRIPT)'
diff --git a/src/bin/initdb/Makefile b/src/bin/initdb/Makefile
index 24da9c045d..636c99e221 100644
--- a/src/bin/initdb/Makefile
+++ b/src/bin/initdb/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.57 2009/01/01 17:23:53 momjian Exp $
+# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.58 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -37,7 +37,7 @@ install: all installdirs
$(INSTALL_PROGRAM) initdb$(X) '$(DESTDIR)$(bindir)/initdb$(X)'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(bindir)'
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
uninstall:
rm -f '$(DESTDIR)$(bindir)/initdb$(X)'
diff --git a/src/bin/pg_config/Makefile b/src/bin/pg_config/Makefile
index e501a16659..f824dbfb90 100644
--- a/src/bin/pg_config/Makefile
+++ b/src/bin/pg_config/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1998-2009, PostgreSQL Global Development Group
#
-# $PostgreSQL: pgsql/src/bin/pg_config/Makefile,v 1.21 2009/01/01 17:23:54 momjian Exp $
+# $PostgreSQL: pgsql/src/bin/pg_config/Makefile,v 1.22 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -37,7 +37,7 @@ install: all installdirs
$(INSTALL_SCRIPT) pg_config$(X) '$(DESTDIR)$(bindir)/pg_config$(X)'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(bindir)'
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
uninstall:
rm -f '$(DESTDIR)$(bindir)/pg_config$(X)'
diff --git a/src/bin/pg_controldata/Makefile b/src/bin/pg_controldata/Makefile
index b9bba2949d..2ed0806ea7 100644
--- a/src/bin/pg_controldata/Makefile
+++ b/src/bin/pg_controldata/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1998-2009, PostgreSQL Global Development Group
#
-# $PostgreSQL: pgsql/src/bin/pg_controldata/Makefile,v 1.18 2009/01/01 17:23:54 momjian Exp $
+# $PostgreSQL: pgsql/src/bin/pg_controldata/Makefile,v 1.19 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -27,7 +27,7 @@ install: all installdirs
$(INSTALL_PROGRAM) pg_controldata$(X) '$(DESTDIR)$(bindir)/pg_controldata$(X)'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(bindir)'
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
uninstall:
rm -f '$(DESTDIR)$(bindir)/pg_controldata$(X)'
diff --git a/src/bin/pg_ctl/Makefile b/src/bin/pg_ctl/Makefile
index 28698a6496..24ad2275c2 100644
--- a/src/bin/pg_ctl/Makefile
+++ b/src/bin/pg_ctl/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/bin/pg_ctl/Makefile,v 1.26 2009/01/01 17:23:54 momjian Exp $
+# $PostgreSQL: pgsql/src/bin/pg_ctl/Makefile,v 1.27 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -27,7 +27,7 @@ install: all installdirs
$(INSTALL_PROGRAM) pg_ctl$(X) '$(DESTDIR)$(bindir)/pg_ctl$(X)'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(bindir)'
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
uninstall:
rm -f '$(DESTDIR)$(bindir)/pg_ctl$(X)'
diff --git a/src/bin/pg_dump/Makefile b/src/bin/pg_dump/Makefile
index 4cc49d8f7a..6a41422925 100644
--- a/src/bin/pg_dump/Makefile
+++ b/src/bin/pg_dump/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.67 2009/03/07 00:13:58 alvherre Exp $
+# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.68 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -42,7 +42,7 @@ install: all installdirs
$(INSTALL_PROGRAM) pg_dumpall$(X) '$(DESTDIR)$(bindir)'/pg_dumpall$(X)
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(bindir)'
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
uninstall:
rm -f $(addprefix '$(DESTDIR)$(bindir)'/, pg_dump$(X) pg_restore$(X) pg_dumpall$(X))
diff --git a/src/bin/pg_resetxlog/Makefile b/src/bin/pg_resetxlog/Makefile
index 05adda71b8..00bb737a69 100644
--- a/src/bin/pg_resetxlog/Makefile
+++ b/src/bin/pg_resetxlog/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1998-2009, PostgreSQL Global Development Group
#
-# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.20 2009/01/01 17:23:54 momjian Exp $
+# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.21 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -27,7 +27,7 @@ install: all installdirs
$(INSTALL_PROGRAM) pg_resetxlog$(X) '$(DESTDIR)$(bindir)/pg_resetxlog$(X)'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(bindir)'
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
uninstall:
rm -f '$(DESTDIR)$(bindir)/pg_resetxlog$(X)'
diff --git a/src/bin/psql/Makefile b/src/bin/psql/Makefile
index 01049d8af2..aeeeebf649 100644
--- a/src/bin/psql/Makefile
+++ b/src/bin/psql/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.63 2009/06/23 03:46:00 tgl Exp $
+# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.64 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -57,7 +57,7 @@ install: all installdirs
$(INSTALL_DATA) $(srcdir)/psqlrc.sample '$(DESTDIR)$(datadir)/psqlrc.sample'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(bindir)'
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
uninstall:
rm -f '$(DESTDIR)$(bindir)/psql$(X)' '$(DESTDIR)$(datadir)/psqlrc.sample'
diff --git a/src/bin/scripts/Makefile b/src/bin/scripts/Makefile
index 44cada79e5..4d2b1a1411 100644
--- a/src/bin/scripts/Makefile
+++ b/src/bin/scripts/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/bin/scripts/Makefile,v 1.42 2009/03/07 02:09:22 alvherre Exp $
+# $PostgreSQL: pgsql/src/bin/scripts/Makefile,v 1.43 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -54,7 +54,7 @@ install: all installdirs
$(INSTALL_PROGRAM) reindexdb$(X) '$(DESTDIR)$(bindir)'/reindexdb$(X)
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(bindir)'
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
uninstall:
rm -f $(addprefix '$(DESTDIR)$(bindir)'/, $(addsuffix $(X), $(PROGRAMS)))
diff --git a/src/include/Makefile b/src/include/Makefile
index 3b875f53bd..1367a7d8f2 100644
--- a/src/include/Makefile
+++ b/src/include/Makefile
@@ -4,7 +4,7 @@
#
# 'make install' installs whole contents of src/include.
#
-# $PostgreSQL: pgsql/src/include/Makefile,v 1.28 2009/07/20 20:38:55 alvherre Exp $
+# $PostgreSQL: pgsql/src/include/Makefile,v 1.29 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -50,8 +50,8 @@ install: all installdirs
done
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq'
- $(mkinstalldirs) $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS))
+ $(MKDIR_P) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq'
+ $(MKDIR_P) $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS))
uninstall:
diff --git a/src/interfaces/ecpg/include/Makefile b/src/interfaces/ecpg/include/Makefile
index 29ed1bfd80..ca96f2dfe1 100644
--- a/src/interfaces/ecpg/include/Makefile
+++ b/src/interfaces/ecpg/include/Makefile
@@ -23,7 +23,7 @@ install-headers: $(ecpg_headers) $(informix_headers)
$(INSTALL_DATA) $(ecpg_config_h) '$(DESTDIR)$(includedir)'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(includedir)' '$(DESTDIR)$(informix_esql_dir)'
+ $(MKDIR_P) '$(DESTDIR)$(includedir)' '$(DESTDIR)$(informix_esql_dir)'
uninstall:
rm -f $(addprefix '$(DESTDIR)$(includedir)'/, $(ecpg_headers))
diff --git a/src/interfaces/ecpg/preproc/Makefile b/src/interfaces/ecpg/preproc/Makefile
index a11ceddbfe..35332e38ff 100644
--- a/src/interfaces/ecpg/preproc/Makefile
+++ b/src/interfaces/ecpg/preproc/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1998-2009, PostgreSQL Global Development Group
#
-# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.143 2009/07/13 01:37:05 momjian Exp $
+# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.144 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -66,7 +66,7 @@ install: all installdirs
$(INSTALL_PROGRAM) ecpg$(X) '$(DESTDIR)$(bindir)'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(bindir)'
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
uninstall:
rm -f '$(DESTDIR)$(bindir)/ecpg$(X)'
diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile
index 753dfe23a8..b56b640bba 100644
--- a/src/interfaces/libpq/Makefile
+++ b/src/interfaces/libpq/Makefile
@@ -5,7 +5,7 @@
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.174 2009/07/13 01:37:05 momjian Exp $
+# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.175 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -113,7 +113,7 @@ install: all installdirs install-lib
$(INSTALL_DATA) $(srcdir)/pg_service.conf.sample '$(DESTDIR)$(datadir)/pg_service.conf.sample'
installdirs: installdirs-lib
- $(mkinstalldirs) '$(DESTDIR)$(includedir)' '$(DESTDIR)$(includedir_internal)'
+ $(MKDIR_P) '$(DESTDIR)$(includedir)' '$(DESTDIR)$(includedir_internal)'
uninstall: uninstall-lib
rm -f '$(DESTDIR)$(includedir)/libpq-fe.h'
diff --git a/src/makefiles/Makefile b/src/makefiles/Makefile
index b8756ba76a..c39128898d 100644
--- a/src/makefiles/Makefile
+++ b/src/makefiles/Makefile
@@ -1,4 +1,4 @@
-# $PostgreSQL: pgsql/src/makefiles/Makefile,v 1.2 2005/12/09 21:19:36 petere Exp $
+# $PostgreSQL: pgsql/src/makefiles/Makefile,v 1.3 2009/08/26 22:24:43 petere Exp $
subdir = src/makefiles
top_builddir = ../..
@@ -9,7 +9,7 @@ install: all installdirs
$(INSTALL_DATA) $(srcdir)/pgxs.mk '$(DESTDIR)$(pgxsdir)/$(subdir)/'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(pgxsdir)/$(subdir)'
+ $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)'
uninstall:
rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/pgxs.mk'
diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk
index 2f3b61cfe5..f950a717ae 100644
--- a/src/makefiles/pgxs.mk
+++ b/src/makefiles/pgxs.mk
@@ -1,6 +1,6 @@
# PGXS: PostgreSQL extensions makefile
-# $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.16 2009/07/08 13:47:29 petere Exp $
+# $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.17 2009/08/26 22:24:43 petere Exp $
# This file contains generic rules to build many kinds of simple
# extension modules. You only need to set a few variables and include
@@ -137,21 +137,21 @@ endif # MODULE_big
installdirs:
ifneq (,$(DATA)$(DATA_built))
- $(mkinstalldirs) '$(DESTDIR)$(datadir)/contrib'
+ $(MKDIR_P) '$(DESTDIR)$(datadir)/contrib'
endif
ifneq (,$(DATA_TSEARCH))
- $(mkinstalldirs) '$(DESTDIR)$(datadir)/tsearch_data'
+ $(MKDIR_P) '$(DESTDIR)$(datadir)/tsearch_data'
endif
ifneq (,$(MODULES))
- $(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
+ $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'
endif
ifdef DOCS
ifdef docdir
- $(mkinstalldirs) '$(DESTDIR)$(docdir)/contrib'
+ $(MKDIR_P) '$(DESTDIR)$(docdir)/contrib'
endif # docdir
endif # DOCS
ifneq (,$(PROGRAM)$(SCRIPTS)$(SCRIPTS_built))
- $(mkinstalldirs) '$(DESTDIR)$(bindir)'
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
endif
ifdef MODULE_big
diff --git a/src/nls-global.mk b/src/nls-global.mk
index da131d067c..9fa70f60fd 100644
--- a/src/nls-global.mk
+++ b/src/nls-global.mk
@@ -1,4 +1,4 @@
-# $PostgreSQL: pgsql/src/nls-global.mk,v 1.20 2009/01/20 09:58:50 petere Exp $
+# $PostgreSQL: pgsql/src/nls-global.mk,v 1.21 2009/08/26 22:24:42 petere Exp $
# Common rules for Native Language Support (NLS)
#
@@ -55,7 +55,7 @@ po/$(CATALOG_NAME).pot: $(GETTEXT_FILES) $(MAKEFILE_LIST)
# consistent #: file references in the po files.
$(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(GETTEXT_FILES)
endif
- @$(mkinstalldirs) $(dir $@)
+ @$(MKDIR_P) $(dir $@)
sed -e '1,18 { s/SOME DESCRIPTIVE TITLE./LANGUAGE message translation file for $(CATALOG_NAME)/;s/PACKAGE/PostgreSQL/g;s/VERSION/$(MAJORVERSION)/g;s/YEAR/'`date +%Y`'/g; }' messages.po >$@
rm messages.po
else # not XGETTEXT
@@ -72,7 +72,7 @@ ifneq (,$(LANGUAGES))
endif
installdirs-po:
- $(mkinstalldirs) $(foreach lang, $(LANGUAGES), '$(DESTDIR)$(localedir)'/$(lang)/LC_MESSAGES)
+ $(MKDIR_P) $(foreach lang, $(LANGUAGES), '$(DESTDIR)$(localedir)'/$(lang)/LC_MESSAGES)
uninstall-po:
rm -f $(foreach lang, $(LANGUAGES), '$(DESTDIR)$(localedir)'/$(lang)/LC_MESSAGES/$(CATALOG_NAME)$(SO_MAJOR_VERSION)-$(MAJORVERSION).mo)
diff --git a/src/pl/tcl/modules/Makefile b/src/pl/tcl/modules/Makefile
index 279449e76e..d52bd3973c 100644
--- a/src/pl/tcl/modules/Makefile
+++ b/src/pl/tcl/modules/Makefile
@@ -1,4 +1,4 @@
-# $PostgreSQL: pgsql/src/pl/tcl/modules/Makefile,v 1.4 2005/12/09 21:19:36 petere Exp $
+# $PostgreSQL: pgsql/src/pl/tcl/modules/Makefile,v 1.5 2009/08/26 22:24:43 petere Exp $
subdir = src/pl/tcl/modules
top_builddir = ../../../..
@@ -19,7 +19,7 @@ install: all installdirs
$(INSTALL_DATA) $(srcdir)/unknown.pltcl '$(DESTDIR)$(datadir)/unknown.pltcl'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(bindir)' '$(DESTDIR)$(datadir)'
+ $(MKDIR_P) '$(DESTDIR)$(bindir)' '$(DESTDIR)$(datadir)'
uninstall:
rm -f '$(DESTDIR)$(bindir)/pltcl_loadmod' '$(DESTDIR)$(bindir)/pltcl_delmod' '$(DESTDIR)$(bindir)/pltcl_listmod' '$(DESTDIR)$(datadir)/unknown.pltcl'
diff --git a/src/port/Makefile b/src/port/Makefile
index 7fc6f97119..d102c048cb 100644
--- a/src/port/Makefile
+++ b/src/port/Makefile
@@ -19,7 +19,7 @@
# OBJS adds additional object files that are always compiled.
#
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/port/Makefile,v 1.37 2008/11/25 18:19:31 tgl Exp $
+# $PostgreSQL: pgsql/src/port/Makefile,v 1.38 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -46,7 +46,7 @@ install: all installdirs
$(INSTALL_STLIB) libpgport.a '$(DESTDIR)$(libdir)/libpgport.a'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(libdir)'
+ $(MKDIR_P) '$(DESTDIR)$(libdir)'
uninstall:
rm -f '$(DESTDIR)$(libdir)/libpgport.a'
diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile
index 8fe55ee357..bbe0492797 100644
--- a/src/test/regress/GNUmakefile
+++ b/src/test/regress/GNUmakefile
@@ -6,7 +6,7 @@
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.77 2009/01/01 17:24:04 momjian Exp $
+# $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.78 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -66,7 +66,7 @@ install: all installdirs
$(INSTALL_PROGRAM) pg_regress$(X) '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_regress$(X)'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(pgxsdir)/$(subdir)'
+ $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)'
uninstall:
rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_regress$(X)'
@@ -104,7 +104,7 @@ install-tests: all install install-lib installdirs-tests
done
installdirs-tests: installdirs
- $(mkinstalldirs) $(patsubst $(srcdir)/%/,'$(DESTDIR)$(pkglibdir)/regress/%',$(sort $(dir $(regress_data_files))))
+ $(MKDIR_P) $(patsubst $(srcdir)/%/,'$(DESTDIR)$(pkglibdir)/regress/%',$(sort $(dir $(regress_data_files))))
# Get some extra C modules from contrib/spi...
diff --git a/src/timezone/Makefile b/src/timezone/Makefile
index 3171eb4097..fda2fa703a 100644
--- a/src/timezone/Makefile
+++ b/src/timezone/Makefile
@@ -4,7 +4,7 @@
# Makefile for the timezone library
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.31 2009/01/06 02:25:29 momjian Exp $
+# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.32 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------
@@ -56,7 +56,7 @@ endif
$(MAKE) -C tznames $@
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(datadir)'
+ $(MKDIR_P) '$(DESTDIR)$(datadir)'
uninstall:
ifeq (,$(with_system_tzdata))
diff --git a/src/timezone/tznames/Makefile b/src/timezone/tznames/Makefile
index 8f1c6447b6..f52f1d8176 100644
--- a/src/timezone/tznames/Makefile
+++ b/src/timezone/tznames/Makefile
@@ -4,7 +4,7 @@
# Makefile for the timezone names
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/timezone/tznames/Makefile,v 1.2 2007/02/09 15:56:00 petere Exp $
+# $PostgreSQL: pgsql/src/timezone/tznames/Makefile,v 1.3 2009/08/26 22:24:44 petere Exp $
#
#-------------------------------------------------------------------------
@@ -24,7 +24,7 @@ install: installdirs
$(INSTALL_DATA) $(TZNAMES_SETS_FILES) '$(DESTDIR)$(datadir)/timezonesets'
installdirs:
- $(mkinstalldirs) '$(DESTDIR)$(datadir)/timezonesets'
+ $(MKDIR_P) '$(DESTDIR)$(datadir)/timezonesets'
uninstall:
rm -rf '$(DESTDIR)$(datadir)/timezonesets'