# makefile 文件内容:
test:
currentdir=`pwd`; echo ${currentdir}; pwd ; dir2=${currentdir%\/*}; echo ${dir2};
然后执行make显示如下:
zyd@HCC:~/projects/make> make test
currentdir=`pwd`; echo ; pwd ; dir2=; echo ;
/home/zyd/projects/make
zyd@HCC:~/projects/make>
明明这里的`pwd`不是为空,为什么 echo ${currentdir}; 就成了 echo ;了呢?