blob: 491694c3de3e7add92b1790fa37bf105ccc042c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/sh
#
# Here we check to see if we are compiling in a directory that contains
# symlinks to the source files instead of the actual files. If this is so,
# we setup the TAGS entries to point to the actual source directory.
#
filelist=""
if test -h main.c ; then
prefix=`ls -l main.c | awk '{print $11}' | sed 's;main.c$;;'`
echo path 1
else
prefix=""
fi
for i in $@ ; do
filelist="$prefix$i $filelist"
done
#
# Here we simply make sure that the actual machine dependent files being used
# (if any) are ahead of all of the other machine dependent files in the list.
# This means that M-. will (almost) always give you exactly the routine
# you want.
#
if test -f param.h ; then
if `grep '^#define[ ]*COFF_FORMAT' param.h > /dev/null 2>&1`; then
frmatfile=${prefix}coffread.c
else
frmatfile=${prefix}dbxread.c
fi
hfile=$prefix`ls -l param.h | awk '{print $11}'`
dfile=$prefix`ls -l dep.c | awk '{print $11}'`
ofile=$prefix`ls -l opcode.h | awk '{print $11}'`
pfile=$prefix`ls -l pinsn.c | awk '{print $11}'`
etags $hfile $dfile $ofile $pfile $frmatfile $filelist
else
etags $filelist
fi
|