Make more portable.

This commit is contained in:
Peter Eisentraut 2001-02-09 20:24:08 +00:00
parent b1e4cfa5f6
commit 6afd28c8f2

View File

@ -3,7 +3,6 @@
# This script prepares a PostgreSQL build tree. It is intended
# to be run by the configure script.
set -e
me=`basename $0`
help="\
@ -20,14 +19,16 @@ sourcetree=$1
buildtree=${2:-'.'}
for item in `find "$sourcetree" -type d -\( -name CVS -prune -o -print -\)`; do
subdir=`expr "$item" : "$sourcetree\(.*\)"` || true
mkdir -p "$buildtree/$subdir"
for item in `find "$sourcetree" -type d \( -name CVS -prune -o -print \)`; do
subdir=`expr "$item" : "$sourcetree\(.*\)"`
if test ! -d "$buildtree/$subdir"; then
mkdir -p "$buildtree/$subdir" || exit
fi
done
for item in `find "$sourcetree" -name Makefile -o -name GNUmakefile`; do
subdir=`expr "$item" : "$sourcetree\(.*\)"` || true
if test ! -e "${item}.in"; then
ln -fs "$item" "$buildtree/$subdir"
subdir=`expr "$item" : "$sourcetree\(.*\)"`
if test ! -f "${item}.in"; then
ln -fs "$item" "$buildtree/$subdir" || exit
fi
done