首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

makefile切换目录解决方法

2012-02-26 
makefile切换目录怎么在makefile里写个脚本达到下面这个目的功能同SHELL里的cd../c这个命令[解决办法]$ ma

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} "
$

热点排行