[#1869] fix build.sh and Makefile.base to handle resource and coverage builds