aboutsummaryrefslogtreecommitdiffstats
path: root/core/core.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-06-14 10:38:32 +0200
committerLoïc Hoguin <[email protected]>2015-06-14 10:38:32 +0200
commit752d2a69fe93523aa0b400f30e096f39e1b1eb27 (patch)
treef20f67e54a92ecab1d435d8e109479ce63bb95f6 /core/core.mk
parent553442b0f140f963fff9c07ac2ec8f4770096483 (diff)
downloaderlang.mk-752d2a69fe93523aa0b400f30e096f39e1b1eb27.tar.gz
erlang.mk-752d2a69fe93523aa0b400f30e096f39e1b1eb27.tar.bz2
erlang.mk-752d2a69fe93523aa0b400f30e096f39e1b1eb27.zip
Generate the .app file directly from the Makefile
This removes the need for a .app.src file entirely. The PROJECT_* variables and the OTP_DEPS variable allow us to specify everything we need. REL_DEPS and BUILD_DEPS will be added later on to allow users to cleanly specify those without adding them to the .app file.
Diffstat (limited to 'core/core.mk')
-rw-r--r--core/core.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/core.mk b/core/core.mk
index dd66bec..46b12d1 100644
--- a/core/core.mk
+++ b/core/core.mk
@@ -21,6 +21,8 @@ ERLANG_MK_VERSION = 1
PROJECT ?= $(notdir $(CURDIR))
PROJECT := $(strip $(PROJECT))
+PROJECT_VERSION ?= rolling
+
# Verbosity.
V ?= 0
@@ -117,11 +119,19 @@ help::
# Core functions.
+empty :=
+space := $(empty) $(empty)
+comma := ,
+
define newline
endef
+define erlang_list
+[$(subst $(space),$(comma),$(strip $(1)))]
+endef
+
# Adding erlang.mk to make Erlang scripts who call init:get_plain_arguments() happy.
define erlang
$(ERL) -pa $(ERLANG_MK_TMP)/rebar/ebin -eval "$(subst $(newline),,$(subst ",\",$(1)))" -- erlang.mk