Browse Source

escript file maybe different from escript name

Zaiming Shi 9 years ago
parent
commit
2cb6360547
1 changed files with 3 additions and 1 deletions
  1. 3 1
      plugins/escript.mk

+ 3 - 1
plugins/escript.mk

@@ -6,6 +6,8 @@
 # Configuration.
 # Configuration.
 
 
 ESCRIPT_NAME ?= $(PROJECT)
 ESCRIPT_NAME ?= $(PROJECT)
+ESCRIPT_FILE ?= $(ESCRIPT_NAME)
+
 ESCRIPT_COMMENT ?= This is an -*- erlang -*- file
 ESCRIPT_COMMENT ?= This is an -*- erlang -*- file
 
 
 ESCRIPT_BEAMS ?= "ebin/*", "deps/*/ebin/*"
 ESCRIPT_BEAMS ?= "ebin/*", "deps/*/ebin/*"
@@ -51,7 +53,7 @@ define ESCRIPT_RAW
 '  ]),'\
 '  ]),'\
 '  file:change_mode(Escript, 8#755)'\
 '  file:change_mode(Escript, 8#755)'\
 'end,'\
 'end,'\
-'Ez("$(ESCRIPT_NAME)"),'\
+'Ez("$(ESCRIPT_FILE)"),'\
 'halt().'
 'halt().'
 endef
 endef