* [PATCH v2] kbuild: Do not use hyphen in exported variable name
@ 2017-08-19 21:30 Ben Hutchings
2017-08-20 12:55 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2017-08-19 21:30 UTC (permalink / raw)
To: linux-kbuild; +Cc: debian-kernel, Masahiro Yamada
[-- Attachment #1: Type: text/plain, Size: 1585 bytes --]
This definition in Makefile.dtbinst:
export dtbinst-root ?= $(obj)
should define and export dtbinst-root when handling the root dts
directory, and do nothing in the subdirectories. However some shells,
including dash, will not pass through environment variables whose name
includes a hyphen. Usually GNU make does not use a shell to recurse,
but if e.g. $(srctree) contains '~' it will use a shell here.
Rename the variable to dtbinst_root.
References: https://bugs.debian.org/833561
Fixes: 323a028d39cdi ("dts, kbuild: Implement support for dtb vendor subdirs")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
v2: Revised the commit message to explain exactly how the hyphenated
variable can be lost.
scripts/Makefile.dtbinst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
index 34614a48b717..993fb85982df 100644
--- a/scripts/Makefile.dtbinst
+++ b/scripts/Makefile.dtbinst
@@ -14,7 +14,7 @@ src := $(obj)
PHONY := __dtbs_install
__dtbs_install:
-export dtbinst-root ?= $(obj)
+export dtbinst_root ?= $(obj)
include include/config/auto.conf
include scripts/Kbuild.include
@@ -27,7 +27,7 @@ dtbinst-dirs := $(dts-dirs)
quiet_cmd_dtb_install = INSTALL $<
cmd_dtb_install = mkdir -p $(2); cp $< $(2)
-install-dir = $(patsubst $(dtbinst-root)%,$(INSTALL_DTBS_PATH)%,$(obj))
+install-dir = $(patsubst $(dtbinst_root)%,$(INSTALL_DTBS_PATH)%,$(obj))
$(dtbinst-files): %.dtb: $(obj)/%.dtb
$(call cmd,dtb_install,$(install-dir))
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] kbuild: Do not use hyphen in exported variable name
2017-08-19 21:30 [PATCH v2] kbuild: Do not use hyphen in exported variable name Ben Hutchings
@ 2017-08-20 12:55 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2017-08-20 12:55 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Linux Kbuild mailing list, debian-kernel
2017-08-20 6:30 GMT+09:00 Ben Hutchings <ben@decadent.org.uk>:
> This definition in Makefile.dtbinst:
>
> export dtbinst-root ?= $(obj)
>
> should define and export dtbinst-root when handling the root dts
> directory, and do nothing in the subdirectories. However some shells,
> including dash, will not pass through environment variables whose name
> includes a hyphen. Usually GNU make does not use a shell to recurse,
> but if e.g. $(srctree) contains '~' it will use a shell here.
>
> Rename the variable to dtbinst_root.
>
> References: https://bugs.debian.org/833561
> Fixes: 323a028d39cdi ("dts, kbuild: Implement support for dtb vendor subdirs")
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> v2: Revised the commit message to explain exactly how the hyphenated
> variable can be lost.
>
Thanks for figuring out the root cause!
Applied to linux-kbuild/fixes.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-20 12:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-19 21:30 [PATCH v2] kbuild: Do not use hyphen in exported variable name Ben Hutchings
2017-08-20 12:55 ` Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.