Differences

This shows you the differences between two versions of the page.

Link to this comparison view

makectags [2014/10/26 01:52] (current)
Line 1: Line 1:
 +==== Use C Tags - shell script to automate process ==== 
 +<​code>​ 
 +#​!/​usr/​local/​bin/​bash 
 +argv0=${0##​*/​} 
 +usage="​$argv0"​ 
 +    
 +# project-specific vars 
 +SRCDIRS="​$HOME/​main"​ 
 +WTAGS=$HOME/​tmp/​TAGS.alerts 
 +       
 +# generic tags file 
 +TAGS=$HOME/​tmp/​TAGS 
 +CTAGS=`which ctags` 
 +FIND=/​usr/​bin/​find 
 +       
 +# exclude whatever by whatever 
 +EXCLUDEFILE=$HOME/​.ctags-exclude 
 +EXCLUDED=foobar 
 +while read f ; do 
 +        EXCLUDED="​$EXCLUDED|$f"​ 
 +done < $EXCLUDEFILE 
 +       
 +#​sortparam=foldcase 
 +sortparam=yes 
 +     
 +# set -x 
 +       
 +# build a tags file 
 +$FIND $SRCDIRS \( -name \*.c -o -name \*.cpp ​ -o -name \*.h \) | egrep -v $EXCLUDED | $CTAGS -a -f $WTAGS --sort=$sortparam -L - # 2>/​dev/​null 
 +     
 +# point THE tags file to this project-specific output 
 +rm -f $TAGS && ln -s ${WTAGS#​$HOME/​tmp/​} $TAGS 
 +</​code>​
makectags.txt · Last modified: 2014/10/26 01:52 (external edit)
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0