svn commit: r196573 - in stable/6/sys: . conf

[ Available lists | Index of svn-src-all | Month of Aug 2009 | Week of 26 Aug 2009 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Doug Barton <dougb@FreeBSD.org>
Date
26 Aug 2009 22:51:14
Subject
svn commit: r196573 - in stable/6/sys: . conf
Message-ID
200908262251.n7QMpEGK077388@svn.freebsd.org


[ Hide this part ]
Author: dougb
Date: Wed Aug 26 22:51:14 2009
New Revision: 196573
URL: http://svn.freebsd.org/changeset/base/196573

Log:
MFC r196435:

The svnversion string is only relevant when newvers.sh is called
during the kernel build process, the other places that call the
script do not make use of that information. So restrict execution
of the svnversion-related code to the kernel build context.

Modified:
stable/6/sys/ (props changed)
stable/6/sys/conf/ (props changed)
stable/6/sys/conf/newvers.sh

Modified: stable/6/sys/conf/newvers.sh
==============================================================================
--- stable/6/sys/conf/newvers.sh Wed Aug 26 22:50:14 2009 (r196572)
+++ stable/6/sys/conf/newvers.sh Wed Aug 26 22:51:14 2009 (r196573)
@@ -87,20 +87,22 @@ touch version
v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date`
i=`${MAKE:-make} -V KERN_IDENT`

-for dir in /bin /usr/bin /usr/local/bin; do
- if [ -x "${dir}/svnversion" ]; then
- svnversion=${dir}/svnversion
- SRCDIR=${d##*obj}
- SRCDIR=${SRCDIR%%/sys/*}
- break
- fi
-done
+case "$d" in
+*/sys/*)
+ for dir in /bin /usr/bin /usr/local/bin; do
+ if [ -x "${dir}/svnversion" ]; then
+ svnversion=${dir}/svnversion
+ SRCDIR=${d##*obj}
+ SRCDIR=${SRCDIR%%/sys/*}
+ break
+ fi
+ done

-if [ -n "$svnversion" -a -d "${SRCDIR}/.svn" ] ; then
- svn=" r`cd $SRCDIR && $svnversion`"
-else
- svn=""
-fi
+ if [ -n "$svnversion" -a -d "${SRCDIR}/sys/.svn" ] ; then
+ svn=" r`cd ${SRCDIR}/sys && $svnversion`"
+ fi
+ ;;
+esac

cat << EOF > vers.c
$COPYRIGHT

Elapsed time: 0.203 seconds