Skip to content

Commit

Permalink
kbuild: Fix destination-y for installed headers
Browse files Browse the repository at this point in the history
Commit 10b6395 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 <[email protected]>
Cc: Michal Marek <[email protected]>
Cc: David Howells <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
jniax authored and michal42 committed Feb 22, 2013
1 parent 03b25b4 commit 9b58b92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/Makefile.headersinst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9b58b92

Please sign in to comment.