From 42f333314a17ceabb34725459dd26c5b8d3806b2 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 6 Dec 2001 16:42:41 -0500 Subject: [svn-r4682] Purpose: Bug fix Description: A a build had occurred in the source tree ($CURRENT) and did not do a distclean, the left over files would interfere with srcdir build. Solution: Added a "make distclean" in the "checkout" option to clean up the $CURRENT just in case. Not necessarily the most optimal spot to do the cleaning but convenient. Platforms tested: Eirene. --- bin/snapshot | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bin/snapshot b/bin/snapshot index 520724e..71b9d79 100755 --- a/bin/snapshot +++ b/bin/snapshot @@ -200,6 +200,16 @@ if [ "$cmd" = "all" -o -n "$cmdcheckout" ]; then # not, just create one and assume that a snapshot is necessary. test -d ${BASEDIR} || mkdir -p ${BASEDIR} || exit 1 + # If there is a Makefile in ${CURRENT}, the last test done in it + # has not been distclean'ed. They would interfere with other + # --srcdir build since make considers the files in ${CURRENT} + # take precedence over files in its own build-directory. Run + # a "make distclean" to clean them all out. This is not really + # part of the "checkout" functions but this is the most convenient + # spot to do the distclean. We will also continue the checkout process + # regardless of the return code of distclean. + ( cd ${CURRENT}; test -f Makefile && ${MAKE} distclean) + # Check out the current version from CVS cvs -Q co -d ${CURRENT} ${CVSVERSION} hdf5 || exit 1 fi # Do CVS checkout -- cgit v0.12