$ git diff
warning: LF will be replaced by CRLF in .config.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .config.old.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .kconfig.d.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in include/autoconf.h.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in scripts/Kbuild.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in scripts/basic/.docproc.cmd.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in scripts/basic/.fixdep.cmd.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in scripts/basic/.split-include.cmd.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in scripts/gen_build_files.sh.
The file will have its original line endings in your working directory
不要让 git 改变回车换行,也就是Linux 本身的回车换行,拉下来时 windows git 可以增加\r,但是提交时,不需要增加\r。
以下大的错误,看似很多,就是 sh文件,被增加\r引起的。
$ make menuconfig
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/mconf
/cygdrive/d/github/pluto-os_hello/scripts/kconfig/lxdialog/check-lxdialog.sh: line 3: $'\r': command not found
/cygdrive/d/github/pluto-os_hello/scripts/kconfig/lxdialog/check-lxdialog.sh: line 5: syntax error near unexpected token `$'\r''
'cygdrive/d/github/pluto-os_hello/scripts/kconfig/lxdialog/check-lxdialog.sh: line 5: `ldflags()/cygdrive/d/github/pluto-os_hello/scripts/kconfig/lxdialog/check-lxdialog.sh: line 3: $'\r': command not found
/cygdrive/d/github/pluto-os_hello/scripts/kconfig/lxdialog/check-lxdialog.sh: line 5: syntax error near unexpected token `$'\r''
'cygdrive/d/github/pluto-os_hello/scripts/kconfig/lxdialog/check-lxdialog.sh: line 5: `ldflags()/cygdrive/d/github/pluto-os_hello/scripts/kconfig/lxdialog/check-lxdialog.sh: line 3: $'\r': command not found
/cygdrive/d/github/pluto-os_hello/scripts/kconfig/lxdialog/check-lxdialog.sh: line 5: syntax error near unexpected token `$'\r''
'cygdrive/d/github/pluto-os_hello/scripts/kconfig/lxdialog/check-lxdialog.sh: line 5: `ldflags()
HOSTCC scripts/kconfig/lxdialog/checklist.o
In file included from scripts/kconfig/lxdialog/checklist.c:24:
scripts/kconfig/lxdialog/dialog.h:31:10: error: #include expects "FILENAME" or <FILENAME>31| #include CURSES_LOC