move gen_defs into tools where it belongs