The merger-driven evolution of massive early-type galaxies