expandTemplate function

Expand template rules into a list of rules by replacing rmake variables with their values