]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/conf/tools/kernel_newvers/kernel_newvers.csh
3 # Mach Operating System
4 # Copyright (c) 1990 Carnegie-Mellon University
5 # Copyright (c) 1989 Carnegie-Mellon University
6 # All rights reserved. The CMU software License Agreement specifies
7 # the terms and conditions for use and redistribution.
11 # kernel_newvers.sh copyright major minor variant
14 major
="$1"; minor
="$2"; variant
="$3"
15 version
="${major}.${minor}"
16 if [ -n "$variant" ]; then version
="${version}.${variant}"; fi
18 objdir
="${OBJROOT}/${KERNEL_CONFIG}_${ARCH_CONFIG}"
22 if [ -z "${objdir}" ] || [ -z "${time}" ]; then exit 1; fi
24 CONFIG
=`expr "${objdir}" : '.*/\([^/]*\)$'`
25 objdir
=`expr "${objdir}" : '.*/\([^/]*/[^/]*/[^/]*\)$'`
27 /bin
/echo "int version_major = ${major};" ;
28 /bin
/echo "int version_minor = ${minor};" ;
29 /bin
/echo "char version_variant[] = \"${variant}\";" ;
30 /bin
/echo "char version[] = \"Darwin Kernel Version ${version}:\\n${time}; ${who}:${objdir}\\n\\n\";" ;
31 /bin
/echo "char osrelease[] = \"${version}\";" ;
32 /bin
/echo "char ostype[] = \"Darwin\";" ;
35 if [ -s vers.suffix
-o ! -f vers.suffix
]; then
37 echo ".${variant}.${CONFIG}" > vers.suffix