home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Atari / Gnu / gdb36p4s.zoo / createtags < prev    next >
Text File  |  1989-07-13  |  1KB  |  36 lines

  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. for i in $@ ; do
  14.     filelist="$filelist $prefix$i"
  15. done
  16. #
  17. # Here we simply make sure that the actual machine dependent files being used
  18. # (if any) are ahead of all of the other machine dependent files in the list.
  19. # This means that M-. will (almost) always give you exactly the routine 
  20. # you want. 
  21. #
  22. if test -f param.h ; then
  23.     if `grep '^#define[     ]*COFF_FORMAT' param.h > /dev/null 2>&1`; then
  24.         frmatfile=${prefix}coffread.c
  25.     else
  26.         frmatfile=${prefix}dbxread.c
  27.     fi
  28.     hfile=$prefix`ls -l param.h | awk '{print $11}'`
  29.     dfile=$prefix`ls -l dep.c | awk '{print $11}'`
  30.     ofile=$prefix`ls -l opcode.h | awk '{print $11}'`
  31.     pfile=$prefix`ls -l pinsn.c | awk '{print $11}'`
  32.     etags $hfile $dfile $ofile $pfile $frmatfile $filelist
  33. else
  34.     etags $filelist
  35. fi
  36.