diff options
-rw-r--r-- | include/Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/Makefile b/include/Makefile index b10a837e4ba4..99c6c3872eb6 100644 --- a/include/Makefile +++ b/include/Makefile @@ -66,8 +66,12 @@ osreldate.h: ${.CURDIR}/../sys/conf/newvers.sh \ setvar PARAMFILE ${.CURDIR}/../sys/sys/param.h; \ . ${.CURDIR}/../sys/conf/newvers.sh; \ echo "$$COPYRIGHT" > osreldate.h; \ + echo "#ifdef _KERNEL" >> osreldate.h; \ + echo '#error "osreldate.h must not be used in the kernel, use sys/param.h"' >> osreldate.h; \ + echo "#else" >> osreldate.h; \ echo \#'undef __FreeBSD_version' >> osreldate.h; \ - echo \#'define __FreeBSD_version' $$RELDATE >> osreldate.h + echo \#'define __FreeBSD_version' $$RELDATE >> osreldate.h; \ + echo "#endif" >> osreldate.h beforeinstall: ${SHARED} @rm -f ${DESTDIR}/usr/include/timepps.h |