systags.sh (22975) | systags.sh (48440) |
---|---|
1#! /bin/sh 2# 3# Copyright (c) 1992, 1993 4# The Regents of the University of California. All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 24 unchanged lines hidden (view full) --- 33# 34# @(#)systags.sh 8.1 (Berkeley) 6/10/93 35# 36# systags.sh - construct a system tags file using dependence relations 37# in a .depend file 38# 39# First written May 16, 1992 by Van Jacobson, Lawrence Berkeley Laboratory. 40# | 1#! /bin/sh 2# 3# Copyright (c) 1992, 1993 4# The Regents of the University of California. All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 24 unchanged lines hidden (view full) --- 33# 34# @(#)systags.sh 8.1 (Berkeley) 6/10/93 35# 36# systags.sh - construct a system tags file using dependence relations 37# in a .depend file 38# 39# First written May 16, 1992 by Van Jacobson, Lawrence Berkeley Laboratory. 40# |
41# $Id$ | 41# from: $Header: systags.sh,v 1.3 96/08/08 20:23:13 leres Exp $ |
42 43rm -f tags tags.tmp tags.cfiles tags.sfiles tags.hfiles | 42 43rm -f tags tags.tmp tags.cfiles tags.sfiles tags.hfiles |
44MACHINE=`machine` 45sed -e "s,\./machine/,../../$MACHINE/include/,g" \ 46 -e 's,[a-z][^/ ]*/\.\./,,g' .depend | awk '{ | 44MACHINE=`uname -m` 45sed -e "s, machine/, ../../$MACHINE/include/,g" \ 46 -e 's,[a-z][^/ ]*/\.\./,,g' .depend | awk '{ |
47 for (i = 1; i <= NF; ++i) { 48 t = substr($i, length($i) - 1) 49 if (t == ".c") 50 cfiles[$i] = 1; 51 else if (t == ".h") 52 hfiles[$i] = 1; 53 else if (t == ".s") 54 sfiles[$i] = 1; --- 4 unchanged lines hidden (view full) --- 59 print i > "tags.cfiles"; 60 for (i in sfiles) 61 print i > "tags.sfiles"; 62 for (i in hfiles) 63 print i > "tags.hfiles"; 64 }' 65 66ctags -t -d -w `cat tags.cfiles tags.hfiles tags.sfiles` | 47 for (i = 1; i <= NF; ++i) { 48 t = substr($i, length($i) - 1) 49 if (t == ".c") 50 cfiles[$i] = 1; 51 else if (t == ".h") 52 hfiles[$i] = 1; 53 else if (t == ".s") 54 sfiles[$i] = 1; --- 4 unchanged lines hidden (view full) --- 59 print i > "tags.cfiles"; 60 for (i in sfiles) 61 print i > "tags.sfiles"; 62 for (i in hfiles) 63 print i > "tags.hfiles"; 64 }' 65 66ctags -t -d -w `cat tags.cfiles tags.hfiles tags.sfiles` |
67egrep -o "^ENTRY\(.*\)|^ALTENTRY\(.*\)" `cat tags.sfiles` | \ | 67egrep "^ENTRY\(.*\)|^ALTENTRY\(.*\)" `cat tags.sfiles` | \ |
68 sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$/;" >> tags 69 70mv tags tags.tmp 71sort -u tags.tmp > tags 72rm tags.tmp tags.cfiles tags.sfiles tags.hfiles | 68 sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$/;" >> tags 69 70mv tags tags.tmp 71sort -u tags.tmp > tags 72rm tags.tmp tags.cfiles tags.sfiles tags.hfiles |