Skip to contentSkip to conversation

kbuild: Fix destination-y for installed headers

PATCH In review Jesper Nilsson 2 participants 2 messages Feb 2, 2013 – Feb 22, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: Fix destination-y for installed headers

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.

Cc Michal Marek <[email protected]>
Cc David Howells <[email protected]>
---
 Makefile.headersinst |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Makefile.headersinst +3 -3
index 06ba4a7..25f216a 100644
@@ -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)

/^JN - Jesper Nilsson

Signature · 1 line
               Jesper Nilsson -- [email protected]
#1 lore raw

scripts/Makefile.headersinst

Quoted 21 lines · Jesper Nilsson

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.

Cc Michal Marek <[email protected]>
Cc David Howells <[email protected]>
---
 Makefile.headersinst |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/Makefile.headersinst +0 -0

I applied your patch to kbuild.git#kbuild, but please send -p1 patches next time.

Michal