更改Makefile中的環境變量`PATH'在CLT中不會生效,並且可以使用我從原始源編譯的make util。設置內部makefile中的PATH變量對make不起作用3.81
簡單的Makefile
PATH := $(PATH):/opt/bin
export PATH
all:
@cscope --version
我的測試
/tmp $ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin
/tmp $ ls /opt/bin/cscope
/opt/bin/cscope
/tmp $ which make
/usr/bin/make
/tmp $ make
make: cscope: No such file or directory
make: *** [all] Error 1
/tmp $ ./_install/bin/make
cscope: version 15.7a
/tmp $ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
/tmp $ ./_install/bin/make --version
GNU Make 3.82
Built for x86_64-apple-darwin12.0.0
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
誰能幫助?
是'cscope'的唯一工具你擔心,或者是其他的在'/ opt/bin /'中? – Beta 2012-07-31 17:57:25
不,這只是一個簡單的測試util,不在系統'PATH'中。 – ShadowStar 2012-07-31 19:17:49