From patchwork Sat Feb 2 10:18:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesper Nilsson X-Patchwork-Id: 2083671 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 66A043FD2B for ; Sat, 2 Feb 2013 10:28:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755803Ab3BBK2Z (ORCPT ); Sat, 2 Feb 2013 05:28:25 -0500 Received: from ra.se.axis.com ([195.60.68.13]:50249 "EHLO ra.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755706Ab3BBK2Z (ORCPT ); Sat, 2 Feb 2013 05:28:25 -0500 X-Greylist: delayed 588 seconds by postgrey-1.27 at vger.kernel.org; Sat, 02 Feb 2013 05:28:25 EST Received: from localhost (localhost [127.0.0.1]) by ra.se.axis.com (Postfix) with ESMTP id 247302A350; Sat, 2 Feb 2013 11:18:37 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ra.se.axis.com Received: from ra.se.axis.com ([127.0.0.1]) by localhost (ra.se.axis.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id LMGYTSjESHkc; Sat, 2 Feb 2013 11:18:36 +0100 (CET) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by ra.se.axis.com (Postfix) with ESMTP id E6F202A34A; Sat, 2 Feb 2013 11:18:35 +0100 (CET) Received: from lnxjespern2.se.axis.com (lnxjespern2.se.axis.com [10.88.4.6]) by thoth.se.axis.com (Postfix) with ESMTP id 5F656341D1; Sat, 2 Feb 2013 11:18:35 +0100 (CET) Received: by lnxjespern2.se.axis.com (Postfix, from userid 363) id 5C688C069; Sat, 2 Feb 2013 11:18:35 +0100 (CET) Date: Sat, 2 Feb 2013 11:18:35 +0100 From: Jesper Nilsson To: Michal Marek , David Howells , linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, jespern@axis.com Subject: [PATCH] kbuild: Fix destination-y for installed headers Message-ID: <20130202101835.GY23529@axis.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Commit 10b63956fce7f369cc37fd4d994f09bd5203efe4 which plumbed in UAPI broke the destination-y functionality of scripts/Makefile.headersinst. The variable destination-y is used in a := assignment and so is expanded at declaration time, and the include of the Kbuild fragments that set destination-y to something is after this time, so it now always expands empty. There are no in-tree users of destination-y, but it allows any Kbuild-fragment to redirect where headers are installed. Just move the assignment of the variable that uses it below the include of the Kbuild fragment. Signed-off-by: Jesper Nilsson Cc: Michal Marek Cc: David Howells --- Makefile.headersinst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) /^JN - Jesper Nilsson diff --git scripts/Makefile.headersinst scripts/Makefile.headersinst index 06ba4a7..25f216a 100644 --- scripts/Makefile.headersinst +++ scripts/Makefile.headersinst @@ -7,15 +7,15 @@ # # ========================================================================== -# called may set destination dir (when installing to asm/) -_dst := $(or $(destination-y),$(dst),$(obj)) - # generated header directory gen := $(if $(gen),$(gen),$(subst include/,include/generated/,$(obj))) kbuild-file := $(srctree)/$(obj)/Kbuild include $(kbuild-file) +# called may set destination dir (when installing to asm/) +_dst := $(or $(destination-y),$(dst),$(obj)) + old-kbuild-file := $(srctree)/$(subst uapi/,,$(obj))/Kbuild ifneq ($(wildcard $(old-kbuild-file)),) include $(old-kbuild-file)