ocamlbuild: use all the tags applying to "myocamlbuild.ml" to compile the plugin
ocamlbuild: use all the tags applying to "myocamlbuild.ml" to compile the plugin

The long-term goal is to allow composability of myocamlbuild.ml
plugins, as discussed in PR#5680 and PR#6093. The current attempt is
to give to the myocamlbuild.ml all the tags that apply to it according
to the _tags file and other configuration options passed to
ocamlbuild. For example, if -use-ocamlfind is used, any
(true: package(foo)) or ("myocamlbuild.ml": package(foo)) line would
have the ocamlfind package `foo` usable from myocamlbuild.ml.

The present implementation has two downsides:

(1) Relying on _tags is a bit unpleasant because people that write
    (true: foo) lines do not expect it to get also applied to the
    plugin compilation (though in fact the previous implementation
    used "profile" and "debug" tags passed in this way). There might
    be case of build breaking because the (true: tags) passed make
    myocamlbuild.ml compilation fail. A workaround would be to add
    ("myocamlbuild.ml": -foo) for any problematic tag `foo` -- I don't
    expect this situation to happen in practice, but you never know.

(2) The general tags passed to the myocamlbuild.ml compilation have
    been rather arbitrarily set to (ocaml,program,link,byte)
    (or native). OCamlbuild doesn't really have tags to describe going
    straight from a .ml (or several) to an executable, as its usual
    rules enforce separate compilation and linking steps. This means
    that some ocamlbuild rule might misbehave due to the absence of
    the "compile" step, but in practice most tag-driven compilation
    options are such that the link-options are a superset of the
    compile-options, so this will still work in many case
    (in particular for ocamlfind packages). Long-term, it may be
    better to split myocamlbuild.ml compilation in the usual compile
    then link steps.

git-svn-id: e7e61699ce1738538ffebb75374fbea0924bc775@13999 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02

gerdstolpmann/ocaml,msprotz/ocaml,yallop/camlp4,msprotz/ocaml,eliberis/ocaml,gerdstolpmann/ocaml,eliberis/ocaml,eliberis/ocaml,yunxing/ocaml,eliberis/ocaml,eliberis/ocaml,msprotz/ocaml,yunxing/ocaml,gerdstolpmann/ocaml,yunxing/ocaml,gerdstolpmann/ocaml,yunxing/ocaml,hhugo/camlp4,msprotz/ocaml,gerdstolpmann/ocaml,yunxing/ocaml,msprotz/ocaml,chambart/camlp4