kbuild: Fix reading of .config in link-vmlinux.sh
authorMichal Marek <mmarek@suse.cz>
Mon, 25 Feb 2013 12:47:53 +0000 (13:47 +0100)
committerMichal Marek <mmarek@suse.cz>
Mon, 25 Feb 2013 15:14:48 +0000 (16:14 +0100)
The shell '.' command is not required to search the current directory as
a fallback and in fact newer versions of bash in sh-mode do not do this.
Force reading the file from the current directory if $KCONFIG_CONFIG
contains no '/'.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/link-vmlinux.sh

index e62f1e000a7b5148167e76c128a6a08150804e24..3d569d6022c296c7bc5ba4e0162279f4c9dc832c 100644 (file)
@@ -132,7 +132,14 @@ if [ "$1" = "clean" ]; then
 fi
 
 # We need access to CONFIG_ symbols
-. ${KCONFIG_CONFIG}
+case "${KCONFIG_CONFIG}" in
+*/*)
+       . "${KCONFIG_CONFIG}"
+       ;;
+*)
+       # Force using a file from the current directory
+       . "./${KCONFIG_CONFIG}"
+esac
 
 #link vmlinux.o
 info LD vmlinux.o