From 57d374e6674ebb9dc7912c187f04d5b77331cd30 Mon Sep 17 00:00:00 2001 From: Christian Blichmann Date: Mon, 23 Mar 2020 13:52:02 +0100 Subject: [PATCH] Fix libffi configure directory in Bazel/CMake builds --- cmake/libffi/CMakeLists.txt.in | 2 +- sandboxed_api/bazel/repositories.bzl | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cmake/libffi/CMakeLists.txt.in b/cmake/libffi/CMakeLists.txt.in index cb0aec1..60a0f9e 100644 --- a/cmake/libffi/CMakeLists.txt.in +++ b/cmake/libffi/CMakeLists.txt.in @@ -22,7 +22,7 @@ ExternalProject_Add(libffi SOURCE_DIR "${CMAKE_BINARY_DIR}/libffi-src" CONFIGURE_COMMAND sh -c "./configure \ --disable-dependency-tracking \ - && (mv -t configure-cmake-gen `sh config.guess` || true)" + && (mv `sh config.guess` configure-cmake-gen || true)" BUILD_COMMAND "" INSTALL_COMMAND "" TEST_COMMAND "" diff --git a/sandboxed_api/bazel/repositories.bzl b/sandboxed_api/bazel/repositories.bzl index 74b6452..23d8b94 100644 --- a/sandboxed_api/bazel/repositories.bzl +++ b/sandboxed_api/bazel/repositories.bzl @@ -21,10 +21,9 @@ def _configure(ctx): # Run configure script and move host-specific directory to a well-known # location. ctx.execute( - [bash_exe, "-c", """ - ./configure --disable-dependency-tracking {args} - mv -t configure-bazel-gen $(. config.guess) || true - """.format(args = " ".join(ctx.attr.configure_args))], + [bash_exe, "-c", """./configure --disable-dependency-tracking {args}; + mv $(. config.guess) configure-bazel-gen || true + """.format(args = " ".join(ctx.attr.configure_args))], quiet = ctx.attr.quiet, )