From b21d83f121ca2672d734fd5e58dfee467e9f2efe Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 25 Aug 2003 17:48:25 +0000 Subject: [PATCH] Fall back to using the kernel version for the OSRELDATE when /usr/include/osreldate.h doesn't exist on the system. While this could be worked around by saying something like 'make includes OSLRELDATE=0' when this file doesn't exist, it is just as easy to provide a fallback when the file we know we depend on doesn't exist. While this doesn't make all targets work w/o a /usr/include/osreldate.h, because some of the FreeBSD bootstrap tools use this file. 'make includes' however does work. Noticed by: peter, obrien (and likely others) Pointy hat to: imp (for suggesting a method that depended on /usr/include) --- Makefile.inc1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index a24536179aac..20579fe65fd4 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -123,8 +123,12 @@ SUPFLAGS+= -h ${SUPHOST} MAKEOBJDIRPREFIX?= /usr/obj .if !defined(OSRELDATE) +.if exists(/usr/include/osreldate.h) OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ /usr/include/osreldate.h +.else +OSRELDATE!= sysctl -n kern.osreldate +.endif .endif TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == ${MACHINE_ARCH}