Selaa lähdekoodia

print --help-defines and --help-metas on default command line (closes #2841)

Simon Krajewski 11 vuotta sitten
vanhempi
commit
960d5fc9af
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      main.ml

+ 7 - 1
main.ml

@@ -1362,7 +1362,13 @@ try
 	if not !no_output && file_extension com.file = ext then delete_file com.file;
 	if not !no_output && file_extension com.file = ext then delete_file com.file;
 	List.iter (fun f -> f()) (List.rev (!pre_compilation));
 	List.iter (fun f -> f()) (List.rev (!pre_compilation));
 	if !classes = [([],"Std")] && not !force_typing then begin
 	if !classes = [([],"Std")] && not !force_typing then begin
-		if !cmds = [] && not !did_something then Arg.usage basic_args_spec usage;
+		let help_spec = basic_args_spec @ [
+			("-help", Arg.Unit (fun () -> ()),": show extended help information");
+			("--help", Arg.Unit (fun () -> ()),": show extended help information");
+			("--help-defines", Arg.Unit (fun () -> ()),": print help for all compiler specific defines");
+			("--help-metas", Arg.Unit (fun () -> ()),": print help for all compiler metadatas");
+		] in
+		if !cmds = [] && not !did_something then Arg.usage help_spec usage;
 	end else begin
 	end else begin
 		ctx.setup();
 		ctx.setup();
 		Common.log com ("Classpath : " ^ (String.concat ";" com.class_path));
 		Common.log com ("Classpath : " ^ (String.concat ";" com.class_path));