aboutsummaryrefslogtreecommitdiffstats
path: root/core/core.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-09-29 15:03:34 +0200
committerLoïc Hoguin <[email protected]>2015-09-29 15:03:34 +0200
commitfe5c42fb818acf9ad6ca6589ea182dfbfbaa5427 (patch)
tree5ca924e351e7cb325e179be273febe52ab7f1208 /core/core.mk
parent41ea5e7fe740625899cd9553f5d9faf25cf5425a (diff)
downloaderlang.mk-fe5c42fb818acf9ad6ca6589ea182dfbfbaa5427.tar.gz
erlang.mk-fe5c42fb818acf9ad6ca6589ea182dfbfbaa5427.tar.bz2
erlang.mk-fe5c42fb818acf9ad6ca6589ea182dfbfbaa5427.zip
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.
Diffstat (limited to 'core/core.mk')
-rw-r--r--core/core.mk3
1 files changed, 3 insertions, 0 deletions
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