fix handling error, do not call make anymore, when creation of Makefile.mk fails
add new rules
refactoring, extract code to some functions