【发布时间】:2012-02-13 16:17:52
【问题描述】:
目录树
.
| Makefile
| src
| Makefile
| spec
| test
在 ./Makefile 中
default: all
.DEFAULT:
$(MAKE) -C $@
在 src/Makefile 中
.PHONY: all spec test ...
spec:
bundle exec cucumber ../spec
当我在 src 目录中时,“make spec”运行良好。
..././src/# make spec
blablabla
但是当我在根目录中时,我发现“无事可做”,但这是一个虚假目标
..././# make spec
make: Nothing to be done for `spec'.
我认为是任务名称与目录名称相同的问题,带有子makefile。
【问题讨论】: