From patchwork Sun Jul 24 14:17:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 72664 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp720766qga; Sun, 24 Jul 2016 07:19:12 -0700 (PDT) X-Received: by 10.28.35.193 with SMTP id j184mr34491477wmj.33.1469369951934; Sun, 24 Jul 2016 07:19:11 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id gf6si10662896wjb.72.2016.07.24.07.19.11; Sun, 24 Jul 2016 07:19:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 315BBA7652; Sun, 24 Jul 2016 16:18:52 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KTBM_fh24s0j; Sun, 24 Jul 2016 16:18:52 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5F7A0A76E7; Sun, 24 Jul 2016 16:18:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B1B3EA7581 for ; Sun, 24 Jul 2016 16:18:28 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0hPqIeaLtIOD for ; Sun, 24 Jul 2016 16:18:28 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by theia.denx.de (Postfix) with ESMTPS id 621D7A762A for ; Sun, 24 Jul 2016 16:18:26 +0200 (CEST) Received: from grover.sesame (FL1-119-242-215-193.osk.mesh.ad.jp [119.242.215.193]) (authenticated) by conuserg-08.nifty.com with ESMTP id u6OEHflR008919; Sun, 24 Jul 2016 23:17:49 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u6OEHflR008919 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1469369870; bh=fFs2dcgAtEHSt7myUigSlZnrPV5tNqpmJqgWzhzmLkE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N1V17NoX/hD//fvzD12em4eKbbB5hhNpX7YArHPfk/mos2X4TupM5VaL5iy2jGzIj 48qPgm2ISi8/kaaBHsuv1gtnmSqaSpIctpk5VkidOGiVVl3Xxya9ufOXDQ/yqE119I PkzjeWQA5xucsegA53qRHzeXEzDka8VQlWC1NATSFISeV+ymX3x1eeG4ejEI4/dQRD 8dT/bnFUvKFyaEdRWJBAyY/PBygf7ReFOaQXlbdtoDxZZbIjbictckV2dLtUVbbaua fgM/jUqWRUFxwvLGqZrXzKJ/1Wg9+EStCK0EiJ1fJupvuqEEZgGjYZ7IppRb5wCwWp qzuBav5HQgZGQ== X-Nifty-SrcIP: [119.242.215.193] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Sun, 24 Jul 2016 23:17:39 +0900 Message-Id: <1469369859-14277-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469369859-14277-1-git-send-email-yamada.masahiro@socionext.com> References: <1469369859-14277-1-git-send-email-yamada.masahiro@socionext.com> Cc: Tom Rini , Joe Hershberger Subject: [U-Boot] [PATCH 4/4] tools: moveconfig: fix cleanup of defines across multiple lines X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Correct the clean-up of such defines that continue across multiple lines, like follows: #define CONFIG_FOO "this continues to the next line " \ "this line should be removed too" \ "this line should be removed as well" Signed-off-by: Masahiro Yamada --- tools/moveconfig.py | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 69701d4..8f8e67b 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -370,6 +370,9 @@ def cleanup_one_header(header_path, patterns, options): matched = [] for i, line in enumerate(lines): + if i - 1 in matched and lines[i - 1][-2:] == '\\\n': + matched.append(i) + continue for pattern in patterns: if pattern.search(line): matched.append(i)