From patchwork Mon Jun 12 03:26:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 9780411 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 53F1960352 for ; Mon, 12 Jun 2017 03:34:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4277C1FF61 for ; Mon, 12 Jun 2017 03:34:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 369DB2018F; Mon, 12 Jun 2017 03:34:34 +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_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 B92311FF1D for ; Mon, 12 Jun 2017 03:34:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752256AbdFLDdb (ORCPT ); Sun, 11 Jun 2017 23:33:31 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:63914 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752049AbdFLD2F (ORCPT ); Sun, 11 Jun 2017 23:28:05 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id v5C3RXP3001077; Mon, 12 Jun 2017 12:27:38 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com v5C3RXP3001077 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1497238058; bh=2IqFyR8TiFz13yNvWqHgOKuSOYFBvtN6S4wus31neu4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q6+UDAVF4R8oKEYTCPbzF43N3EyAEyn/HjOLc+ByKEsaPdWtFF5JSny9G+kxAr/Wj tjYVeaTAYrz9jIQaiDCzFi0NMM8bqAnfx16fh05u+cPOVypsgzmdShp7U/zH7PkblC 43JwjaB3AZs2eFScLr60htDrWS/gagOmcany/bytDtLRwLCmngknjZ2n+ICdHvKw6h w9pF0yQ/H5S5YqpM47QlzmyK3Egq6TZsv1S13QR0g6iLLcqwXwPBoF92UbrRUGxULD DfPKMQFzvDaf5gebRWdGHo3FEsE1hDrx+e6LTCrW1kbRVM8nAtYubyqctsZmFSHLNZ pAs8IRaUI5rYg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org, linux-arch Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 03/27] kbuild: pass dst= to Makefile.headersinst from top Makefile Date: Mon, 12 Jun 2017 12:26:57 +0900 Message-Id: <1497238041-7011-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497238041-7011-1-git-send-email-yamada.masahiro@socionext.com> References: <1497238041-7011-1-git-send-email-yamada.masahiro@socionext.com> 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 We can always pass dst= from the top Makefile. This will simplify the logic in Makefile.headersinst. Signed-off-by: Masahiro Yamada --- Makefile | 4 ++-- scripts/Makefile.headersinst | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 298a096863a9..1bb8c07db134 100644 --- a/Makefile +++ b/Makefile @@ -1162,7 +1162,7 @@ PHONY += headers_install headers_install: __headers $(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \ $(error Headers not exportable for the $(SRCARCH) architecture)) - $(Q)$(MAKE) $(hdr-inst)=include/uapi + $(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst) PHONY += headers_check_all @@ -1171,7 +1171,7 @@ headers_check_all: headers_install_all PHONY += headers_check headers_check: headers_install - $(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1 + $(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include HDRCHECK=1 $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst) HDRCHECK=1 # --------------------------------------------------------------------------- diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index c801bc129635..b3135b76fac2 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst @@ -15,15 +15,13 @@ include scripts/Kbuild.include srcdir := $(srctree)/$(obj) subdirs := $(patsubst $(srcdir)/%/.,%,$(wildcard $(srcdir)/*/.)) -# caller may set destination dir (when installing to asm/) -_dst := $(if $(dst),$(dst),$(obj)) # Recursion __headers: $(subdirs) .PHONY: $(subdirs) $(subdirs): - $(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(_dst)/$@ + $(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(dst)/$@ # Skip header install/check for include/uapi and arch/$(hdr-arch)/include/uapi. # We have only sub-directories there. @@ -40,8 +38,7 @@ ifneq ($(wildcard $(old-kbuild-file)),) include $(old-kbuild-file) endif -installdir := $(INSTALL_HDR_PATH)/$(subst uapi/,,$(_dst)) - +installdir := $(INSTALL_HDR_PATH)/$(dst) gendir := $(objtree)/$(subst include/,include/generated/,$(obj)) header-files := $(notdir $(wildcard $(srcdir)/*.h)) header-files += $(notdir $(wildcard $(srcdir)/*.agh))