From leres@hot.ee.lbl.gov  Wed Nov 18 11:41:15 1998
Received: from hot.ee.lbl.gov (hot.ee.lbl.gov [131.243.1.42])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA26352
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 18 Nov 1998 11:41:15 -0800 (PST)
          (envelope-from leres@hot.ee.lbl.gov)
Received: (from leres@localhost)
	by hot.ee.lbl.gov (8.9.1/8.9.1) id LAA00914;
	Wed, 18 Nov 1998 11:40:41 -0800 (PST)
Message-Id: <199811181940.LAA00914@hot.ee.lbl.gov>
Date: Wed, 18 Nov 1998 11:40:41 PST
From: Craig Leres <leres@ee.lbl.gov>
To: FreeBSD-gnats-submit@freebsd.org
Cc: leres@ee.lbl.gov (Craig Leres)
Subject: fixes for systags.sh
X-Send-Pr-Version: 3.2

>Number:         8747
>Category:       kern
>Synopsis:       [PATCH] fixes for systags.sh
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 18 11:50:00 PST 1998
>Closed-Date:    Thu Jul 1 21:03:03 PDT 1999
>Last-Modified:  Thu Jul  1 21:05:19 PDT 1999
>Originator:     Craig Leres
>Release:        FreeBSD 3.0-RELEASE i386
>Organization:
Lawrence Berkeley National Laboratory
>Environment:

	Kernel hacking.

>Description:

	The systags.sh script suffers from some minor bit-rot. 

>How-To-Repeat:

	For example, it uses "machine" (doesn't exist) and "egrep -o"
	(no such flag).

	Also, the "tags" target for the i386 Makefile says:

	    @echo "see $S/kern/Makefile for tags"
	
	when it should just invoke systags.sh directly

>Fix:
	
	Context diffs to conf/systags.sh and i386/conf/Makefile.i386
	are appended.

RCS file: RCS/systags.sh,v
retrieving revision 1.1
diff -c -r1.1 systags.sh
*** /tmp/,RCSt1d12056	Wed Nov 18 11:31:00 1998
--- systags.sh	Wed Nov 18 02:49:32 1998
***************
*** 38,49 ****
  #
  # First written May 16, 1992 by Van Jacobson, Lawrence Berkeley Laboratory.
  #
! # $Id: systags.sh,v 1.4 1997/02/22 09:28:15 peter Exp $
  
  rm -f tags tags.tmp tags.cfiles tags.sfiles tags.hfiles
! MACHINE=`machine`
! sed -e "s,\./machine/,../../$MACHINE/include/,g" \
!     -e 's,[a-z][^/ 	]*/\.\./,,g' .depend | awk   '{
  		for (i = 1; i <= NF; ++i) {
  			t = substr($i, length($i) - 1)
  			if (t == ".c")
--- 38,49 ----
  #
  # First written May 16, 1992 by Van Jacobson, Lawrence Berkeley Laboratory.
  #
! # from: $Header: systags.sh,v 1.2 98/04/16 12:48:21 leres Exp $
  
  rm -f tags tags.tmp tags.cfiles tags.sfiles tags.hfiles
! MACHINE=`uname -m`
! sed -e "s, machine/, ../../$MACHINE/include/,g" \
! 	-e 's,[a-z][^/    ]*/\.\./,,g' .depend | awk '{
  		for (i = 1; i <= NF; ++i) {
  			t = substr($i, length($i) - 1)
  			if (t == ".c")
***************
*** 64,70 ****
  	}'
  
  ctags -t -d -w `cat tags.cfiles tags.hfiles tags.sfiles`
! egrep -o "^ENTRY\(.*\)|^ALTENTRY\(.*\)" `cat tags.sfiles` | \
      sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3	\1	/^\2(\3\4$/;" >> tags
  
  mv tags tags.tmp
--- 64,70 ----
  	}'
  
  ctags -t -d -w `cat tags.cfiles tags.hfiles tags.sfiles`
! egrep "^ENTRY\(.*\)|^ALTENTRY\(.*\)" `cat tags.sfiles` | \
      sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3	\1	/^\2(\3\4$/;" >> tags
  
  mv tags tags.tmp


*** /tmp/,RCSt1t12061	Wed Nov 18 11:31:41 1998
--- Makefile.i386	Tue Nov 17 19:03:20 1998
***************
*** 1,7 ****
  # Makefile.i386 -- with config changes.
  # Copyright 1990 W. Jolitz
  #	from: @(#)Makefile.i386	7.1 5/10/91
! #	$Id: Makefile.i386,v 1.126 1998/10/10 01:00:56 peter Exp $
  #
  # Makefile for FreeBSD
  #
--- 1,7 ----
  # Makefile.i386 -- with config changes.
  # Copyright 1990 W. Jolitz
  #	from: @(#)Makefile.i386	7.1 5/10/91
! #	$Id: Makefile.i386,v 1.2 1998/11/18 03:03:15 leres Exp $
  #
  # Makefile for FreeBSD
  #
***************
*** 207,214 ****
  	  sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
  	sh makelinks && rm -f dontlink
  
! tags:
! 	@echo "see $S/kern/Makefile for tags"
  
  install:
  	@if [ ! -f kernel ] ; then \
--- 207,216 ----
  	  sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
  	sh makelinks && rm -f dontlink
  
! tags: .depend
! 	sh -x $S/conf/systags.sh
! 	rm -f tags1
! 	sed -e 's,      ../,    ,' tags > tags1
  
  install:
  	@if [ ! -f kernel ] ; then \
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: jkh 
State-Changed-When: Thu Jul 1 21:03:03 PDT 1999 
State-Changed-Why:  
Duplicate of PR#2806 which was just closed (in both branches). 
Please let me know if you have any other PRs currently stalled in 
the system. -jkh 
>Unformatted:
