From 216e04c46fab23d4e2793f39b402e1c2d2e3328c Mon Sep 17 00:00:00 2001 From: Jay Nelson Date: Wed, 16 Oct 2013 14:41:43 -0700 Subject: Running 'make clean-all' has errors if a dep has no Makefile Create a project with a dependency that has no Makefile such as wooga/eredis. Do 'make all' then 'make clean-all' to get an error. This patch checks for the presence of the Makefile before attempting to run 'make clean', however, it does not attempt run 'rebar clean' or other commands instead. --- erlang.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erlang.mk b/erlang.mk index 6fc011e..57da405 100644 --- a/erlang.mk +++ b/erlang.mk @@ -179,7 +179,13 @@ deps: $(ALL_DEPS_DIRS) done clean-deps: - @for dep in $(ALL_DEPS_DIRS) ; do $(MAKE) -C $$dep clean; done + @for dep in $(ALL_DEPS_DIRS) ; do \ + if [ -f $$dep/Makefile ] ; then \ + $(MAKE) -C $$dep clean ; \ + else \ + echo "include $(CURDIR)/erlang.mk" | $(MAKE) -f - -C $$dep clean ; \ + fi ; \ + done # Documentation. -- cgit v1.2.3