From patchwork Thu Dec 10 16:33:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wang yanqing X-Patchwork-Id: 7819901 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0DAB59F387 for ; Thu, 10 Dec 2015 16:34:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 273872010C for ; Thu, 10 Dec 2015 16:34:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 22C87205B4 for ; Thu, 10 Dec 2015 16:34:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751527AbbLJQeb (ORCPT ); Thu, 10 Dec 2015 11:34:31 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:35454 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750945AbbLJQea (ORCPT ); Thu, 10 Dec 2015 11:34:30 -0500 Received: by pfu207 with SMTP id 207so50505255pfu.2; Thu, 10 Dec 2015 08:34:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; bh=Cgt2T1jei5KUlA6WdZj12k08VRr4ScxToC/BcQcRP+c=; b=q6/A8lwoHdKDkLRTGLN8e1SrzIPL5w6KpY5aNqo2t7KRZuZhikmYpen6mHUbZNbuQg 5CzzWgRiPZKP+TM0L5zP1jmArLge73eArY2S4kQDwDPEM8Dp0JDSoebC55AwVrEoHwL5 5FgZdvbW56t3h4M6HvAn9lhvUiVP2+aOsY9AvhKg+ulFsd4xFaJqL4GHnNfP99/pFS21 A/acPoQukoQfP4I/+oVrODNzxSTCNDD7BJsTad9lZ251Ulc0im3YndSIRKWtDuP+/4lk ZaDmGmBhbXWuTMPDvnMsE1TjxrITDusDM3cGrC/vrweOKhBrEdkrbrbQXnoUVZKROFEx o9/Q== X-Received: by 10.98.65.76 with SMTP id o73mr8171475pfa.119.1449765270279; Thu, 10 Dec 2015 08:34:30 -0800 (PST) Received: from udknight.localhost ([218.66.143.113]) by smtp.gmail.com with ESMTPSA id 72sm19565205pfi.33.2015.12.10.08.34.28 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Dec 2015 08:34:29 -0800 (PST) Received: from udknight.localhost (udknight.com [127.0.0.1]) by udknight.localhost (8.14.4/8.14.4) with ESMTP id tBAGXULm018961; Fri, 11 Dec 2015 00:33:30 +0800 Received: (from root@localhost) by udknight.localhost (8.14.4/8.14.4/Submit) id tBAGXUvq018958; Fri, 11 Dec 2015 00:33:30 +0800 Date: Fri, 11 Dec 2015 00:33:29 +0800 From: Wang YanQing To: mmarek@suse.com Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: support make dir/file.i for *.S Message-ID: <20151210163329.GA18947@udknight> Mail-Followup-To: Wang YanQing , mmarek@suse.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This feature could reduce a little time to expand all the macros in *.S for reading. Signed-off-by: Wang YanQing --- Makefile | 2 ++ scripts/Makefile.build | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 7558c9c..d7e2060 100644 --- a/Makefile +++ b/Makefile @@ -1552,6 +1552,8 @@ endif $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) %.s: %.S prepare scripts FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) +%.i: %.S prepare scripts FORCE + $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) %.o: %.S prepare scripts FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) %.symtypes: %.c prepare scripts FORCE diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 2c47f9c..2a51d49 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -287,6 +287,12 @@ cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< $(obj)/%.s: $(src)/%.S FORCE $(call if_changed_dep,as_s_S) +quiet_cmd_cc_i_S = CPP $(quiet_modtag) $@ +cmd_cc_i_S = $(CPP) $(a_flags) -o $@ $< + +$(obj)/%.i: $(src)/%.S FORCE + $(call if_changed_dep,cc_i_S) + quiet_cmd_as_o_S = AS $(quiet_modtag) $@ cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $<