diff options
Diffstat (limited to 'usr/src/tools')
32 files changed, 202 insertions, 93 deletions
diff --git a/usr/src/tools/README.tools b/usr/src/tools/README.tools index 6cb51f028a..323d6c679c 100644 --- a/usr/src/tools/README.tools +++ b/usr/src/tools/README.tools @@ -192,6 +192,9 @@ findunref sort > ~/unref-sparc.out $ comm -12 ~/unref-i386.out ~/unref-sparc.out > ~/unref.out +git-active + helper used by webrev to generate file lists for Git workspaces. + hdrchk checks headers for compliance with OS/Net standards (form, includes, C++ guards). diff --git a/usr/src/tools/aw/aw.c b/usr/src/tools/aw/aw.c index 88673c88e4..36891b1a9c 100644 --- a/usr/src/tools/aw/aw.c +++ b/usr/src/tools/aw/aw.c @@ -550,29 +550,6 @@ main(int argc, char *argv[]) newae(as, "--traditional-format"); /* - * This is a support hack to rewrite code for the compiler - * which should probably cause an assembler programmer to recode - * - so, generate a warning in this case. - * - * -K was dropped begining with version 2.18. - */ - { - struct aelist *as_ver = newael(); - struct aelist *ggrep = newael(); - - newae(as_ver, as_pgm); - newae(as_ver, "--version"); - newae(ggrep, "/usr/bin/ggrep"); - newae(ggrep, "-q"); - newae(ggrep, "-E"); - newae(ggrep, "2.1[567]"); - code = pipeline(aeltoargv(as_ver), aeltoargv(ggrep)); - if (code == 0) { - newae(as, "-K"); - } - } - - /* * Walk the argument list, translating as we go .. */ while (--argc > 0) { diff --git a/usr/src/tools/cscope-fast/Makefile b/usr/src/tools/cscope-fast/Makefile index 6a2270bbed..0237a6e9e9 100644 --- a/usr/src/tools/cscope-fast/Makefile +++ b/usr/src/tools/cscope-fast/Makefile @@ -34,6 +34,7 @@ OBJS= main.o dir.o crossref.o scanner.o lookup.o command.o display.o \ vpaccess.o vpfopen.o vpinit.o vpopen.o vpstat.o SRCS= $(OBJS:%.o=%.c) CLEANFILES += $(OBJS) +CLOBBERFILES += scanner.c TMPDIR= /tmp include ../Makefile.tools diff --git a/usr/src/tools/ctf/common/ctf_headers.h b/usr/src/tools/ctf/common/ctf_headers.h index b00b8fd9a6..268ae79077 100644 --- a/usr/src/tools/ctf/common/ctf_headers.h +++ b/usr/src/tools/ctf/common/ctf_headers.h @@ -27,8 +27,6 @@ #ifndef _CTF_HEADERS_H #define _CTF_HEADERS_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Because the ON tools are executed on the system where they are built, * the tools need to include the headers installed on the build system, @@ -69,4 +67,15 @@ #include <uts/common/sys/ctf_api.h> #include <lib/libctf/common/libctf.h> +/* + * XXX: This is hack to deal with GCC 4.x removing __builtin_stdarg_start + * + * We need to build on systems that don't have the fixed va_impl.h on the + * system, to achieve that, we stub it out here and in all similar places to + * give us a leg up. + */ +#if __GNUC__ >= 4 +#define __builtin_stdarg_start(list, name) __builtin_va_start(list, name) +#endif + #endif /* _CTF_HEADERS_H */ diff --git a/usr/src/tools/ctf/common/utils.h b/usr/src/tools/ctf/common/utils.h index 9b07361a53..4ae2dd0917 100644 --- a/usr/src/tools/ctf/common/utils.h +++ b/usr/src/tools/ctf/common/utils.h @@ -27,9 +27,8 @@ #ifndef _UTILS_H #define _UTILS_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdarg.h> +#include <ctf_headers.h> #ifdef __cplusplus extern "C" { diff --git a/usr/src/tools/ctf/cvt/ctftools.h b/usr/src/tools/ctf/cvt/ctftools.h index 991f3bc921..f586236ccf 100644 --- a/usr/src/tools/ctf/cvt/ctftools.h +++ b/usr/src/tools/ctf/cvt/ctftools.h @@ -26,8 +26,6 @@ #ifndef _CTFTOOLS_H #define _CTFTOOLS_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Functions and data structures used in the manipulation of stabs and CTF data */ @@ -43,6 +41,17 @@ extern "C" { #endif +/* + * XXX: This is hack to deal with GCC 4.x removing __builtin_stdarg_start + * + * We need to build on systems that don't have the fixed va_impl.h on the + * system, to achieve that, we stub it out here and in all similar places to + * give us a leg up. + */ +#if __GNUC__ >= 4 +#define __builtin_stdarg_start(list, name) __builtin_va_start(list, name) +#endif + #include "list.h" #include "hash.h" diff --git a/usr/src/tools/findunref/exception_list.git b/usr/src/tools/findunref/exception_list.git new file mode 100644 index 0000000000..d14dbd22f0 --- /dev/null +++ b/usr/src/tools/findunref/exception_list.git @@ -0,0 +1,39 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# 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. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2009 Cyril Plisko. All rights reserved. +# Use is subject to license terms. +# + +# +# Git-specific exception list +# +# See README.exception_lists for details +# + +# +# Without nested repositories, this list could be empty, because ON +# checks for unref relative to usr, and the git files are all in the +# root of the repository. +# + +*/.git diff --git a/usr/src/tools/findunref/exception_list.unknown b/usr/src/tools/findunref/exception_list.unknown new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/usr/src/tools/findunref/exception_list.unknown diff --git a/usr/src/tools/onbld/Checks/Cddl.py b/usr/src/tools/onbld/Checks/Cddl.py index 1f5f99f953..0f4d995e89 100644 --- a/usr/src/tools/onbld/Checks/Cddl.py +++ b/usr/src/tools/onbld/Checks/Cddl.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!ON_PYTHON CDDL = ''' CDDL HEADER START diff --git a/usr/src/tools/onbld/Checks/CmtBlk.py b/usr/src/tools/onbld/Checks/CmtBlk.py index 2f3d29fa79..ddf5caec48 100644 --- a/usr/src/tools/onbld/Checks/CmtBlk.py +++ b/usr/src/tools/onbld/Checks/CmtBlk.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!ON_PYTHON # # CDDL HEADER START diff --git a/usr/src/tools/onbld/Checks/Comments.py b/usr/src/tools/onbld/Checks/Comments.py index daf6aa47d9..6304e59818 100644 --- a/usr/src/tools/onbld/Checks/Comments.py +++ b/usr/src/tools/onbld/Checks/Comments.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!ON_PYTHON # # CDDL HEADER START # diff --git a/usr/src/tools/onbld/Checks/Copyright.py b/usr/src/tools/onbld/Checks/Copyright.py index 81a80058aa..8071b7f435 100644 --- a/usr/src/tools/onbld/Checks/Copyright.py +++ b/usr/src/tools/onbld/Checks/Copyright.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!ON_PYTHON # # CDDL HEADER START # diff --git a/usr/src/tools/onbld/Checks/DbLookups.py b/usr/src/tools/onbld/Checks/DbLookups.py index 11fd4185be..15f889e8d2 100644 --- a/usr/src/tools/onbld/Checks/DbLookups.py +++ b/usr/src/tools/onbld/Checks/DbLookups.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!ON_PYTHON # # CDDL HEADER START # diff --git a/usr/src/tools/onbld/Checks/HdrChk.py b/usr/src/tools/onbld/Checks/HdrChk.py index c2697dcaf2..8f7b946d12 100644 --- a/usr/src/tools/onbld/Checks/HdrChk.py +++ b/usr/src/tools/onbld/Checks/HdrChk.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!ON_PYTHON # # CDDL HEADER START # diff --git a/usr/src/tools/onbld/Checks/Keywords.py b/usr/src/tools/onbld/Checks/Keywords.py index 5c374c3abb..ac3555be32 100644 --- a/usr/src/tools/onbld/Checks/Keywords.py +++ b/usr/src/tools/onbld/Checks/Keywords.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!ON_PYTHON # # CDDL HEADER START # @@ -24,8 +24,6 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # # Mercurial (lack of) keyword checks diff --git a/usr/src/tools/onbld/Checks/Mapfile.py b/usr/src/tools/onbld/Checks/Mapfile.py index 2a8cb74aed..d4fa70d141 100644 --- a/usr/src/tools/onbld/Checks/Mapfile.py +++ b/usr/src/tools/onbld/Checks/Mapfile.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!ON_PYTHON # # CDDL HEADER START # diff --git a/usr/src/tools/onbld/Checks/__init__.py b/usr/src/tools/onbld/Checks/__init__.py index 4bb5f3e262..b7ecf0e881 100644 --- a/usr/src/tools/onbld/Checks/__init__.py +++ b/usr/src/tools/onbld/Checks/__init__.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!ON_PYTHON # # CDDL HEADER START # diff --git a/usr/src/tools/onbld/Scm/Ignore.py b/usr/src/tools/onbld/Scm/Ignore.py new file mode 100644 index 0000000000..048b46ba6f --- /dev/null +++ b/usr/src/tools/onbld/Scm/Ignore.py @@ -0,0 +1,91 @@ +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE +# +# Copyright (c) 2013, Joyent Inc. All rights reserved. +# + +''' +Process our ignore/exception_list file format. + +The format is broadly similar, if not identical, to .gitignore and .hgignore +files. +''' + +import re +import fnmatch + +RE_SYNTAX = re.compile(r'^syntax:\s*(.*)\s*$') + +# +# It is important that this module not rely on Mercurial +# + +def _read_ignore_file(ignorefile): + '''Read an ignore file and return an array of regular expressions + to match ignored paths.''' + + syntax = 'regex' + ignore_list = [] + lc = 0 + + with open(ignorefile, 'r') as f: + for l in f: + lc += 1 + # Remove comments and blank lines + l = l.split('#', 2)[0].strip() + if l == '': + continue + # Process "syntax:" lines + m = RE_SYNTAX.match(l) + if m: + syntax = m.group(1) + continue + # All other lines are considered patterns + if (syntax == 'glob'): + ignore_list.append(re.compile('.*' + fnmatch.translate(l))) + elif (syntax == 'regex'): + ignore_list.append(re.compile(l)) + else: + raise Exception('%s:%d: syntax "%s" is not supported' % + (ignorefile, lc, syntax)) + + return ignore_list + +def ignore(root, ignorefiles): + # If we aren't provided any ignore files, we'll never ignore + # any paths: + if (len(ignorefiles) < 1): + return lambda x: False + + ignore_list = [] + for ignorefile in ignorefiles: + ignore_list.extend(_read_ignore_file(ignorefile)) + + # If the ignore files contained no patterns, we'll never ignore + # any paths: + if (len(ignore_list) < 1): + return lambda x: False + + def _ignore_func(path): + for regex in ignore_list: + if (regex.match(path)): + return True + return False + + return _ignore_func diff --git a/usr/src/tools/onbld/Scm/Makefile b/usr/src/tools/onbld/Scm/Makefile index a31f7e5c87..26a3a4ccfc 100644 --- a/usr/src/tools/onbld/Scm/Makefile +++ b/usr/src/tools/onbld/Scm/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, Joyent Inc. All rights reserved. # include $(SRC)/Makefile.master @@ -29,6 +30,7 @@ include ../../Makefile.tools PYSRCS = \ __init__.py \ Backup.py \ + Ignore.py \ Version.py \ WorkSpace.py diff --git a/usr/src/tools/onbld/Scm/__init__.py b/usr/src/tools/onbld/Scm/__init__.py index f45ecbc95f..8934eb3942 100644 --- a/usr/src/tools/onbld/Scm/__init__.py +++ b/usr/src/tools/onbld/Scm/__init__.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!ON_PYTHON # # CDDL HEADER START # @@ -24,5 +24,3 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# diff --git a/usr/src/tools/onbld/hgext/__init__.py b/usr/src/tools/onbld/hgext/__init__.py index f45ecbc95f..8934eb3942 100644 --- a/usr/src/tools/onbld/hgext/__init__.py +++ b/usr/src/tools/onbld/hgext/__init__.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!ON_PYTHON # # CDDL HEADER START # @@ -24,5 +24,3 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# diff --git a/usr/src/tools/onbld/hgext/cdm.py b/usr/src/tools/onbld/hgext/cdm.py index 0ce41d4dad..a04317fff9 100644 --- a/usr/src/tools/onbld/hgext/cdm.py +++ b/usr/src/tools/onbld/hgext/cdm.py @@ -16,6 +16,7 @@ # # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2008, 2011 Richard Lowe +# Copyright (c) 2013, Joyent Inc. All rights reserved. # '''OpenSolaris extensions to Mercurial @@ -92,6 +93,7 @@ sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "..", "..", sys.path.insert(2, os.path.join(os.path.dirname(__file__), "..", "..")) from onbld.Scm import Version +from onbld.Scm import Ignore from mercurial import util try: @@ -99,7 +101,7 @@ try: except Version.VersionMismatch, badversion: raise util.Abort("Version Mismatch:\n %s\n" % badversion) -from mercurial import cmdutil, ignore, node, patch +from mercurial import cmdutil, node, patch from onbld.Scm.WorkSpace import WorkSpace, WorkList from onbld.Scm.Backup import CdmBackup @@ -167,7 +169,7 @@ def not_check(repo, cmd): ignorefiles.append(f) if ignorefiles: - ign = ignore.ignore(repo.root, ignorefiles, repo.ui.warn) + ign = Ignore.ignore(repo.root, ignorefiles) return canonified_check(ign) else: return util.never diff --git a/usr/src/tools/scripts/cddlchk.py b/usr/src/tools/scripts/cddlchk.py index 816d2f33a7..ad6a6e6f56 100644 --- a/usr/src/tools/scripts/cddlchk.py +++ b/usr/src/tools/scripts/cddlchk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/copyrightchk.py b/usr/src/tools/scripts/copyrightchk.py index 210ef1b46c..f778947bfc 100644 --- a/usr/src/tools/scripts/copyrightchk.py +++ b/usr/src/tools/scripts/copyrightchk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py index 656e22f6b4..82a63df70a 100644 --- a/usr/src/tools/scripts/git-pbchk.py +++ b/usr/src/tools/scripts/git-pbchk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 @@ -17,6 +17,7 @@ # # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2008, 2012 Richard Lowe +# Copyright (c) 2013, Joyent Inc. All rights reserved. # import getopt @@ -28,10 +29,6 @@ import tempfile from cStringIO import StringIO -# This is necessary because, in a fit of pique, we used hg-format ignore lists -# for NOT files. -from mercurial import ignore - # # Adjust the load path based on our location and the version of python into # which it is being loaded. This assumes the normal onbld directory @@ -47,6 +44,7 @@ sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "lib", # sys.path.insert(2, os.path.join(os.path.dirname(__file__), "..")) +from onbld.Scm import Ignore from onbld.Checks import Comments, Copyright, CStyle, HdrChk from onbld.Checks import JStyle, Keywords, Mapfile @@ -177,10 +175,7 @@ def not_check(root, cmd): ignorefiles = filter(os.path.exists, [os.path.join(root, ".git", "%s.NOT" % cmd), os.path.join(root, "exception_lists", cmd)]) - if len(ignorefiles) > 0: - return ignore.ignore(root, ignorefiles, sys.stderr.write) - else: - return lambda x: False + return Ignore.ignore(root, ignorefiles) def gen_files(root, parent, paths, exclude): diff --git a/usr/src/tools/scripts/hdrchk.py b/usr/src/tools/scripts/hdrchk.py index 84acbc8616..aa62f7b090 100644 --- a/usr/src/tools/scripts/hdrchk.py +++ b/usr/src/tools/scripts/hdrchk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/hg-active.py b/usr/src/tools/scripts/hg-active.py index 88394e98e5..23f6c7cd98 100644 --- a/usr/src/tools/scripts/hg-active.py +++ b/usr/src/tools/scripts/hg-active.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 diff --git a/usr/src/tools/scripts/mapfilechk.py b/usr/src/tools/scripts/mapfilechk.py index 9cf2000c7a..ed90d8b426 100644 --- a/usr/src/tools/scripts/mapfilechk.py +++ b/usr/src/tools/scripts/mapfilechk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/nightly.sh b/usr/src/tools/scripts/nightly.sh index 664c05ffa5..87c038452e 100644 --- a/usr/src/tools/scripts/nightly.sh +++ b/usr/src/tools/scripts/nightly.sh @@ -25,6 +25,7 @@ # Copyright 2008, 2010, Richard Lowe # Copyright 2011 Nexenta Systems, Inc. All rights reserved. # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org> +# Copyright 2013 (c) Joyent, Inc. All rights reserved. # # Based on the nightly script from the integration folks, # Mostly modified and owned by mike_s. @@ -413,6 +414,9 @@ function build { rm -rf $PKGARCHIVE >> "$LOGFILE" 2>&1 mkdir -p $PKGARCHIVE >> "$LOGFILE" 2>&1 + /bin/time $MAKE -e stage-licenses 2>&1 | \ + tee -a $SRC/$d/${INSTALLOG}.out >> $LOGFILE + for d in pkg pkgdefs; do if [ ! -f "$SRC/$d/Makefile" ]; then continue @@ -1172,38 +1176,16 @@ elif [[ ! -x "$MAKE" ]]; then fi # get the dmake version string alone DMAKE_VERSION=$( $MAKE -v ) -DMAKE_VERSION=${DMAKE_VERSION#*: } -# focus in on just the dotted version number alone -DMAKE_MAJOR=$( echo $DMAKE_VERSION | \ - sed -e 's/.*\<\([^.]*\.[^ ]*\).*$/\1/' ) -# extract the second (or final) integer -DMAKE_MINOR=${DMAKE_MAJOR#*.} -DMAKE_MINOR=${DMAKE_MINOR%%.*} -# extract the first integer -DMAKE_MAJOR=${DMAKE_MAJOR%%.*} -CHECK_DMAKE=${CHECK_DMAKE:-y} -# x86 was built on the 12th, sparc on the 13th. -if [ "$CHECK_DMAKE" = "y" -a \ - "$DMAKE_VERSION" != "Sun Distributed Make 7.3 2003/03/12" -a \ - "$DMAKE_VERSION" != "Sun Distributed Make 7.3 2003/03/13" -a \( \ - "$DMAKE_MAJOR" -lt 7 -o \ - "$DMAKE_MAJOR" -eq 7 -a "$DMAKE_MINOR" -lt 4 \) ]; then - if [ -z "$DMAKE_VERSION" ]; then - echo "$MAKE is missing." - exit 1 - fi - echo `whence $MAKE`" version is:" - echo " ${DMAKE_VERSION}" +# Admittedly not the best check, but better than the old one. +if ! echo $DMAKE_VERSION | grep -q rm; then cat <<EOF - -This version may not be safe for use. Either set TEAMWARE to a better -path or (if you really want to use this version of dmake anyway), add -the following to your environment to disable this check: - - CHECK_DMAKE=n +The version of dmake you are using ($DMAKE_VERSION) is not the current open +source version for building illumos. Please ensure that you are building +illumos-joyent with the latest version of dmake in illumos-extra. EOF exit 1 fi + export PATH export MAKE diff --git a/usr/src/tools/scripts/validate_pkg.py b/usr/src/tools/scripts/validate_pkg.py index 2ac1e009d0..5bf8bd84f2 100644 --- a/usr/src/tools/scripts/validate_pkg.py +++ b/usr/src/tools/scripts/validate_pkg.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/webrev.sh b/usr/src/tools/scripts/webrev.sh index 7df8aa8b52..e3c1631c1b 100644 --- a/usr/src/tools/scripts/webrev.sh +++ b/usr/src/tools/scripts/webrev.sh @@ -3057,7 +3057,12 @@ done # # Output directory. # -WDIR=${WDIR:-$CWS/webrev} +if [[ $SCM_MODE == "git" ]]; then + ws_top_dir=$(dirname $CWS) + WDIR=${WDIR:-$ws_top_dir/webrev} +else + WDIR=${WDIR:-$CWS/webrev} +fi # # Name of the webrev, derived from the workspace name or output directory; @@ -3685,6 +3690,7 @@ do if [[ $SCM_MODE == "teamware" || $SCM_MODE == "mercurial" || + $SCM_MODE == "git" || $SCM_MODE == "unknown" ]]; then # Include warnings for important file mode situations: diff --git a/usr/src/tools/scripts/wsdiff.py b/usr/src/tools/scripts/wsdiff.py index 5156f03c20..b485a143a3 100644 --- a/usr/src/tools/scripts/wsdiff.py +++ b/usr/src/tools/scripts/wsdiff.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.6 +#!ON_PYTHON_26 # # CDDL HEADER START # |
