diff options
author | Loïc Hoguin <[email protected]> | 2018-11-30 19:13:44 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-11-30 19:13:44 +0100 |
commit | da01261d211f753af8f4f0925cbf1cbdf9a04da0 (patch) | |
tree | de83e6be121b41f7382ce26132b4d3455f16a12d /plugins | |
parent | 5ae9661dca352f16576860dad7eaaad45290312c (diff) | |
download | erlang.mk-da01261d211f753af8f4f0925cbf1cbdf9a04da0.tar.gz erlang.mk-da01261d211f753af8f4f0925cbf1cbdf9a04da0.tar.bz2 erlang.mk-da01261d211f753af8f4f0925cbf1cbdf9a04da0.zip |
Make "make run" work for non-extended releases too
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/relx.mk | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/relx.mk b/plugins/relx.mk index fb8c19e..1af4253 100644 --- a/plugins/relx.mk +++ b/plugins/relx.mk @@ -76,20 +76,25 @@ define get_relx_release.erl {semver, _} -> ""; VsnStr -> Vsn0 end, - io:format("~s ~s", [Name, Vsn]), + Extended = case lists:keyfind(extended_start_script, 1, Config) of + {_, true} -> "1"; + _ -> "" + end, + io:format("~s ~s ~s", [Name, Vsn, Extended]), halt(0). endef RELX_REL := $(shell $(call erlang,$(get_relx_release.erl))) RELX_REL_NAME := $(word 1,$(RELX_REL)) RELX_REL_VSN := $(word 2,$(RELX_REL)) +RELX_REL_CMD := $(if $(word 3,$(RELX_REL)),console) ifeq ($(PLATFORM),msys2) RELX_REL_EXT := .cmd endif run:: all - $(verbose) $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/bin/$(RELX_REL_NAME)$(RELX_REL_EXT) console + $(verbose) $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/bin/$(RELX_REL_NAME)$(RELX_REL_EXT) $(RELX_REL_CMD) ifdef RELOAD rel:: |