PR#6187: Add a warning when using -plugin-tag(s) without myocamlbuild.ml

(Patch by Jacques-Pascal Deplaix)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14475 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Gabriel Scherer 2014-03-20 15:54:10 +00:00
parent 9e410c0cfe
commit 5f67d82896
3 changed files with 16 additions and 1 deletions

View File

@ -92,6 +92,8 @@ Features wishes:
- PR#6064: GADT representation for Bigarray.kind + CAML_BA_CHAR runtime kind
- PR#6071: Add a -noinit option to the toplevel (patch by David Sheets)
- PR#6166: document -ocamldoc option of ocamlbuild
- PR#6187: ocamlbuild: warn when using -plugin-tag(s) without myocamlbuild.ml
(patch by Jacques-Pascal Deplaix)
- PR#6246: allow wilcard _ as for-loop index
- ocamllex: user-definable refill action
(patch by Frédéric Bour, review by Gabriel Scherer and Luc Maranget)

View File

@ -248,6 +248,9 @@ module Make(U:sig end) =
let rc = sys_command (Command.string_of_command_spec spec) in
raise (Exit_silently_with_code rc);
end
else if not (sys_file_exists plugin_file) && !Options.plugin_tags <> [] then
eprintf "Warning: option -plugin-tag(s) has no effect \
in absence of plugin file %S" plugin_file
else
()
end

View File

@ -239,6 +239,16 @@ let () = test "PluginCompilation3"
T.f "myocamlbuild.ml" ~content:"print_endline \"foo\";;"]
(* if the plugin were executed we'd get "foo" in failing_msg *)
~failing_msg:""
~targets:("main,byte", []) ();;
~targets:("main.byte", []) ();;
let () = test "PluginTagsWarning"
~description:"check that a warning is raised if -plugin-tags \
is used without a plugin file"
~options:[`no_ocamlfind; `plugin_tag "use_str"]
~tree:[T.f "main.ml" ~content:""]
~matching:[_build [M.f "main.cmo"]]
~failing_msg:"Warning: option -plugin-tag(s) has no effect \
in absence of plugin file \"myocamlbuild.ml\""
~targets:("main.ml", []) ();;
run ~root:"_test_internal";;