diff options
-rw-r--r-- | core/deps.mk | 18 | ||||
-rw-r--r-- | test/core_deps.mk | 28 |
2 files changed, 34 insertions, 12 deletions
diff --git a/core/deps.mk b/core/deps.mk index 72b75b0..994d484 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -1,7 +1,7 @@ # Copyright (c) 2013-2016, Loïc Hoguin <[email protected]> # This file is part of erlang.mk and subject to the terms of the ISC License. -.PHONY: distclean-deps +.PHONY: distclean-deps clean-tmp-deps.log # Configuration. @@ -51,7 +51,7 @@ dep_verbose = $(dep_verbose_$(V)) ifdef IS_APP apps:: else -apps:: $(ALL_APPS_DIRS) +apps:: $(ALL_APPS_DIRS) clean-tmp-deps.log ifeq ($(IS_APP)$(IS_DEP),) $(verbose) rm -f $(ERLANG_MK_TMP)/apps.log endif @@ -72,16 +72,15 @@ endif done endif -ifneq ($(SKIP_DEPS),) -deps:: -else -ifeq ($(ALL_DEPS_DIRS),) -deps:: apps -else -deps:: $(ALL_DEPS_DIRS) apps +clean-tmp-deps.log: ifeq ($(IS_APP)$(IS_DEP),) $(verbose) rm -f $(ERLANG_MK_TMP)/deps.log endif + +ifneq ($(SKIP_DEPS),) +deps:: +else +deps:: $(ALL_DEPS_DIRS) apps clean-tmp-deps.log $(verbose) mkdir -p $(ERLANG_MK_TMP) $(verbose) for dep in $(ALL_DEPS_DIRS) ; do \ if grep -qs ^$$dep$$ $(ERLANG_MK_TMP)/deps.log; then \ @@ -97,7 +96,6 @@ endif fi \ done endif -endif # Deps related targets. diff --git a/test/core_deps.mk b/test/core_deps.mk index 174147b..14def21 100644 --- a/test/core_deps.mk +++ b/test/core_deps.mk @@ -33,7 +33,7 @@ core-deps-apps: build clean $t test -f $(APP)/apps/my_app/ebin/my_app.app $t test -f $(APP)/apps/my_app/ebin/boy.beam $t test -f $(APP)/apps/my_app/ebin/girl.beam - $t test -d $(APP)/deps/cowlib + $t test -f $(APP)/deps/cowlib/ebin/cowlib.app # Applications in apps are compiled automatically but not added # to the application resource file unless they are listed in LOCAL_DEPS. @@ -49,6 +49,18 @@ core-deps-apps: build clean [{module, M} = code:load_file(M) || M <- Mods], \ halt()" + $i "Clean Cowlib" + $t $(MAKE) -C $(APP)/deps/cowlib clean $v + + $i "Check that Cowlib compiled files were removed" + $t test ! -e $(APP)/deps/cowlib/ebin/cowlib.app + + $i "Build the application again" + $t $(MAKE) -C $(APP) $v + + $i "Check that Cowlib compiled files exist" + $t test -f $(APP)/deps/cowlib/ebin/cowlib.app + $i "Clean the application" $t $(MAKE) -C $(APP) clean $v @@ -427,7 +439,7 @@ core-deps-apps-only: build clean $t test -f $(APP)/apps/my_app/ebin/my_app_app.beam $t test -f $(APP)/apps/my_app/ebin/my_app_sup.beam $t test -f $(APP)/apps/my_app/ebin/my_server.beam - $t test -d $(APP)/deps/cowlib/ + $t test -f $(APP)/deps/cowlib/ebin/cowlib.app $i "Check that the application was compiled correctly" $t $(ERL) -pa $(APP)/apps/*/ebin/ -eval " \ @@ -436,6 +448,18 @@ core-deps-apps-only: build clean [{module, M} = code:load_file(M) || M <- Mods], \ halt()" + $i "Clean Cowlib" + $t $(MAKE) -C $(APP)/deps/cowlib clean $v + + $i "Check that Cowlib compiled files were removed" + $t test ! -e $(APP)/deps/cowlib/ebin/cowlib.app + + $i "Build the application again" + $t $(MAKE) -C $(APP) $v + + $i "Check that Cowlib compiled files exist" + $t test -f $(APP)/deps/cowlib/ebin/cowlib.app + $i "Clean the application" $t $(MAKE) -C $(APP) clean $v |