make-template macro