1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00
Files
config
ac_func_accept_argtypes.m4
c-compiler.m4
c-library.m4
config.guess
config.sub
cxx.m4
docbook.m4
general.m4
install-sh
java.m4
libtool.m4
missing
mkinstalldirs
perl.m4
prep_buildtree
programs.m4
python.m4
tcl.m4
contrib
doc
src
COPYRIGHT
GNUmakefile.in
HISTORY
INSTALL
Makefile
README
aclocal.m4
configure
configure.in
register.txt
postgres/config/prep_buildtree
2001-09-10 23:28:59 +00:00

42 lines
943 B
Bash

#! /bin/sh
# This script prepares a PostgreSQL build tree. It is intended
# to be run by the configure script.
me=`basename $0`
help="\
Usage: $me sourcetree [buildtree]"
if test -z "$1"; then
echo "$help" 1>&2
exit 1
elif test x"$1" = x"--help"; then
echo "$help"
exit 0
fi
unset CDPATH
sourcetree=`cd $1 && pwd`
buildtree=`cd ${2:-'.'} && pwd`
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 1
fi
done
for item in `find "$sourcetree" -name Makefile -print -o -name GNUmakefile -print`; do
filename=`expr "$item" : "$sourcetree\(.*\)"`
if test ! -f "${item}.in"; then
if cmp "$item" "$buildtree/$filename" >/dev/null 2>&1; then : ; else
ln -fs "$item" "$buildtree/$filename" || exit 1
fi
fi
done
exit 0