你的 $ make /media/FOREVER/program/Makefile 改为
输入 $ make -f /media/FOREVER/program/Makefile 就是加一个-f参数。
但是我不推荐这么做,最好是进入到目录再执行,因为Makefile中有可能用到Shell脚本找文件。
希望我的回答可以解决你的问题~
打错了罢? 是make && make intall
&& 是 shell 的逻辑 and (和), 如果前面的命令执行失败,(true or flase)
退出状态不是 0 , 就不会执行后面的命令 ,
最后命令的退出状态会在 shell 默认变量 $? 找到, 例
nc10@your-5554c55be4 ~
$ ls
Mail/ doc/ hh* matrix/ sign.dat trash
News/ ee* junk numsorted* socket.awk* ttt.awk*
bin/ ex30.sh* lib/ pp* software/
crack_allword.txt hex2dec.awk lynx.cfg sign tmp/
nc10@your-5554c55be4 ~
$ test -f "pp" && echo "yes, you have it"
yes, you have it
nc10@your-5554c55be4 ~
$ echo $?
0
nc10@your-5554c55be4 ~
$ test -f "lllll" && echo "yes, you have it"
nc10@your-5554c55be4 ~
$ echo $?
1
nc10@your-5554c55be4 ~
$
第二次执行测试文件 lllll,没有这文件, test名令执行失败,
( 条件为假(flase)), 随后的命令就不执行
nc10@your-5554c55be4 ~
$ test -f "lllll" ; echo "yes, you have it"
yes, you have it
nc10@your-5554c55be4 ~
$
分开两个命令,那不管前面执行如何,随后的还是会执行
如果分成两 make ; make install, 那make编译有错误的话,还是会照样
install , 但安装的程序不能用哦.
Is that clear? :)
make -f /media/FOREVER/program/Makefile
make默认会在当前文件夹下依次查找GUNmakefile makefile Makefile,如果都没找到就需要你给它指定一个非常规名称的makfile文件,就需要使用-f选项。
好像 只要 cd /media/FOREVER/program/
make
就可以知道搜索makefile
已经编译过了,你可以先执行一下make clean。
版本不对,或者编译器坏了