add missing $(if) check for build logging