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: 149694 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4983704ljp; Mon, 29 Oct 2018 21:32:56 -0700 (PDT) X-Google-Smtp-Source: AJdET5dHeIxamICql7pz+/ja+NOtn4BQnq8v0AMbeOPsSFFO7brKYwLFnOxQR/M9AmHhbpAstnw/ X-Received: by 2002:a17:902:6e08:: with SMTP id u8-v6mr17090597plk.64.1540873976468; Mon, 29 Oct 2018 21:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540873976; cv=none; d=google.com; s=arc-20160816; b=C5en3UzI6eT9e7cQzelBbXTdu1FJ6oM+bM5KX05AdiY/lj4nown9axHlv5GbjJsL+4 k4iHiiVPwIUbeD6gRDc2QYR/BWT1Tjk+kfDNpyI2QHoZjpPYQnZjgt1f1tx5HI9kFTbD VY+GSuQxytEoB/P3yvu3tvawY3AHsW6/oqykGj0O+qs7IP6gUQ2AIciZptznelbFPGnn EsR8Ppvi2q13TXJy1cH12gG/vUefJDaWUWXie1h4BiS6qzMi2Qs0f4NeNcn129zxNOE3 XbozD1T1ssQ2HEG8ryLWy6G5esTxQt0EZ83jcPDAtzqAWHEBasGT8//HekNP/JuJGPeM MC1A== 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 m66-v6si24077280pfm.191.2018.10.29.21.32.56; Mon, 29 Oct 2018 21:32:56 -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 S1726105AbeJ3NYo (ORCPT + 32 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(-) -- 2.7.4 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