Snow Leopard: Factor update of makefiles into seperate function in build.sh