diff options
author | Jay Nelson <[email protected]> | 2013-10-16 14:41:43 -0700 |
---|---|---|
committer | Jay Nelson <[email protected]> | 2013-10-16 14:41:43 -0700 |
commit | 216e04c46fab23d4e2793f39b402e1c2d2e3328c (patch) | |
tree | e0d42bbc609dbd56af6011ac4c672f65465dd162 | |
parent | 03576a3fc831b56f1a96398b8234468d0951a1b7 (diff) | |
download | erlang.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.mk | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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. |