Browse Source

Add error message before failing due to invalid dependency

If a dependency specified in DEPS is unknown or invalid (its VS
is not "git"), erlang.mk will fail. Now, add a human-readable
error message to help the user understand what the problem is.
Derek Brown 11 years ago
parent
commit
eb8a5a8678
2 changed files with 2 additions and 0 deletions
  1. 1 0
      core/deps.mk
  2. 1 0
      erlang.mk

+ 1 - 0
core/deps.mk

@@ -47,6 +47,7 @@ define dep_fetch
 		git clone -n -- $$$$REPO $(DEPS_DIR)/$(1); \
 		cd $(DEPS_DIR)/$(1) && git checkout -q $$$$COMMIT; \
 	else \
+		echo "Unknown or invalid dependency: $(1). Please consult the erlang.mk README for instructions." >&2; \
 		exit 78; \
 	fi
 endef

+ 1 - 0
erlang.mk

@@ -115,6 +115,7 @@ define dep_fetch
 		git clone -n -- $$$$REPO $(DEPS_DIR)/$(1); \
 		cd $(DEPS_DIR)/$(1) && git checkout -q $$$$COMMIT; \
 	else \
+		echo "Unknown or invalid dependency: $(1). Please consult the erlang.mk README for instructions." >&2; \
 		exit 78; \
 	fi
 endef