Emperor Wu built temples and gave generously to sangha, but Bodhidharma tells him he gets no merit whatsoever for it. Generosity is the first of the Buddhist paramitas, but a truly generous heart is one that gives by force of habit, without need for reward.