aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-08-14 15:35:55 +0200
committerLoïc Hoguin <[email protected]>2013-08-14 15:35:55 +0200
commit89af3bdf6788481437bc64abecf4575a1cba71a5 (patch)
treedcc1639d834fb8c0cf1f370a6c87e64836290543
parent8f0e4ea3f093ede404b5150430a109c67a146cf4 (diff)
downloaderlang.mk-89af3bdf6788481437bc64abecf4575a1cba71a5.tar.gz
erlang.mk-89af3bdf6788481437bc64abecf4575a1cba71a5.tar.bz2
erlang.mk-89af3bdf6788481437bc64abecf4575a1cba71a5.zip
Add basic support for building deps with no Makefile
-rw-r--r--erlang.mk12
1 files changed, 11 insertions, 1 deletions
diff --git a/erlang.mk b/erlang.mk
index 2491c5e..1b4bc97 100644
--- a/erlang.mk
+++ b/erlang.mk
@@ -12,6 +12,10 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+# Project.
+
+PROJECT ?= $(notdir $(CURDIR))
+
# Verbosity and tweaks.
V ?= 0
@@ -116,7 +120,13 @@ endef
$(foreach dep,$(DEPS),$(eval $(call dep_target,$(dep))))
deps: $(ALL_DEPS_DIRS)
- @for dep in $(ALL_DEPS_DIRS) ; do $(MAKE) -C $$dep; done
+ @for dep in $(ALL_DEPS_DIRS) ; do \
+ if [ -f $$dep/Makefile ] ; then \
+ $(MAKE) -C $$dep ; \
+ else \
+ echo "include $(CURDIR)/erlang.mk" | $(MAKE) -f - -C $$dep ; \
+ fi ; \
+ done
clean-deps:
@for dep in $(ALL_DEPS_DIRS) ; do $(MAKE) -C $$dep clean; done