Delete downloaded BUILD files for makefile dependencies immediately after extracting and also at the beginning of ./configure. This will prevent bazel from erroneously parsing contrib/makefile/downloads during configuration if a makefile build has previously been performed.

Change: 145838744
This commit is contained in:
Andrew Harp 2017-01-27 14:42:30 -08:00 committed by TensorFlower Gardener
parent 46875d2302
commit 51dbc46483
2 changed files with 10 additions and 0 deletions

7
configure vendored
View File

@ -44,6 +44,13 @@ function bazel_clean_and_fetch() {
bazel fetch "//tensorflow/... -//tensorflow/examples/android/..."
}
# Delete any leftover BUILD files from the Makefile build, which would interfere
# with Bazel parsing.
MAKEFILE_DOWNLOAD_DIR=tensorflow/contrib/makefile/downloads
if [ -d "${MAKEFILE_DOWNLOAD_DIR}" ]; then
find ${MAKEFILE_DOWNLOAD_DIR} -type f -name '*BUILD' -delete
fi
## Set up python-related environment settings
while true; do
fromuser=""

View File

@ -44,6 +44,9 @@ download_and_extract() {
echo "downloading ${url}" >&2
mkdir -p "${dir}"
curl -Ls "${url}" | tar -C "${dir}" --strip-components=1 -xz
# Delete any potential BUILD files, which would interfere with Bazel builds.
find "${dir}" -type f -name '*BUILD' -delete
}
download_and_extract "${EIGEN_URL}" "${DOWNLOADS_DIR}/eigen"