Make prep_buildtree harmless when run on top of the source tree.

from Ian Lance Taylor
This commit is contained in:
Peter Eisentraut 2001-09-10 23:28:59 +00:00
parent 8f3627d89b
commit 7505e5d0cd
1 changed files with 4 additions and 2 deletions

View File

@ -30,9 +30,11 @@ for item in `find "$sourcetree" -type d \( -name CVS -prune -o -print \)`; do
done
for item in `find "$sourcetree" -name Makefile -print -o -name GNUmakefile -print`; do
subdir=`expr "$item" : "$sourcetree\(.*\)"`
filename=`expr "$item" : "$sourcetree\(.*\)"`
if test ! -f "${item}.in"; then
ln -fs "$item" "$buildtree/$subdir" || exit 1
if cmp "$item" "$buildtree/$filename" >/dev/null 2>&1; then : ; else
ln -fs "$item" "$buildtree/$filename" || exit 1
fi
fi
done