Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash 详细环境变量设置为";否";在我的Ubuntu安装中?_Bash_Ubuntu_Gcc_Makefile_Cmake - Fatal编程技术网

Bash 详细环境变量设置为";否";在我的Ubuntu安装中?

Bash 详细环境变量设置为";否";在我的Ubuntu安装中?,bash,ubuntu,gcc,makefile,cmake,Bash,Ubuntu,Gcc,Makefile,Cmake,这更像是一种好奇心,但它难住了我,所以我决定与全世界分享它。在我的Ubuntu12.04机器上,在我的bash shell中设置了以下环境变量(显然是在启动时设置的),在我的一生中,我找不到发生这种情况的地方: VERBOSE=no 我使用cmake构建代码,它生成一个Makefile,通过这种巧妙的方式禁用编译器的叽叽喳喳: $(VERBOSE).SILENT 需要说明的是,.SILENT本身被make解释为一个命令,但是如果VERBOSE被设置为任何值,那么该命令将无法识别,并且make

这更像是一种好奇心,但它难住了我,所以我决定与全世界分享它。在我的Ubuntu12.04机器上,在我的bash shell中设置了以下环境变量(显然是在启动时设置的),在我的一生中,我找不到发生这种情况的地方:

VERBOSE=no
我使用
cmake
构建代码,它生成一个Makefile,通过这种巧妙的方式禁用编译器的叽叽喳喳:

$(VERBOSE).SILENT
需要说明的是,
.SILENT
本身被
make
解释为一个命令,但是如果
VERBOSE
被设置为任何值,那么该命令将无法识别,并且
make
将跳过它,导致jibber jabber


这在我运行Fedora的其他机器上不是问题,所以我假设它是特定于Ubuntu的。

/etc/default
-
/etc/default/rcS
-
-(也在Debian中)中有一个文件设置此变量

它控制各种启动功能,但可能通过/etc/profile或您的特定情况下的某个东西继承到所有用户环境中

[编辑:我刚刚在Xubuntu 13.04中试用过它,但没有发生这种情况,因此它很可能是针对您的情况的]