From fe5c42fb818acf9ad6ca6589ea182dfbfbaa5427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 29 Sep 2015 15:03:34 +0200 Subject: Add support for APPS_DIR This changes adds Rebar-like "apps/" functionality. From this commit onward, Erlang.mk supports 4 types of repositories: - Repo with an Erlang app at root level + deps/ - Repo with an Erlang app at root level + apps/ deps/ - Repo with no app at root level + deps/ - Repo with no app at root level + apps/ deps/ Example usage: - make new-app in=webchat - make new t=gen_server n=my_chat in=webchat - make Replace new-app with new-lib to create an OTP library instead of an OTP application. --- core/core.mk | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/core.mk') diff --git a/core/core.mk b/core/core.mk index 34aad7b..1d0012d 100644 --- a/core/core.mk +++ b/core/core.mk @@ -181,6 +181,9 @@ core_lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F, # @todo On Windows: $(shell dir /B $(1)); make sure to handle when no file exists. core_ls = $(filter-out $(1),$(shell echo $(1))) +# @todo Use a solution that does not require using perl. +core_relpath = $(shell perl -e 'use File::Spec; print File::Spec->abs2rel(@ARGV) . "\n"' $1 $2) + # Automated update. ERLANG_MK_REPO ?= https://github.com/ninenines/erlang.mk -- cgit v1.2.3