From patchwork Tue Oct 30 04:32:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10660457 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4829B13A4 for ; Tue, 30 Oct 2018 04:32:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35C312A183 for ; Tue, 30 Oct 2018 04:32:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28A172A18E; Tue, 30 Oct 2018 04:32:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE2312A183 for ; Tue, 30 Oct 2018 04:32:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725969AbeJ3NYo (ORCPT ); Tue, 30 Oct 2018 09:24:44 -0400 Received: from conuserg-08.nifty.com ([210.131.2.75]:56537 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725913AbeJ3NYo (ORCPT ); Tue, 30 Oct 2018 09:24:44 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id w9U4WnvQ003100; Tue, 30 Oct 2018 13:32:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w9U4WnvQ003100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1540873970; bh=+8ddtq0AgqiqOK40ie+JuQepMzfAFUIpNeNrg5kFe4U=; h=From:To:Cc:Subject:Date:From; b=ZctKWaIDDiJa3BrrCWXR8I2TQhVdiGm89pQmfB+t1dqka3HF5MYIX9RMHafynBGay EBz03ZKl63pl8brNMA04o7rjxg20+eNr5U+xuyxBn/UhDdl5qXOOhhI8OlOPs5Wc8G Bi3IFHTtZIETu2+Sb3qcbj/h/OAcblscxCwc/NyZ9exl9wQr5zEaVQxyh1l5wcY9Iv GmhMGHIMUvdmzbAoRopK5aPNIMBdumtCtZ87I3Mj5rflCfwRMiEnxsRNpKNqh+Lj+r cTXSPGfxmoZD56XXP5WQyTbRK+266jtdJ9qYqczHIj00zHKM4gNpK7VgSjqbilF248 dnH3OCAHIUBFg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: consolidate single targets Date: Tue, 30 Oct 2018 13:32:45 +0900 Message-Id: <1540873965-31342-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Instead of specifying target/source pairs, let's list patterns that we want to handle as single targets. This slightly changes the behavior; the top Makefile previously checked the presence of a source file, now Kbuild will descend into a subdirectory anyway to find out what to do there. Signed-off-by: Masahiro Yamada --- Makefile | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/Makefile b/Makefile index be76e6e..7d13add 100644 --- a/Makefile +++ b/Makefile @@ -1713,21 +1713,7 @@ else target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@)) endif -%.s: %.c prepare scripts FORCE - $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -%.i: %.c prepare scripts FORCE - $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -%.o: %.c prepare scripts FORCE - $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -%.lst: %.c prepare scripts FORCE - $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -%.s: %.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 - $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -%.ll: %.c prepare scripts FORCE +%.i %.ll %.lst %.o %.s %.symtypes: prepare scripts FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) # Modules