Browse Source

Add IGNORE_DEPS variable

This variable is very useful to avoid downloading dependencies
that are not needed for normal use, for example proper, meck
or rebar plugins.
Loïc Hoguin 10 years ago
parent
commit
607797d84c
1 changed files with 3 additions and 4 deletions
  1. 3 4
      core/deps.mk

+ 3 - 4
core/deps.mk

@@ -5,8 +5,7 @@
 
 
 # Configuration.
 # Configuration.
 
 
-AUTOPATCH ?= edown gen_leader gproc
-export AUTOPATCH
+IGNORE_DEPS ?=
 
 
 DEPS_DIR ?= $(CURDIR)/deps
 DEPS_DIR ?= $(CURDIR)/deps
 export DEPS_DIR
 export DEPS_DIR
@@ -14,7 +13,7 @@ export DEPS_DIR
 REBAR_DEPS_DIR = $(DEPS_DIR)
 REBAR_DEPS_DIR = $(DEPS_DIR)
 export REBAR_DEPS_DIR
 export REBAR_DEPS_DIR
 
 
-ALL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(DEPS))
+ALL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(filter-out $(IGNORE_DEPS),$(DEPS)))
 
 
 ifeq ($(filter $(DEPS_DIR),$(subst :, ,$(ERL_LIBS))),)
 ifeq ($(filter $(DEPS_DIR),$(subst :, ,$(ERL_LIBS))),)
 ifeq ($(ERL_LIBS),)
 ifeq ($(ERL_LIBS),)
@@ -45,7 +44,7 @@ deps:: $(ALL_DEPS_DIRS)
 		if [ -f $$dep/GNUmakefile ] || [ -f $$dep/makefile ] || [ -f $$dep/Makefile ] ; then \
 		if [ -f $$dep/GNUmakefile ] || [ -f $$dep/makefile ] || [ -f $$dep/Makefile ] ; then \
 			$(MAKE) -C $$dep IS_DEP=1 || exit $$? ; \
 			$(MAKE) -C $$dep IS_DEP=1 || exit $$? ; \
 		else \
 		else \
-			echo "ERROR: No makefile to build dependency $$dep. Consider adding it to AUTOPATCH." ; \
+			echo "ERROR: No Makefile to build dependency $$dep." ; \
 			exit 1 ; \
 			exit 1 ; \
 		fi ; \
 		fi ; \
 	done
 	done