SORU
14 EKİM 2010, PERŞEMBE


Neden hedef günceldir düşünüyor?

Bu benim 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 birden çok kez çalıştırmak ve alabilirim

aromanov@alexey-desktop:~/workspace/gm-controller/lib/erlang-sqlite$ make compile
./rebar get-deps compile
==> erlang-sqlite (get-deps)
==> erlang-sqlite (compile)

Ancak, bazı nedenlerden çalıştırmak için make test Her zaman verir

aromanov@alexey-desktop:~/workspace/gm-controller/lib/erlang-sqlite$ make test
make: `test' is up to date.

eğer dosyaları derlenmiş bile. Soru: neden?

Doğrudan çalışır aynı komut çalıştırma:

aromanov@alexey-desktop:~/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)
...

CEVAP
14 EKİM 2010, PERŞEMBE


Belki bir dosya/dizin dizininde test adlı. Bu dizinin var, ve daha yeni olan hiç bir bağımlılığı varsa, o zaman bu hedef yeniden değil.

-Dosya ile ilgili Hedefleri Bu tür bir yeniden zorlamak için, onlara aşağıdaki gibi yapmacık olun

.PHONY: all test clean

Sahte hedefleriniz var tüm bildirebilirsiniz unutmayın.

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Bucky Roberts

    Bucky Robert

    9 HAZİRAN 2011
  • CaliforniaMetin

    CaliforniaMe

    3 ŞUBAT 2013
  • Exalto_Gamer

    Exalto_Gamer

    15 EKİM 2014