Improved Rules.make variable substitution