diff options
| author | mjnelson <none@none> | 2008-07-10 19:11:48 -0700 |
|---|---|---|
| committer | mjnelson <none@none> | 2008-07-10 19:11:48 -0700 |
| commit | cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0 (patch) | |
| tree | c1b10cec006b1a248eca473c6dddc63d5c720208 /usr/src/tools/scripts/xref.sh | |
| parent | 84db2a68825c1a672f664432101f6f0b443679e3 (diff) | |
| download | illumos-joyent-cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0.tar.gz | |
6538468 add Mercurial support to ON developer tools
6658967 /etc/publickey entries get removed on upgrade
Portions of 6538468 contributed by Rich Lowe.
Portions of 6538468 contributed by Mike Gerdts.
--HG--
rename : usr/src/pkgdefs/common_files/i.confupdate => deleted_files/usr/src/pkgdefs/common_files/i.confupdate
rename : usr/src/pkgdefs/common_files/i.pcicconf => deleted_files/usr/src/pkgdefs/common_files/i.pcicconf
rename : usr/src/tools/scripts/cddlchk.pl => deleted_files/usr/src/tools/scripts/cddlchk.pl
rename : usr/src/tools/scripts/hdrchk.pl => deleted_files/usr/src/tools/scripts/hdrchk.pl
rename : usr/src/tools/findunref/exception_list => usr/src/tools/findunref/exception_list.open
Diffstat (limited to 'usr/src/tools/scripts/xref.sh')
| -rw-r--r-- | usr/src/tools/scripts/xref.sh | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/usr/src/tools/scripts/xref.sh b/usr/src/tools/scripts/xref.sh index cad8be25e1..20ec192315 100644 --- a/usr/src/tools/scripts/xref.sh +++ b/usr/src/tools/scripts/xref.sh @@ -3,9 +3,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ # CDDL HEADER END # # -# Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -29,7 +28,10 @@ # xref: build and maintain source cross-reference databases. # -PATH=/usr/bin:/usr/ccs/bin:${BUILD_TOOLS:-/opt}/teamware/bin export PATH +ONBLDDIR=$(dirname $(whence $0)) + +PATH=/usr/bin:/usr/ccs/bin:${BUILD_TOOLS:-/opt}/teamware/bin:$ONBLDDIR +export PATH PROG=`basename $0` XREFMK=`dirname $0`/xref.mk XRMAKEFILE=Makefile export XRMAKEFILE @@ -87,28 +89,17 @@ timeinfo() info "$1 in ${min}m${sec}s" } -# -# If $CODEMGR_WS isn't set, then attempt to glean it from the workspace -# command before giving up. -# -if [ -z "$CODEMGR_WS" ]; then - if whence workspace > /dev/null; then - # - # Since ws(1) hasn't been run, set up SRC and MACH too. - # Note that other environment variables, such as - # ENVCPPFLAGS*, can also affect the resulting - # cross-reference, but we assume that if the developer - # really cared, he would've ws'd first. - # - CODEMGR_WS=`workspace name` export CODEMGR_WS - SRC=$CODEMGR_WS/usr/src export SRC - MACH=`uname -p` export MACH - else - fail "No active workspace; run \"ws <workspace_name>\"" - fi +which_scm | read SCM_MODE CODEMGR_WS || exit 1 + +if [[ $SCM_MODE == "unknown" ]];then + print -u2 "Unable to determine SCM type currently in use." + exit 1 fi -[ -d "$CODEMGR_WS" ] || fail "\$CODEMGR_WS ($CODEMGR_WS) is not a directory" +export CODEMGR_WS +SRC=$CODEMGR_WS/usr/src export SRC +MACH=`uname -p` export MACH + [ -f $XREFMK ] || fail "cannot locate xref.mk" clobber= |
