我正在尝试从源代码构建 Bochs。因此,我写了一个配置脚本。我没有从头开始编写脚本 - 它基于 Bochs tarball 中的 .conf.win32-vcpp
sh 脚本。导致问题的脚本部分是原始 Nochs tarball 没有任何变化 - 我没有写那部分。
我的问题:
每次执行 sh 脚本时,都会出现以下错误:
[...]
config.status: creating host/linux/pcidev/Makefile
config.status: creating config.h
config.status: creating ltdlconf.h
config.status: ltdlconf.h is unchanged
FIND: Parameterformat falsch
*(Parameterformat falsch 表示参数格式不正确)
但是我不需要执行大厅脚本。摩擦片段就足够了:
sh-4.1$ find -name Makefile
FIND: Parameterformat falsch
*(Parameterformat falsch 表示参数格式不正确)
我的问题:
- 那个脚本片段有什么问题:
find 。 -名称生成文件
?有什么想法吗? - 如何重写这部分代码以使其正常工作?
我的脚本:
#!/bin/sh
set echo
./configure --target=pentium-windows \
--enable-sb16 \
--enable-ne2000 \
--enable-all-optimizations \
--enable-cpu-level=6 \
--enable-x86-64 \
--enable-pci \
--enable-clgd54xx \
--enable-usb \
--enable-usb-ohci \
--enable-show-ips \
--enable-disasm \
--enable-iodebug \
--enable-logging \
--enable-debugger-gui \
--disable-readline \
--without-x \
--with-win32 \
--with-rfb \
--with-nogui \
--with-wx
unset echo
# Fix up all makefiles so that nmake can handle them.
--> 狗被埋的地方:
for i in `find . -name Makefile`; do
echo Removing curly brackets in $i for NMAKE.
mv $i $i.tmp
sed -e 's/{/(/g' -e 's/}/)/g' < $i.tmp > $i
rm -f $i.tmp
done
我的环境:
我不知道这是否重要,但我没有使用普通的 bash。我使用 cygwin 的 sh
命令 (Win64) 提供的 shell。
谢谢。
最佳答案
确保您的 Cygwin 安装包括 findutils
包,并且 Cygwin 的 find
在您的 PATH
中位于第一个(在 native Windows 之前) .
如果 find --help
返回 FIND: Paramater format not correct
(或您本地化的等效项),这是 Windows 版本的明确标志,而不是Cygwin 一个,目前正在使用中。
关于bash - 找到(1): "Parameter format not correct" under CygWin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10839568/