Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4244690imd; Mon, 29 Oct 2018 21:33:32 -0700 (PDT) X-Google-Smtp-Source: AJdET5eq/MeScZs6c5hmvr9d7JEVTpHkkCJVKDVT9F0oUil17DW5lgGMQ2AVKKmEyV2yyfQcl0RT X-Received: by 2002:a62:8915:: with SMTP id v21-v6mr1336706pfd.137.1540874012721; Mon, 29 Oct 2018 21:33:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540874012; cv=none; d=google.com; s=arc-20160816; b=QMeeoEuz7mEACUjf7/NFW9vRhitMuoBFtyKjcpwCFQVSsAhlqT1GawHaB5LwJpcrst b3oHXSS17GoEi1ETdbjj0H7s6/PV3OrW7cRDbU72kpKDvq+2lhGpK4CTmixxHh8m4ufk hEV74feoNI22KfpbC+RL1F3C1QZMuU6HyZWswNAItKi8Xxk9ykK850T96IztlQMIAoKo DvVaWh8e92VlEWGcY3Qnf3yiij0pX5smsCYx99onoHr/bL921oliVtHEEYNxVyxsaZ7g OjIznBWDk/MKoWubgW7f/LaQ7a1P3w235Tr6hJb+bLVAspLWzu8x5390u8yGfTpzASqx RrAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=+8ddtq0AgqiqOK40ie+JuQepMzfAFUIpNeNrg5kFe4U=; b=QtJGk74mpKKPRsQbXrIU611U+q+iTalVZKpZm7lA7RBp43NfM/xcJ48mEm4Yya2IcK 4JQEuzwgTmQcC+migPorwfANJBKoonWGKPDW63TP0tNCj9AQX1hB2L62C3jk1FWshV50 vAXnCUD9+D3inkpcQwq5EAvudakT+9YKJkl73HoOCa48AVfpheYg420NaoQVBoXtMSlG gO5cnuvSbrZPl40bJOFakg47lzbVEbpuOv1d+cwS4oW3CQs+x5s8GlemP1QWBYbeutOw XsToIJHM08M2p1IHr4na4cfyAXacW59VzgIJomVuASd5lpOVd3ONh34kqS2BjUGjhKzh tQYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ZctKWaID; 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 w19-v6si23334328pgf.197.2018.10.29.21.33.15; Mon, 29 Oct 2018 21:33:32 -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=ZctKWaID; 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 S1726061AbeJ3NYo (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.7.4