Commit 9b58b928 authored by Jesper Nilsson's avatar Jesper Nilsson Committed by Michal Marek

kbuild: Fix destination-y for installed headers

Commit 10b63956 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: default avatarJesper Nilsson <jesper.nilsson@axis.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent 03b25b47
...@@ -7,15 +7,15 @@ ...@@ -7,15 +7,15 @@
# #
# ========================================================================== # ==========================================================================
# called may set destination dir (when installing to asm/)
_dst := $(or $(destination-y),$(dst),$(obj))
# generated header directory # generated header directory
gen := $(if $(gen),$(gen),$(subst include/,include/generated/,$(obj))) gen := $(if $(gen),$(gen),$(subst include/,include/generated/,$(obj)))
kbuild-file := $(srctree)/$(obj)/Kbuild kbuild-file := $(srctree)/$(obj)/Kbuild
include $(kbuild-file) 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 old-kbuild-file := $(srctree)/$(subst uapi/,,$(obj))/Kbuild
ifneq ($(wildcard $(old-kbuild-file)),) ifneq ($(wildcard $(old-kbuild-file)),)
include $(old-kbuild-file) include $(old-kbuild-file)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment