That extract command is a bit complex. Wouldn't be a better idea to add an extract target to the rules file?