diff options
author | Loïc Hoguin <[email protected]> | 2016-10-29 01:34:19 +0300 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-10-29 01:34:19 +0300 |
commit | 5c18311f91530378626d63e0e4cb9e65c1d7f44b (patch) | |
tree | 6e8da5ed77fd54e953281c9238872a6744ec6183 /plugins/sfx.mk | |
parent | 885b62a14300c6b78c376bf48a6ba0ebad7dae6c (diff) | |
download | erlang.mk-5c18311f91530378626d63e0e4cb9e65c1d7f44b.tar.gz erlang.mk-5c18311f91530378626d63e0e4cb9e65c1d7f44b.tar.bz2 erlang.mk-5c18311f91530378626d63e0e4cb9e65c1d7f44b.zip |
Make the sfx plugin use the tarball from Relx
Plus small tweaks.
Diffstat (limited to 'plugins/sfx.mk')
-rw-r--r-- | plugins/sfx.mk | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/sfx.mk b/plugins/sfx.mk index 75d34da..e2aecad 100644 --- a/plugins/sfx.mk +++ b/plugins/sfx.mk @@ -3,12 +3,13 @@ .PHONY: sfx -ifdef RELX_RELEASE +ifdef RELX_REL ifdef SFX # Configuration. -SFX_OUTPUT = $(RELX_OUTPUT_DIR)/$(RELX_RELEASE).run +SFX_ARCHIVE ?= $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/$(RELX_REL_NAME)-$(RELX_REL_VSN).tar.gz +SFX_OUTPUT_FILE ?= $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME).run # Core targets. @@ -26,7 +27,7 @@ REL=$${FILENAME%.*} tail -n+$$ARCHIVE $$0 | tar -xzf - -C $$TMPDIR -$$TMPDIR/$$REL/bin/$$REL console +$$TMPDIR/bin/$$REL console RET=$$? rm -rf $$TMPDIR @@ -37,9 +38,9 @@ __ARCHIVE_BELOW__ endef sfx: - $(call render_template,sfx_stub,$(SFX_OUTPUT)) - $(gen_verbose) tar -C $(RELX_OUTPUT_DIR) -czf - $(RELX_RELEASE) >> $(SFX_OUTPUT) - $(verbose) chmod +x $(SFX_OUTPUT) + $(call render_template,sfx_stub,$(SFX_OUTPUT_FILE)) + $(gen_verbose) cat $(SFX_ARCHIVE) >> $(SFX_OUTPUT_FILE) + $(verbose) chmod +x $(SFX_OUTPUT_FILE) endif endif |