Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3020011imm; Fri, 20 Jul 2018 08:47:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpct0hFpM2pIAVJUpa70vJGekF/W/r5lBizZ/1LGVOx7ueXu1/I9PFnpWOySuOF/xLRl7xY4 X-Received: by 2002:a63:fa48:: with SMTP id g8-v6mr2617252pgk.224.1532101628857; Fri, 20 Jul 2018 08:47:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532101628; cv=none; d=google.com; s=arc-20160816; b=sLhHnvDK4JDj9H83/W6RU0BNh9vAA6gF+p+kPXFHW+4uqHOIWEa6lhhcekiETwaTtB yHS0N/q0h/+cwd+z8cBFcT/+UI8MVrINfooSrdo72RwQJwcA65eQzDGHtTlFZLSegtr+ jlftcSlcQjf5J8/af8FwwoI4kGJDpqfE8wf/utpssSub4dgcUhtspti9rt7yARRq8V0a tibCsAcJFxpQzZxAf1ziX/VcC17DBBen7MRB7X7RMmz5HjHYTptUtDtgo6JQghtrHOvO S0705h1lQXs+j5WzPXY9LIG4v/4Pv+btf9hxVthIsYgtRARHy6oFYTr4qfRlG1q9GHl3 IuTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=xYfzARod4Z93GqNt+a7kVo2C8zGqjl0Q16aIDyZnvGk=; b=vLw8iV0dTXoO8xJj5N6SgZ/32txc0SGdxKqk3aASS8AGaxmFedLUn+EI1eMqKgFFD+ TXArKFJmDq9d0XqPvt9TB6eA5xMwOpyeTU5DittJJ05+0A16NVbMruE4D6GwxeKvWZFx ZgEP7TLysdBP04lp4gUsB2ThwCHr8KYjOJrgwRePMi9kjWpM+A4YEtRotOekS+SZXLUY eB+xuCDPVv5MgEpeeH6ZzV3S+UUQS0yZjqyNMCcjkwIc1YN7unFq2NiAYPBp7VaYZIb+ kRaOoLGCk+WWRp0dr8xuhTj9FZdSRGSHC/dfO9sRkXfzN2wcaG94YQiBv++rc4V6GyeT WctQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s195-v6si817388pgs.492.2018.07.20.08.46.53; Fri, 20 Jul 2018 08:47:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387805AbeGTQeQ (ORCPT + 99 others); Fri, 20 Jul 2018 12:34:16 -0400 Received: from gate.crashing.org ([63.228.1.57]:39561 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731583AbeGTQeQ (ORCPT ); Fri, 20 Jul 2018 12:34:16 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w6KFioSU030427; Fri, 20 Jul 2018 10:44:50 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id w6KFinQv030424; Fri, 20 Jul 2018 10:44:49 -0500 Date: Fri, 20 Jul 2018 10:44:49 -0500 From: Segher Boessenkool To: Joe Perches Cc: Dirk Gouders , Andy Whitcroft , Masahiro Yamada , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] checkpatch: kbuild: if_changed: check for multiple calls in targets Message-ID: <20180720154449.GC16221@gate.crashing.org> References: <20180720074804.4160-1-dirk@gouders.net> <01cfa83d2e29667d311d679c904b1648cd35c614.camel@perches.com> <20180720152150.GB16221@gate.crashing.org> <4977e9adba5e826d5e7e9f503e3ce8fbaa872af5.camel@perches.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4977e9adba5e826d5e7e9f503e3ce8fbaa872af5.camel@perches.com> User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 20, 2018 at 08:33:56AM -0700, Joe Perches wrote: > On Fri, 2018-07-20 at 10:21 -0500, Segher Boessenkool wrote: > > On Fri, Jul 20, 2018 at 03:06:37AM -0700, Joe Perches wrote: > > > On Fri, 2018-07-20 at 09:48 +0200, Dirk Gouders wrote: > > > > + # Check for multiple calls of if_changed within a target in Makefiles > > > > + if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) && > > > > > > The uses of .* here are superfluous. > > > > And it looks like you wanted to match this only at the beginning of the > > string, which would be /^Makefile/ etc. > > Nope. > > $realfile includes path and /^Makefile/ matches only the > top level Makefile and none of the ones in subdirectories. Then the .* is more mysterious :-) (Maybe the script should use File::Basename). Segher