From patchwork Mon Oct 24 12:45:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 9392007 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6BE8460762 for ; Mon, 24 Oct 2016 12:45:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 517B328FBB for ; Mon, 24 Oct 2016 12:45:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4386C2900E; Mon, 24 Oct 2016 12:45:37 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 21CED28FBB for ; Mon, 24 Oct 2016 12:45:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932824AbcJXMpf (ORCPT ); Mon, 24 Oct 2016 08:45:35 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34633 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932372AbcJXMpe (ORCPT ); Mon, 24 Oct 2016 08:45:34 -0400 Received: by mail-pf0-f194.google.com with SMTP id 128so16556804pfz.1; Mon, 24 Oct 2016 05:45:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=GqXzb6WLlEFzpelQKOT8LDy4aAitb371aCNhBbQNbYI=; b=R/wTesvJa4Ad3RCwiEr1beIZYfqLCqnO21cRtGWoZfe9vX3VOXTZifX/iHIrRr7bzh Gf/a7XOiu0jCiusGi9gVBtRc1JWKv1ohruG9+N7v7pGhIJL/eP1oynDbGnrrdSng4h0N CP7IfipwQf3jZ2/jwAR34m7cJCmoiYnAJfG5EgORWFoUMK1yGAlchw7Cu0NU/MApSRii NF9c+kyz15IVBedEunhAssoMVY3y9QudH5yl/ez9LcJqXgCssCxAuG/blAlJ/IOTmKsz hxDF7Fx8bOWG2h165FlRxwKBeDtGcQYqfRfzmKrztQSLVDsvumNqUJ24RHp20V+PfAey hjQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GqXzb6WLlEFzpelQKOT8LDy4aAitb371aCNhBbQNbYI=; b=kldoQ4twA4Vz+GBSoO6o4QmBqb8x8cZTJoNVaFK2Xtp0IjN1a4QqqSKY2EfOwkh20W MpC8yPDmhgdzarU57GDuS2CvqLU0hDCSwHwHEeC83DD0MUWFvTPGfaFlyZ7wb0l9nJHF VcWOzSu0S81lQXkKDMbCPKlUXKH2ZEMi8eERcX1Ytxy9rKawTzyuN+dezsnHbPzYY+B1 KD4OrDLSsACXMZhXTLEUAW9rePrGPnqkBx6+9URENl2JcrpnjPrfZwvKOWaHy14XX0km 8GZQW28Ch1DeCjWiqiLa6GNNJqXoB/mlaA+qP34o8FZe81STI0R6y0EPKiktTO+QdA01 qd2Q== X-Gm-Message-State: ABUngvdjlQI54QcXbxSNfspZLI6O2AkpT8jWDcRlqa0ov/ypBNS0p7zZMFBN1+8dZScZuA== X-Received: by 10.99.115.18 with SMTP id o18mr23777699pgc.44.1477313132061; Mon, 24 Oct 2016 05:45:32 -0700 (PDT) Received: from localhost ([45.32.44.20]) by smtp.gmail.com with ESMTPSA id c2sm25406775pal.42.2016.10.24.05.45.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Oct 2016 05:45:31 -0700 (PDT) From: Wei Yang To: mmarek@suse.com Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Wei Yang Subject: [PATCH] kbuild: add %/built-in.o target in top Makefile Date: Mon, 24 Oct 2016 12:45:11 +0000 Message-Id: <1477313111-25205-1-git-send-email-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.5.0 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 Current kbuild just supports building built-in.o in second directory level individually. There is no rule to build those built-in.o targets below third directory level. Even current kbuild system could achieve this with rule "%/", while this not only builds built-in targes but also lib target, extra target and module objects. This patch adds the "%/built-in.o" rule so that each built-in.o in the kernel tree could be the build target, which looks more consistent for the kbuild system. Signed-off-by: Wei Yang --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index addb235..546998e 100644 --- a/Makefile +++ b/Makefile @@ -1627,6 +1627,8 @@ endif $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) %.symtypes: %.c prepare scripts FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) +%/built-in.o: prepare scripts + $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) # Modules /: prepare scripts FORCE