How can I add a target language

Here are some recent discussions about implementation :
How to implement new Haxe target?
and about OCaml instalation Opam switch?