]>
Commit | Line | Data |
---|---|---|
dd3b648e RP |
1 | #!/bin/sh |
2 | # | |
3 | # Here we check to see if we are compiling in a directory that contains | |
4 | # symlinks to the source files instead of the actual files. If this is so, | |
5 | # we setup the TAGS entries to point to the actual source directory. | |
6 | # | |
7 | filelist="" | |
8 | if test "`find main.c -type l -print `" != "" ; then | |
9 | prefix=`ls -l main.c | awk '{print $11}' | sed 's;main.c$;;'` | |
10 | else | |
11 | prefix="" | |
12 | fi | |
13 | ||
14 | # Replace .o at end of filename with .c | |
15 | for i in $@ ; do | |
16 | file=`echo $i-x- | sed -e 's/\.o-x-/\.c-x-/' | sed -e 's/-x-//'` | |
17 | filelist="$filelist $prefix$file" | |
18 | done | |
19 | ||
20 | etags $filelist |