build: migrating generic steps out of makefile