diff options
author | obrien <obrien@FreeBSD.org> | 2010-03-07 10:08:00 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2010-03-07 10:08:00 +0000 |
commit | 6275a64fe8616fb701e918854dcb2db271b4c9b0 (patch) | |
tree | 1b2717e1dab053b161b63a967e021319e9f74105 /sys/conf | |
parent | cccf105e494d436758168c844c0657516379d592 (diff) | |
download | FreeBSD-src-6275a64fe8616fb701e918854dcb2db271b4c9b0.zip FreeBSD-src-6275a64fe8616fb701e918854dcb2db271b4c9b0.tar.gz |
Look for "compile" to decide if this is run as part of the kernel build.
The assumption of "${ARCH}/compile/FOO" is much harder to change in our
build (so assume one hasn't), then assuming every kernel is rooted at "sys/".
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/newvers.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index cabee5a..d786210 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -88,15 +88,15 @@ v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date` i=`${MAKE:-make} -V KERN_IDENT` case "$d" in -*/sys/*) +*/compile/*) SRCDIR=${d##*obj} if [ -n "$MACHINE" ]; then SRCDIR=${SRCDIR##/$MACHINE} fi - SRCDIR=${SRCDIR%%/sys/*} + SRCDIR=$(cd ${SRCDIR%%/compile/*}/.. && pwd) for dir in /bin /usr/bin /usr/local/bin; do - if [ -d "${SRCDIR}/sys/.svn" -a -x "${dir}/svnversion" ] ; then + if [ -d "${SRCDIR}/.svn" -a -x "${dir}/svnversion" ] ; then svnversion=${dir}/svnversion break fi @@ -107,7 +107,7 @@ case "$d" in done if [ -n "$svnversion" ] ; then - svn=" r`cd ${SRCDIR}/sys && $svnversion`" + svn=" r`cd ${SRCDIR} && $svnversion`" fi if [ -n "$git_cmd" ] ; then git=`$git_cmd rev-parse --verify --short HEAD 2>/dev/null` |