From Macro Plans to Automata Plans