From patchwork Mon Jul 25 10:15:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 72707 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1064514qga; Mon, 25 Jul 2016 03:15:20 -0700 (PDT) X-Received: by 10.194.110.229 with SMTP id id5mr15988762wjb.23.1469441720280; Mon, 25 Jul 2016 03:15:20 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id yt2si14150731wjb.283.2016.07.25.03.15.20; Mon, 25 Jul 2016 03:15:20 -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 8FC85A779F; Mon, 25 Jul 2016 12:15:00 +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 CgMchOMbCITl; Mon, 25 Jul 2016 12:15:00 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6891AA77A8; Mon, 25 Jul 2016 12:14:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 27980A778D for ; Mon, 25 Jul 2016 12:14:23 +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 AyH7Dq0NQVlu for ; Mon, 25 Jul 2016 12:14:23 +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-11.nifty.com (conuserg-11.nifty.com [210.131.2.78]) by theia.denx.de (Postfix) with ESMTPS id 2D976A778E for ; Mon, 25 Jul 2016 12:14:17 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id u6PADhxI021296; Mon, 25 Jul 2016 19:13:47 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com u6PADhxI021296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1469441627; bh=cZt8kbtjiCMOjs0aQ0RjT5Zh5q5ZuFUPVIei1V0nMDs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YXoaIFc2WmjqdyzvNdjs/5jnJoZgu1Lyn8Hp18WaM+jiPWheoZgtxy5YVYB1AP5uk kEUQg1b3vcA0uvpz/FcNPNOdCd4pO+5jE1hz1k0bcTV49pEAxc+UYcaSlgdLNW9oy2 5OWXZ5jboN2RsOvnJWY3QXNqoZoT2SNjdmuYup4AlO0nt/I+NOc15Ikx3G1sG5MWgp zexlWsdmr/EM/hbKlnr10KcGJiAEqP/Pd/9xGWOyPFsgbvDyavLvhbd5zPgMYUt2NX yuZx06D4ihR+sMNLLsTGIW0cKxQlAqbqDyPnjAHNTB6/JqdkKajmZC6+QCjYzhZKHw FYnSeXKcrrjhw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 25 Jul 2016 19:15:27 +0900 Message-Id: <1469441729-5817-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469441729-5817-1-git-send-email-yamada.masahiro@socionext.com> References: <1469441729-5817-1-git-send-email-yamada.masahiro@socionext.com> Cc: Tom Rini , Joe Hershberger Subject: [U-Boot] [PATCH v2 6/8] 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 --- Changes in v2: None 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 4edcb6c..5b1fa92 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -408,6 +408,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)