Makefile cleanup.

Only run the shell command once.