日期:2014-05-16  浏览次数:21049 次

makefile切换目录
怎么在makefile里写个脚本达到下面这个目的
功能同SHELL里   的cd   ../c这个命令

------解决方案--------------------
$ make
Current working dir is: /usr/home/mymtom/src/shell
Entering dir /usr/home/mymtom/src/shell/../c
Current working dir is: /usr/home/mymtom/src/c
$ cat Makefile

all:
@_curdir=`pwd`; \
echo "Current working dir is: $${_curdir} "; \
echo "Entering dir $${_curdir}/../c "; \
cd ../c; \
_curdir=`pwd`; \
echo "Current working dir is: $${_curdir} "
$