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: 103602 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp14346qgd; Sun, 11 Jun 2017 20:34:03 -0700 (PDT) X-Received: by 10.98.75.79 with SMTP id y76mr37131005pfa.39.1497238443337; Sun, 11 Jun 2017 20:34:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497238443; cv=none; d=google.com; s=arc-20160816; b=axtm/IZOzZI3s2ASH6cH0QStqLYyRy0CjJkcv0/txpd0LWjywqug2oTMEe0Sw9pFV2 5vxSlqvQSXpdfv+SOfHxnijFFhY3faCIBN9NAkl37/v12vYno/IQs2MxUzYckU0orWl7 uMo3TyK+O6tJMHmiKu5aNBj2iqU9kXQmqSWBC3M8s/a281xde4SN1Fj89dNaSRk89Kpm kZqrPSzN8o4Kf1e77hKChuAVeWdGjRn6BK3H+i6avVPaosD2DaYS+KBHFrw7iiwBfmWO 8qSYL+mSaQB1XboV1QfL9ZGwqzQvZ0I1qAJaKDxGBzI8kSKdMswV0IXPR67ci1yU3lyP lEYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=2IqFyR8TiFz13yNvWqHgOKuSOYFBvtN6S4wus31neu4=; b=RA2hWCDPwrDU9Ov3LYVF+FbguBegVlMLIRdo0MvJJEoGiBgcpq4WjpxONZLI9CC7rw Exn7Egd0MB1hTXX94LCmLh8wi8u0PW7C43Vm2rT7xL472G4ASaQXYlH6MtO3gB6qzbf3 0I8OzZBlRSAJQVtLRY4jrkuVvAgQAV5yrqo52eMHVdA9usVenDffO2xRJv+HSnkmCPKh 1jaYT2eiiOOFh/LaBCjse+jjojB3QYOmMDByqaVwKJUrl1TvXCZXyCtSZI/gbU74ic0u nh85ITUh7KWRloaEputRFFEmZsXhbzTW/8707PMBNDBgUqptU+hhdbmi6kq+dWs2Ch9W 2ycA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com; 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 f5si5998038plm.398.2017.06.11.20.34.03; Sun, 11 Jun 2017 20:34:03 -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; 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 S1752401AbdFLDde (ORCPT + 25 others); Sun, 11 Jun 2017 23:33:34 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.4 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))