From patchwork Wed Aug 8 02:14:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10559405 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 CDB3C139A for ; Wed, 8 Aug 2018 02:15:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9886290BB for ; Wed, 8 Aug 2018 02:15:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B52A29381; Wed, 8 Aug 2018 02:15:03 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,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 492BC290BB for ; Wed, 8 Aug 2018 02:15:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726447AbeHHEcT (ORCPT ); Wed, 8 Aug 2018 00:32:19 -0400 Received: from conuserg-11.nifty.com ([210.131.2.78]:37728 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726158AbeHHEcS (ORCPT ); Wed, 8 Aug 2018 00:32:18 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id w782EIlo004152; Wed, 8 Aug 2018 11:14:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w782EIlo004152 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1533694459; bh=lz55LlsaXOwcAuOwTiLk3BFAF92eA/fNIvzieH95kvw=; h=From:To:Cc:Subject:Date:From; b=GO1LCVSLWopwYoCoiJZX8oZIBU7+wyXtGE5M94hh+4WZmxWofcE3koPRtxGHeBFvx R7Sd3AtjKhNxl2Fvmb1YLukqkppsw5qqqhby0ApJ9dK5CI+Lf/h5AgUcGgxLWHsoNE IzG2fCNbB1ZSBphDh3CkjI77cHAPFcz89BRd4rgDHBELuVmKf71/lUT3Tsp7MfRwk4 Cq3YZegLyGdACCMpHqws4H7hqWDY42s5g09odQa/2I3YncB6qbLE5ggqkYOuDvMYG/ lQwUk32H8w6gFWP/MsCiCubofBDbYm6XY1j66RnxBxwAFDimCnfcUSeuP1H5Qb6HjC hCn1eJ0QbOjMg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: David Howells Cc: Stephen Rothwell , Arnd Bergmann , linux-kbuild@vger.kernel.org, Al Viro , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2] kbuild: make samples really depend on headers_install Date: Wed, 8 Aug 2018 11:14:14 +0900 Message-Id: <1533694454-7086-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 Kernel headers must be installed into $(objtree)/usr/include to avoid the build failure of samples. Commit ddea05fa148b ("kbuild: make samples depend on headers_install") addressed this, but "samples/" is only used for the single target build. "make samples/" properly installs kernel headers, but it does not work for general building because a phony target "sample" (no trailing slash) is used. Reported-by: David Howells Signed-off-by: Masahiro Yamada Tested-by: David Howells --- Changes in v2: - Correct commit log (backslash -> slash) - Fix a typo Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7a3c454..1e47d13 100644 --- a/Makefile +++ b/Makefile @@ -1009,9 +1009,10 @@ ifdef CONFIG_GDB_SCRIPTS endif +$(call if_changed,link-vmlinux) -# Build samples along the rest of the kernel +# Build samples along the rest of the kernel. This needs headers_install. ifdef CONFIG_SAMPLES vmlinux-dirs += samples +samples: headers_install endif # The actual objects are generated when descending,