This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ecos & ctags


Hi,

I use tags and xemacs (emacs) to navigate around ecos code. It isn't
perfect but works quite well. I use two tag files for ecos - one for
the generic sources and one for the built sources.

I let emacs choose the correct TAGS file to use by specifying a
tag-table-alist in that it enforces ordering on the search yet will
search multiple TAGS files.

So for what it is worth here is my tag-table-alist:

--------------- In ~/.emacs -------------------------------
(setq tags-auto-read-changed-tag-files t)
(setq tag-table-alist
	  '(
		("/home/briand/dev/0100_Piglet/Software/src/" . "/home/briand/dev/0100_Piglet/Software/src/")
		("/home/briand/dev/0100_Piglet/Software/src/" . "/home/briand/curecos/install/include/")
		("" . "/home/briand/ext/cvs/ecos/ecos/packages/")
		))
------------------------------------------------------------

And my hacked together bash shell script to build the TAGS files:
(it is crude but only took 15 minutes to write and debug)

--------------- In doecostags.sh ---------------------------
base_dir=/home/briand
src_dir=${base_dir}/ext/cvs/ecos/ecos/packages
build_dir=${base_dir}/curecos/install/include

echo Doing ecos source tags

find ${src_dir} \
\( -name iTupdated -o -name mips -o -name mn10300 -o -name powerpc -o -name cq7708 -o \
-name cq7750 -o -name edk7708 \) -prune -o \
\( -name arm -o -name cf -o -name flash -o -name aeb -o -name i386 -o -name v85x \) -prune -o \
\( -name pci -o -name pcmcia -o -name sparclite -o -name sh4 \) -prune -o \
\( -name uitron -o -name tests -o -name redboot -o -name cygmon \) -prune -o \
\( -name '*.c' -o -name '*.cxx' \) -print >> ~/ecossrc.txt

cat ~/ecossrc.txt | etags -C --output=${src_dir}/TAGS -

echo Doing ecos build tags

find ${build_dir} \
\( -name '*.h' -o -name '*.hxx' \) -print > ~/ecosbuild.txt

find ${build_dir} \
\( -name '*.inl' \) -print >> ~/ecosbuild.txt

cat ~/ecosbuild.txt | etags -C --output=${build_dir}/TAGS -

# clean up
rm ~/ecossrc.txt ~/ecosbuild.txt
-----------------------------------------------------------------

-- 
Brian Danilko - Software Design and Implementation
  @ Inspiration Technology P/L (Brian.Danilko@instech.com.au)
       Signal Processing Research & Design
  @ Formal Solutions (bdanilko@formalsolutions.com.au)
       Software Development, Technical Writing & Training


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]