include bsd.prefs.mk before attempting to test for any variable like ${OPSYS} in a cpp-like pre-processing statement.