As Dane has pointed out, that only solves a part of the illegal alien problem.
We are intertwined with Mexico economically. It is like having something intertwined with your spinal cord. Surgery is impossible. Working with the new will require thoughtful strategy and tactics. We will have to make it clear to WHOEVER comes in that we are no longer their povery safety-valve (and make it so), since that is a large part of Mexico's defacto economic policy.
But to just say "close the door" is naive at best (don't ask what it is at worst).
"Mexico is a lost cause. No matter which government is installed, the corruption will continue(in local state and federal government),a large disparity between the very rich who take the oil money and the poor and uneducated who live in slums, the drug barons will control the border regions with assistance of the Mexican military and police,and the persistent poverty will continue. The only solution is to build a very tall wall with razor sharp barbed wire along the border."
Perhaps when the border(Mexico's poverty release valve)is closed to illegal immigration -- and the Mexican government can no longer export it's poverty -- then the common people of Mexico might, themselves, force reform upon their government.