这是我的Makefile:为什么认为目标是最新的?
REBAR=./rebar
REBAR_COMPILE=$(REBAR) get-deps compile
all: compile
compile:
$(REBAR_COMPILE)
test:
$(REBAR_COMPILE) skip_deps=true eunit
clean:
-rm -rf deps ebin priv doc/*
docs:
$(REBAR_COMPILE) doc
ifeq ($(wildcard dialyzer/sqlite3.plt),)
static:
$(REBAR_COMPILE) build_plt analyze
else
static:
$(REBAR_COMPILE) analyze
endif
我可以运行make compile
多次,得到
[email protected]:~/workspace/gm-controller/lib/erlang-sqlite$ make compile
./rebar get-deps compile
==> erlang-sqlite (get-deps)
==> erlang-sqlite (compile)
然而,对于运行make test
某种原因总是给人
[email protected]:~/workspace/gm-controller/lib/erlang-sqlite$ make test
make: `test' is up to date.
即使文件未编译。问题是,为什么?
运行相同的命令直接作用:
[email protected]:~/workspace/gm-controller/lib/erlang-sqlite$ ./rebar get-deps compile skip_deps=true eunit
==> erlang-sqlite (get-deps)
==> erlang-sqlite (compile)
Compiled src/sqlite3_lib.erl
Compiled src/sqlite3.erl
==> erlang-sqlite (eunit)
...
我有一个名为build的目录,另一个名为lib。事后看来,这些并不是完美的目标名称。唉.....做。 – MattD 2013-10-15 20:35:28
*其中'all','test'和'clear'是您的生成文件目标名称 – ThorSummoner 2015-04-27 17:05:17
另一种解决方案是更改标签。在你的情况下,将'test'改为'test_rule'或者其他的东西。 – auraham 2015-11-12 16:42:49