提交 5d6b423c 编写于 作者: S Stefan Weil 提交者: Blue Swirl

win32: Fix CRLF problem in make_device_config.sh

QEMU source code with CRLF line endings
which is quite common on windows hosts
fails with current make_device_config.sh.

The awk script gets the name of the included
file with \r, so instead of pci.mak it will
search for pci.mak\r which of course does
not work.

Fix this by removing any \r.

v2:
    Avoid using sub() and \r with awk because they are unsupported
    on some platforms. Use tr to remove \r. This new solution
    improves portability and was suggested by Paolo Bonzini.
Signed-off-by: NStefan Weil <weil@mail.berlios.de>
Acked-by: NAndreas Färber <andreas.faerber@web.de>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 86d1c388
......@@ -18,7 +18,7 @@ process_includes () {
f=$src
while [ -n "$f" ] ; do
f=`awk '/^include / {ORS=" " ; print "'$src_dir'/" $2}' $f`
f=`tr -d '\r' < $f | awk '/^include / {ORS=" "; print "'$src_dir'/" $2}'`
[ $? = 0 ] || exit 1
all_includes="$all_includes $f"
done
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册