這是我的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