sharing code between tools


I have 2 distinct but related tools (in tools/) that have significant
code duplication. I would like to factor out that duplicated code, but
I'm not sure where to put the extracted code or how to hook it into the
build system.

Thanks in advance for any advice,

PS: please ensure to CC me on your response; I can't keep up with all
the traffic on this list.