Skip to contentSkip to conversation

fix scripts/mkcompile_h for non-bash shells

PATCH New Arkadiusz Miskiewicz 1 participant 1 message Jul 22, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix scripts/mkcompile_h for non-bash shells

With pdksh as /bin/sh

[root@arm linux-2.5.27]# make bzImage
make[1]: Wchodzę w katalog `/usr/src/linux-2.5.27/scripts'
make[1]: Opuszczam katalog `/usr/src/linux-2.5.27/scripts'
Starting the build. KBUILD_BUILTIN=1 KBUILD_MODULES=
make[1]: Wchodzę w katalog `/usr/src/linux-2.5.27/init'
Generating /usr/src/linux-2.5.27/include/linux/compile.hsed: can't read s/\(.\64\\).*/\1/: No such file or directory
sed: can't read s/\(.\64\\).*/\1/: No such file or directory
sed: can't read s/\(.\64\\).*/\1/: No such file or directory
(unchanged)
make[1]: Opuszczam katalog `/usr/src/linux-2.5.27/init'

That's due to expanding of sed expression done by shell:

[misiek@arm misiek]$ sh
[\u@\h \W]$ UTS_TRUNCATE='sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/' [\u@\h \W]$ echo $UTS_TRUNCATE
sed -e s/\(.\1\).*/\1/ s/\(.\$UTS_LEN\).*/\1/

This little change fixes that:

mkcompile_h Mon Jul 22 18:15:55 2002 renamed from mkcompile_h.org Mon Jul 22 18:15:33 2002 +3 -0
@@ -3,6 +3,9 @@
 SMP=$3
 CC=$4
 
+# Do not expand names
+set -f
+
 if [ -r ../.version ]; then
   VERSION=`cat ../.version`
 else
Signature · 2 lines
Arkadiusz Miśkiewicz   IPv6 ready PLD Linux at http://www.pld.org.pl
misiek(at)pld.org.pl   AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PWr