Well, there's more than one way to skin a cat. In an ideal world, with America proud, strong, and united, we'd simply build a wall and deport all those who came here illegally.
Realistically speaking, that ain't happening.
Pushing to improve Mexico's government can be done on a number of levels. Humanitarian. Pro-democracy. Anti-corruption. For the poor. For the children. You name it. It's hard to smear with charges of racism, xenophobia, or anything else negative.
The individual Mexicans are going to keep coming across, so long as there's incentive for them to do so. What makes an individual decide to leave his home for a foreign land is a factor that can be addressed, even if it's not specifically our problem.
That would make it our solution. Not as gratifiying as a wall, tough laws, and politicians with spine, but a solution nonetheless.
Do you really think Mexico will one day become a southern Canada .. prosperous enough for the vast majority of poor people to see no incentive in coming here ?