aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Nelson <[email protected]>2013-10-16 14:41:43 -0700
committerJay Nelson <[email protected]>2013-10-16 14:41:43 -0700
commit216e04c46fab23d4e2793f39b402e1c2d2e3328c (patch)
treee0d42bbc609dbd56af6011ac4c672f65465dd162
parent03576a3fc831b56f1a96398b8234468d0951a1b7 (diff)
downloaderlang.mk-216e04c46fab23d4e2793f39b402e1c2d2e3328c.tar.gz
erlang.mk-216e04c46fab23d4e2793f39b402e1c2d2e3328c.tar.bz2
erlang.mk-216e04c46fab23d4e2793f39b402e1c2d2e3328c.zip
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.
-rw-r--r--erlang.mk8
1 files changed, 7 insertions, 1 deletions
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.