summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2001-09-10 23:28:59 +0000
committerPeter Eisentraut2001-09-10 23:28:59 +0000
commitcd2cafc98693425f841969100293f8934bde5930 (patch)
treef84eae312f993c5697177adebd0e84fa048d4661
parent358f83aba2b774ef2e4164e8278a9a84951afaee (diff)
Make prep_buildtree harmless when run on top of the source tree.
from Ian Lance Taylor
-rw-r--r--config/prep_buildtree6
1 files changed, 4 insertions, 2 deletions
diff --git a/config/prep_buildtree b/config/prep_buildtree
index 7dbcf3166e..57d7719673 100644
--- a/config/prep_buildtree
+++ b/config/prep_buildtree
@@ -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