Author: obrien
Date: Sun Mar 7 10:08:00 2010
New Revision: 204824
URL: http://svn.freebsd.org/changeset/base/204824
Log:
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/".
Modified:
head/sys/conf/newvers.sh
Modified: head/sys/conf/newvers.sh
==============================================================================
--- head/sys/conf/newvers.sh Sun Mar 7 09:52:35 2010 (r204823)
+++ head/sys/conf/newvers.sh Sun Mar 7 10:08:00 2010 (r204824)
@@ -88,15 +88,15 @@ v=`cat version` u=${USER:-root} d=`pwd`
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`
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"