Implement flexible target specification

See commit message.
Perhaps a macro could make allt hese invocations a little more concise?