Browse Source

preserve neko output file extension

Nicolas Cannasse 18 years ago
parent
commit
4da8886109
2 changed files with 3 additions and 0 deletions
  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
 	bugfix in flash9 ByteArray serialization
 	fixed genAS3 conflicting classes and interfaces
+	preserve neko output file extension
 
 2007-05-18: 1.13
 	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;
 	end;
 	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