Could you not prepare the basic config file and add it in via the Makefile? That would remove all of this, make things look nicer :)