From patchwork Tue Jun 4 10:14:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 165732 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp5638347ili; Tue, 4 Jun 2019 03:15:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNqABUBmwCHWqOcJZQsGXqCXvpyPNiMWtVCgiOvYnPcEsUVGmciadENA3bdKP/6j+XxufI X-Received: by 2002:a17:902:b495:: with SMTP id y21mr35047796plr.243.1559643341972; Tue, 04 Jun 2019 03:15:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559643341; cv=none; d=google.com; s=arc-20160816; b=hK4nQpeSRhwRRl3G2Z5GWXeNE4Qhca4LZ13E9UtIOsMX1hcoFb3v+/KMuPW1AAHU5f baIm+RdPvId7v5OmNGkbuqKlbgGJc3OUiYV3YT8NeMhQd/7vkK11EYC/6+2KBT23ewzT SjsCG2qF5JjpyH0xnYWCjaxoYRNDQ114WktlxmBXkE2WzZNrLIbHhKbfFFtXEj86o9Zl wcxUqD85XEAuaCDkRC4X+zLkZdUnsajwjkRrzbOVpQETYXTXC/vaxf1gV/iiY2e4zFwL 8/YkoYUxoWl3tZPJ/k5uVwIKEkaVsb+sqID7kOApcIThNGRWnD9kdyHeRSPGYr2QuY9Q KFoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=ZW8oJHHCyujAucqOHf5owysxupf7VvOq0sufCbzCWAs=; b=tMOr3sMYwWPnBIrkTfbSgy90w16janyRtN7GgZV9FsixvqFlS4rqf4wcjRolhu0MQb 3GjXDHlt7PrkG5qzjBrsQJczV6GujF5PKrH2842HzvviD5tKBH5zza6C4eNNtP0UKIFH O6ckLZXBMVpPXzsUDXYHoH/epm916H7ST1MW1DEU0dtc0Me1SAPdb2SU/yWIMEG4Kjq3 jxnF+AjkyQafRMAZrqirdmL4nC0k6Fh7N23rAlu+vspCtnTNJE5EwnSV3pnu08sTrjl1 NBrC2GoV4iu4/BPNhWKPoV5wSYhhnXKXl83AgO6u/ZXouMW4WDZkCz7tHadkfzRjWLpx W0bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=bbpYgPT7; 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 h1si23704034pld.439.2019.06.04.03.15.41; Tue, 04 Jun 2019 03:15:41 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=bbpYgPT7; 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 S1727335AbfFDKPk (ORCPT + 30 others); Tue, 4 Jun 2019 06:15:40 -0400 Received: from conuserg-08.nifty.com ([210.131.2.75]:39195 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727110AbfFDKPk (ORCPT ); Tue, 4 Jun 2019 06:15:40 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x54AEC7H032511; Tue, 4 Jun 2019 19:14:24 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x54AEC7H032511 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1559643264; bh=ZW8oJHHCyujAucqOHf5owysxupf7VvOq0sufCbzCWAs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bbpYgPT74iM32GjIo997UUOMQ9vWoTSw0PoW8PZguSq4D/k4Va2cIhN41x4E1gqUs TyHDXxYIBw3dMAdm680pEiOiWDdi6V3+qS1+xCwR+mYrtpQrppDU92JOzHssuABdV0 8mI/ysv69ZyRQoCZtdqeDFvHMnBRtjSyz0CEj9KWEc8CFZZsiCK2IaIF0WcZ9m1BYs Gfn2gx5QOX8qnqhtGKPXgyJ0Em7H+AT95vylOg8HAVkgjXLsWsUcFTi/1GHlvJbMEb sygylFj+vTiTtZQCbfEOTVMKaf73xjlVnE2MPUQc7Ya5gm+lnZpVvPPXR2OsvZBYaj ittJ4YlSEshHw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Randy Dunlap , Arnd Bergmann , David Howells , Sam Ravnborg , Jani Nikula , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 11/15] kbuild: simplify scripts/headers_install.sh Date: Tue, 4 Jun 2019 19:14:05 +0900 Message-Id: <20190604101409.2078-12-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190604101409.2078-1-yamada.masahiro@socionext.com> References: <20190604101409.2078-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that headers_install.sh is invoked per file, remove the for-loop in the shell script. Signed-off-by: Masahiro Yamada --- scripts/Makefile.headersinst | 2 +- scripts/headers_install.sh | 48 +++++++++++++++--------------------- 2 files changed, 21 insertions(+), 29 deletions(-) -- 2.17.1 diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index c96c4c26e240..d2b572a7a628 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst @@ -58,7 +58,7 @@ $(if $(new-dirs), $(shell mkdir -p $(new-dirs))) ifndef HDRCHECK quiet_cmd_install = HDRINST $@ - cmd_install = $(CONFIG_SHELL) $(srctree)/scripts/headers_install.sh $(@D) $(@@ + s/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g + s/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g + s@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @ +' $INFILE > $TMPFILE || exit 1 -FILE= -trap 'rm -f "$OUTDIR/$FILE" "$OUTDIR/$FILE.sed"' EXIT -for i in "$@" -do - FILE="$(basename "$i")" - sed -E \ - -e 's/([[:space:](])(__user|__force|__iomem)[[:space:]]/\1/g' \ - -e 's/__attribute_const__([[:space:]]|$)/\1/g' \ - -e 's@^#include @@' \ - -e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g' \ - -e 's/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g' \ - -e 's@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @' \ - "$SRCDIR/$i" > "$OUTDIR/$FILE.sed" || exit 1 - scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ "$OUTDIR/$FILE.sed" \ - > "$OUTDIR/$FILE" - [ $? -gt 1 ] && exit 1 - rm -f "$OUTDIR/$FILE.sed" -done +scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ $TMPFILE > $OUTFILE +[ $? -gt 1 ] && exit 1 + +rm -f $TMPFILE trap - EXIT