Browse Source

Skip any handling of dependencies if SKIP_DEPS is defined

This includes fetching and compilation. Example usage:

  SKIP_DEPS=1 make tests

Should improve people's life when there are no Internets.
Loïc Hoguin 10 years ago
parent
commit
f458e45abf
3 changed files with 12 additions and 0 deletions
  1. 4 0
      core/deps.mk
  2. 4 0
      core/docs.mk
  3. 4 0
      core/test.mk

+ 4 - 0
core/deps.mk

@@ -37,6 +37,9 @@ dep_verbose = $(dep_verbose_$(V))
 
 # Core targets.
 
+ifneq ($(SKIP_DEPS),)
+deps::
+else
 deps:: $(ALL_DEPS_DIRS)
 	@for dep in $(ALL_DEPS_DIRS) ; do \
 		if [ -f $$dep/GNUmakefile ] || [ -f $$dep/makefile ] || [ -f $$dep/Makefile ] ; then \
@@ -46,6 +49,7 @@ deps:: $(ALL_DEPS_DIRS)
 			exit 1 ; \
 		fi ; \
 	done
+endif
 
 distclean:: distclean-deps distclean-pkg
 

+ 4 - 0
core/docs.mk

@@ -11,5 +11,9 @@ ALL_DOC_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(DOC_DEPS))
 
 $(foreach dep,$(DOC_DEPS),$(eval $(call dep_target,$(dep))))
 
+ifneq ($(SKIP_DEPS),)
+doc-deps:
+else
 doc-deps: $(ALL_DOC_DEPS_DIRS)
 	@for dep in $(ALL_DOC_DEPS_DIRS) ; do $(MAKE) -C $$dep; done
+endif

+ 4 - 0
core/test.mk

@@ -16,8 +16,12 @@ TEST_ERLC_OPTS += -DTEST=1
 
 $(foreach dep,$(TEST_DEPS),$(eval $(call dep_target,$(dep))))
 
+ifneq ($(SKIP_DEPS),)
+test-deps:
+else
 test-deps: $(ALL_TEST_DEPS_DIRS)
 	@for dep in $(ALL_TEST_DEPS_DIRS) ; do $(MAKE) -C $$dep; done
+endif
 
 ifneq ($(strip $(TEST_DIR)),)
 test-dir: