I don’t think Trump can get away with having the military build the wall
Maybe not but the Military can be used to secure the border by other means short of a permanent physical wall. The short term goal is stop the invasion now.
I think the Prez could order the Pentagon to sue the border as a “training area”, strengthen the border patrol in the area so they can respond to “detained” situations. You do that and the illegal flow will fall of to a trickle. I don’t view it as a long term solution but possibly could last until 2020.