refactor expect Makefile