From patchwork Sat Sep 26 21:32:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11801673 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2EA86139A for ; Sat, 26 Sep 2020 21:33:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A73F2371F for ; Sat, 26 Sep 2020 21:33:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="paQKYGVf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728032AbgIZVdB (ORCPT ); Sat, 26 Sep 2020 17:33:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727810AbgIZVc4 (ORCPT ); Sat, 26 Sep 2020 17:32:56 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CDDBC0613D5 for ; Sat, 26 Sep 2020 14:32:56 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id j2so7632939wrx.7 for ; Sat, 26 Sep 2020 14:32:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=LbzZ7rratphdzpKCzScQ0H87PZ4mOGWV8pJbumS/i3M=; b=paQKYGVfwIPVzLIfByIZ9soDpg/GbFfWgjnvYHTmR3DB/8GAGaXAE0QrO4VUbxkv71 FUAznD+s+LVCuXBN52lY1pKro1Lqsq3qhGdk+kWI+TRMDryiUq0RG0oFR17SnOG/hBSr sNjy8NHrWcj4qr4lp3tfuAvYa5gWTCAWJGG+JRGfOrWCDvrEoNUvWhSulzip4d0TinaE jjBy3b7kFu1IgQSwCrMN/PUKP0hEXn9JCXSvTcsfdHZdOr2/f7x0nE/+Kw31zzq1r1Ca pEFdKmjqiLqGGm3Fwyl8709qe89ORvSWaEUt5ubgZ++Nu7ISmwEvHFDNQJmwdNFSgMB/ EUJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=LbzZ7rratphdzpKCzScQ0H87PZ4mOGWV8pJbumS/i3M=; b=buPmlIdCoBdkxwnemkqAdKbsADo8XA0jiz7VwwcDWmM/OlEE9HsOxR+WjWlziReIRj a0WIIs+HGY6ouCBqN1CsxTfyvVDMx/raf6J7bdi6hZadMk3qXW6991JE8Mz7EUxgh1SH czF34YroH81pjkB715bNrIG8j4iU2ZUn33Trg6uYRiuH0S0UFzKpP5VzWMUrD4UUL/E8 VVXLCDnfSxS2aLPZDMJbg5dOLlzMR5D3C6cVMgl87JNJKn5m+6Hz9qHnNaEAmefGrGF8 DDBV+0sHAyRqGLjmmO+F4jbsxGCJD18RdRdeS0bO4UXxTTUxYizpLOw7G/TIw0j2HCQw RLAQ== X-Gm-Message-State: AOAM533S6T/cPXH/IpGLSTwTQjqZ6W+Vtw0bNNmUvFvws07p1omrEwl5 f9M1zSQK46hp5lzW8i/6eX+sQL4Ro9o= X-Google-Smtp-Source: ABdhPJzbib0XKS46oDYOwlz8549EbWMkI6NYHI3FvC5lbJyuxKOPVm42CeYCt6oWPlYC0agnvoh7bQ== X-Received: by 2002:adf:dd82:: with SMTP id x2mr11708036wrl.419.1601155974631; Sat, 26 Sep 2020 14:32:54 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id x10sm3772305wmi.37.2020.09.26.14.32.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Sep 2020 14:32:54 -0700 (PDT) Message-Id: <8b3500a07c67d07e0928e8d6638d618ab118e1eb.1601155970.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Sat, 26 Sep 2020 21:32:44 +0000 Subject: [PATCH v2 05/10] cmake: quote the path accurately when editing `test-lib.sh` Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Sibi Siddharthan , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZw==?= Danh , SZEDER =?utf-8?b?R8OhYm9y?= , Eric Sunshine , Johannes Schindelin , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin By default, the build directory will be called something like `contrib/buildsystems/out/build/x64-Debug (default)` (note the space and the parentheses). We need to make sure that such a path is quoted properly when editing the assignment of the `GIT_BUILD_DIR` variable. Signed-off-by: Johannes Schindelin --- contrib/buildsystems/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index acb197fba5..e66ae137c2 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -952,7 +952,7 @@ if(NOT ${CMAKE_BINARY_DIR}/CMakeCache.txt STREQUAL ${CACHE_PATH}) file(WRITE ${CMAKE_BINARY_DIR}/CTestCustom.cmake "file(STRINGS ${CMAKE_SOURCE_DIR}/t/test-lib.sh GIT_BUILD_DIR_REPL REGEX \"GIT_BUILD_DIR=(.*)\")\n" "file(STRINGS ${CMAKE_SOURCE_DIR}/t/test-lib.sh content NEWLINE_CONSUME)\n" - "string(REPLACE \"\${GIT_BUILD_DIR_REPL}\" \"GIT_BUILD_DIR=\\\"$TEST_DIRECTORY\\\"/../${BUILD_DIR_RELATIVE}\" content \"\${content}\")\n" + "string(REPLACE \"\${GIT_BUILD_DIR_REPL}\" \"GIT_BUILD_DIR=\\\"$TEST_DIRECTORY/../${BUILD_DIR_RELATIVE}\\\"\" content \"\${content}\")\n" "file(WRITE ${CMAKE_SOURCE_DIR}/t/test-lib.sh \${content})") #misc copies file(COPY ${CMAKE_SOURCE_DIR}/t/chainlint.sed DESTINATION ${CMAKE_BINARY_DIR}/t/)