8354 sync regcomp(3C) with upstream (fix make catalog)
[unleashed/tickless.git] / usr / src / cmd / sgs / tools / bld_lint.sh
blob730a3fb9ee08fef20518ea13d278872222bfc577
1 #! /usr/bin/sh
3 # CDDL HEADER START
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
20 # CDDL HEADER END
24 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
25 # Use is subject to license terms.
27 # ident "%Z%%M% %I% %E% SMI"
30 DASHES="============================================================"
32 MACH= `uname -p`
34 if [ $MACH = "sparc" ]
35 then
36 MACH64="sparcv9"
37 elif [ $MACH = "i386" ]
38 then
39 MACH64="amd64"
40 else
41 MACH64="unknown"
44 LOG=lint.$MACH.log
47 # Keep the first run as a backup, so that subsequent runs can diff against it.
49 if [ -f $LOG ]
50 then
51 if [ ! -f $LOG.bak ]
52 then
53 mv $LOG $LOG.bak
54 else
55 rm -f $LOG
60 # Grab the lint.out from all of our directories.
62 for ii in $*
64 if [ $ii = ".WAIT" ]
65 then
66 continue
69 # Concatinate the lint.out to our log file.
70 # echo $ii/$MACH >> $LOG
71 echo $DASHES >> $LOG
72 cat $ii/$MACH/lint.out >> $LOG
73 echo "\n" >> $LOG
75 # If there is a 64-bit directory, tack that on as well.
76 if [ -f $ii/$MACH64/lint.out ]
77 then
78 # echo $ii/$MACH64 >> $LOG
79 echo $DASHES >> $LOG
80 cat $ii/$MACH64/lint.out >> $LOG
81 echo "\n" >> $LOG
83 done
86 # If there is a backup log, diff the current one against it.
88 if [ -f $LOG.bak ]
89 then
90 echo "Running diff on log file..."
91 diff $LOG.bak $LOG
94 exit 0