3
# This script prepares a PostgreSQL build tree. It is intended
4
# to be run by the configure script.
9
Usage: $me sourcetree [buildtree]"
14
elif test x"$1" = x"--help"; then
21
sourcetree=`cd $1 && pwd`
23
buildtree=`cd ${2:-'.'} && pwd`
25
for item in `find "$sourcetree" -type d \( -name CVS -prune -o -print \)`; do
26
subdir=`expr "$item" : "$sourcetree\(.*\)"`
27
if test ! -d "$buildtree/$subdir"; then
28
mkdir -p "$buildtree/$subdir" || exit 1
32
for item in `find "$sourcetree" -name Makefile -print -o -name GNUmakefile -print`; do
33
filename=`expr "$item" : "$sourcetree\(.*\)"`
34
if test ! -f "${item}.in"; then
35
if cmp "$item" "$buildtree/$filename" >/dev/null 2>&1; then : ; else
36
ln -fs "$item" "$buildtree/$filename" || exit 1