Răsfoiți Sursa

added -D neko_v2 support (fixed issue #804)

Nicolas Cannasse 13 ani în urmă
părinte
comite
a37becb969
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      genneko.ml

+ 2 - 1
genneko.ml

@@ -798,7 +798,8 @@ let generate com =
 		Sys.rename ((try Filename.chop_extension com.file with _ -> com.file) ^ "2.neko") neko_file;
 	end;
 	let c = Common.timer "neko compilation" in
-	if command ("nekoc \"" ^ neko_file ^ "\"") <> 0 then failwith "Neko compilation failure";
+	let version = if Common.defined com "neko_v2" then "-version 2 " else "" in
+	if command ("nekoc " ^ version ^ "\"" ^ neko_file ^ "\"") <> 0 then failwith "Neko compilation failure";
 	c();
 	let output = Filename.chop_extension neko_file ^ ".n" in
 	if output <> com.file then begin