ifneq ($(HOST_OS),windows)
ifneq ($(HOST_OS)-$(HOST_ARCH),darwin-ppc)
# check for a case sensitive file system
ifneq (a,$(shell mkdir -p $(OUT_DIR) ; \
echo a > $(OUT_DIR)/casecheck.txt; \
echo B > $(OUT_DIR)/CaseCheck.txt; \
cat $(OUT_DIR)/casecheck.txt))
$(warning************************************************************)
$(warning You are building on a case-insensitivefilesystem.)
$(warning Please move your source tree to acase-sensitive filesystem.)
$(warning************************************************************)
$(error Case-insensitive filesystems not supported)
endif
endif
endif
1.mkdir bash命令的使用
mkdir -p
USERNAME@USERNAME-desktop:~$ mkdir --help
Usage: mkdir [OPTION]... DIRECTORY...
Create the DIRECTORY(ies), if they do not alreadyexist.
Mandatory arguments to long options are mandatory forshort options too.
-m,--mode=MODE set file mode (as inchmod), not a=rwx - umask
-p, --parents no error if existing, make parent directoriesas needed
-v,--verbose print a message for eachcreated directory
-Z,--context=CTX set the SELinux securitycontext of each created
directory to CTX
--help display this help andexit
--version output versioninformation and exit
Report mkdir bugs to bug-coreutils@gnu.org
GNU coreutils home page:<http://www.gnu.org/software/coreutils/>
General help using GNU software:<http://www.gnu.org/gethelp/>
Report mkdir translation bugs to<http://translationproject.org/team/>
2.echo bash命令的使用
echo off
echo on
@echo off @echo on
3.cat bash命令的使用
以下是检测路径中是否包含有空格
# Make sure that there are no spaces in the absolutepath; the
# build system can't deal with them.
ifneq ($(words $(shell pwd)),1)
$(warning ************************************************************)
$(warning You are building in a directory whoseabsolute path contains)
$(warning a space character:)
$(warning $(space))
$(warning "$(shell pwd)")
$(warning $(space))
$(warning Please move your source tree to a path thatdoes not contain)
$(warning any spaces.)
$(warning************************************************************)
$(error Directory names containing spaces notsupported)
endif
1.words函数在make 文件中的使用
2.pwd 在bash 命令中的使用
本文详细介绍了如何使用bash命令检查并处理在不同文件系统和路径中存在的问题,包括敏感文件系统检测、路径中空格的检查以及目录创建命令的使用。文章深入探讨了`mkdir-p`、`echo`、`cat`等命令的功能,并提供了相应的参数说明,旨在帮助开发者在遇到不兼容的文件系统或路径问题时进行有效处理。

被折叠的 条评论
为什么被折叠?



