浏览代码

preserve neko output file extension

Nicolas Cannasse 18 年之前
父节点
当前提交
4da8886109
共有 2 个文件被更改,包括 3 次插入0 次删除
  1. 1 0
      doc/CHANGES.txt
  2. 2 0
      genneko.ml

+ 1 - 0
doc/CHANGES.txt

@@ -5,6 +5,7 @@
 	fixed flash9 xml iterator methods
 	fixed flash9 xml iterator methods
 	bugfix in flash9 ByteArray serialization
 	bugfix in flash9 ByteArray serialization
 	fixed genAS3 conflicting classes and interfaces
 	fixed genAS3 conflicting classes and interfaces
+	preserve neko output file extension
 
 
 2007-05-18: 1.13
 2007-05-18: 1.13
 	fixed bug with local variable masking package in catch type
 	fixed bug with local variable masking package in catch type

+ 2 - 0
genneko.ml

@@ -753,4 +753,6 @@ let generate file types hres libs =
 		Sys.rename ((try Filename.chop_extension file with _ -> file) ^ "2.neko") neko_file;
 		Sys.rename ((try Filename.chop_extension file with _ -> file) ^ "2.neko") neko_file;
 	end;
 	end;
 	if command ("nekoc \"" ^ neko_file ^ "\"") <> 0 then failwith "Neko compilation failure";
 	if command ("nekoc \"" ^ neko_file ^ "\"") <> 0 then failwith "Neko compilation failure";
+	let output = Filename.chop_extension neko_file ^ ".n" in
+	if output <> file then Sys.rename output file;
 	if not source then Sys.remove neko_file
 	if not source then Sys.remove neko_file