summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-08-25 17:48:25 +0000
committerimp <imp@FreeBSD.org>2003-08-25 17:48:25 +0000
commit2b92492b44691915c6fed676703b34767c652646 (patch)
treeabf4830eccc5e2decf9d56bd82d2160f129566a6 /Makefile.inc1
parent17b165ad69302110efae91469743d7f11d2a73c8 (diff)
downloadFreeBSD-src-2b92492b44691915c6fed676703b34767c652646.zip
FreeBSD-src-2b92492b44691915c6fed676703b34767c652646.tar.gz
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)
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc14
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index a245361..20579fe 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}
OpenPOWER on IntegriCloud