From leres@ee.lbl.gov  Sun Feb 23 13:13:58 1997
Received: from sky.ee.lbl.gov (sky.ee.lbl.gov [131.243.6.35])
          by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA02672
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 23 Feb 1997 13:13:57 -0800 (PST)
Received: by sky.ee.lbl.gov (8.8.5/1.43r)
	id NAA00561; Sun, 23 Feb 1997 13:13:53 -0800 (PST)
Message-Id: <199702232113.NAA00561@sky.ee.lbl.gov>
Date: Sun, 23 Feb 1997 13:13:53 -0800 (PST)
From: leres@ee.lbl.gov (Craig Leres)
Reply-To: leres@ee.lbl.gov
To: FreeBSD-gnats-submit@freebsd.org
Cc: leres@ee.lbl.gov
Subject:
X-Send-Pr-Version: 3.2

>Number:         2806
>Category:       kern
>Synopsis:       new kernel tags script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 23 13:20:03 PST 1997
>Closed-Date:    Thu Jul 1 21:01:27 PDT 1999
>Last-Modified:  Thu Jul  1 21:02:38 PDT 1999
>Originator:     Craig Leres
>Release:        FreeBSD 2.2-970215-GAMMA i386
>Organization:
Lawrence Berkeley National Laboratory
>Environment:

>Description:

	Appended is a script we use to generate kernel tags.  We
	like it better than /sys/kern/Makefile because our version
	only tags the "make depend" sources.

>How-To-Repeat:

>Fix:

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	Makefile.i386.patch
#	systags.sh
# This archive created: Sun Feb 23 13:13:21 1997
export PATH; PATH=/bin:$PATH
echo shar: extracting "'Makefile.i386.patch'" '(533 characters)'
if test -f 'Makefile.i386.patch'
then
	echo shar: will not over-write existing file "'Makefile.i386.patch'"
else
sed 's/^X//' << \SHAR_EOF > 'Makefile.i386.patch'
XRCS file: RCS/Makefile.i386,v
Xretrieving revision 1.1
Xdiff -c -r1.1 Makefile.i386
X*** /tmp/,RCSt1001541	Sun Feb 23 13:12:51 1997
X--- Makefile.i386	Wed Oct 16 21:39:09 1996
X***************
X*** 153,159 ****
X  	sh makelinks && rm -f dontlink
X  
X  tags:
X! 	@echo "see $S/kern/Makefile for tags"
X  
X  install: kernel
X  	chflags noschg /kernel
X--- 153,161 ----
X  	sh makelinks && rm -f dontlink
X  
X  tags:
X! 	sh -x $S/conf/systags.sh
X! 	rm -f tags1
X! 	sed -e 's,      ../,    ,' tags > tags1
X  
X  install: kernel
X  	chflags noschg /kernel
SHAR_EOF
if test 533 -ne "`wc -c < 'Makefile.i386.patch'`"
then
	echo shar: error transmitting "'Makefile.i386.patch'" '(should have been 533 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'systags.sh'" '(2896 characters)'
if test -f 'systags.sh'
then
	echo shar: will not over-write existing file "'systags.sh'"
else
sed 's/^X//' << \SHAR_EOF > 'systags.sh'
X#! /bin/sh
X#
X# Copyright (c) 1992, 1993
X#	The Regents of the University of California.  All rights reserved.
X#
X# Redistribution and use in source and binary forms, with or without
X# modification, are permitted provided that the following conditions
X# are met:
X# 1. Redistributions of source code must retain the above copyright
X#    notice, this list of conditions and the following disclaimer.
X# 2. Redistributions in binary form must reproduce the above copyright
X#    notice, this list of conditions and the following disclaimer in the
X#    documentation and/or other materials provided with the distribution.
X# 3. All advertising materials mentioning features or use of this software
X#    must display the following acknowledgement:
X#	This product includes software developed by the University of
X#	California, Berkeley and its contributors.
X# 4. Neither the name of the University nor the names of its contributors
X#    may be used to endorse or promote products derived from this software
X#    without specific prior written permission.
X#
X# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
X# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
X# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X# SUCH DAMAGE.
X#
X#	@(#)systags.sh	8.1 (Berkeley) 6/10/93
X#
X# systags.sh - construct a system tags file using dependence relations
X#	in a .depend file
X#
X# First written May 16, 1992 by Van Jacobson, Lawrence Berkeley Laboratory.
X#
X# from: $Header: systags.sh,v 1.3 96/08/08 20:23:13 leres Exp $
X
Xrm -f tags tags.tmp tags.cfiles tags.sfiles tags.hfiles
XMACHINE=`uname -m`
Xsed -e "s, machine/, ../../$MACHINE/include/,g" \
X	-e 's,[a-z][^/    ]*/\.\./,,g' .depend | awk '{
X		for (i = 1; i <= NF; ++i) {
X			t = substr($i, length($i) - 1)
X			if (t == ".c")
X				cfiles[$i] = 1;
X			else if (t == ".h")
X				hfiles[$i] = 1;
X			else if (t == ".s")
X				sfiles[$i] = 1;
X		}
X	};
X	END {
X		for (i in cfiles)
X			print i > "tags.cfiles";
X		for (i in sfiles)
X			print i > "tags.sfiles";
X		for (i in hfiles)
X			print i > "tags.hfiles";
X	}'
X
Xctags -t -d -w `cat tags.cfiles tags.hfiles tags.sfiles`
Xegrep "^ENTRY\(.*\)|^ALTENTRY\(.*\)" `cat tags.sfiles` | \
X    sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3	\1	/^\2(\3\4$/;" >> tags
X
Xmv tags tags.tmp
Xsort -u tags.tmp > tags
Xrm tags.tmp tags.cfiles tags.sfiles tags.hfiles
SHAR_EOF
if test 2896 -ne "`wc -c < 'systags.sh'`"
then
	echo shar: error transmitting "'systags.sh'" '(should have been 2896 characters)'
fi
fi # end of overwriting check
#	End of shell archive
exit 0

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: mpp 
Responsible-Changed-When: Sun Feb 23 23:26:08 PST 1997 
Responsible-Changed-Why:  
Misfiled PR.  Note: I did manual reformatting of this PR, so 
I hope I got it right :-). 
State-Changed-From-To: open->closed 
State-Changed-By: jkh 
State-Changed-When: Thu Jul 1 21:01:27 PDT 1999 
State-Changed-Why:  
committed, thanks!  Hey, and it only took 2 years! :-} 
>Unformatted:
