Instantly share code, notes, and snippets.
Last active
November 11, 2016 03:32
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save yen3/e51b790843e9d9b5936336be2a618719 to your computer and use it in GitHub Desktop.
A simple script to create ctags & cscope files for gcc 6.2.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
find . -type f ! -path "*testsuite*" \ | |
! -path "./.git/*" \ | |
! -path "./gcc/testsuite/*" \ | |
! -path "./INSTALL/*" \ | |
! -path "./config/*" \ | |
! -path "./libquadmath/*" \ | |
! -path "./libssp/*" \ | |
! -path "./libgo/*" \ | |
! -path "./libtm/*" \ | |
! -path "./libjava/*" \ | |
! -path "./libgomp/*" \ | |
! -path "./libvtv/*" \ | |
! -path "./libitm/*" \ | |
! -path "./libffi/*" \ | |
! -path "./libcilkrts/*" \ | |
! -path "./libcpp/*" \ | |
! -path "./libada/*" \ | |
! -path "./gotools/*" \ | |
! -path "./libgfortran/*" \ | |
! -path "./libobjc/*" \ | |
! -path "./libsanitizer/*" \ | |
! -path "./maintainer-scripts/*" \ | |
! -path "./mpc-1.0.3/*" \ | |
! -path "./mpc-0.8.1/*" \ | |
! -path "./gmp-6.1.0/*" \ | |
! -path "./gmp-4.3.2/*" \ | |
! -path "./mpfr-3.1.4/*" \ | |
! -path "./mpfr-2.4.2/*" \ | |
! -path "./isl-0.16.1/*" \ | |
! -path "./isl-0.15/*" \ | |
! -path "./mpc/*" \ | |
! -path "./gmp/*" \ | |
! -path "./mpfr/*" \ | |
! -path "./isl/*" \ | |
! -path "./zlib/*" \ | |
! -path "./boehm-gc/*" \ | |
! -path "./contrib/*" \ | |
! -path "./gnattools/*" \ | |
! -path "./zlib" \ | |
! -path "./libstdc++-v3/*" \ | |
! -path "./libstdc++-v3/doc/*" \ | |
! -path "./gcc/ada/*" \ | |
! -path "./gcc/fortran/*" \ | |
! -path "./gcc/go/*" \ | |
! -path "./gcc/objc/*" \ | |
! -path "./gcc/config/mmix/*" \ | |
! -path "./gcc/config/visium/*" \ | |
! -path "./gcc/config/tilepro/*" \ | |
! -path "./gcc/config/pdp11/*" \ | |
! -path "./gcc/config/h8300/*" \ | |
! -path "./gcc/config/arc/*" \ | |
! -path "./gcc/config/cris/*" \ | |
! -path "./gcc/config/m32r/*" \ | |
! -path "./gcc/config/nios2/*" \ | |
! -path "./gcc/config/vms/*" \ | |
! -path "./gcc/config/nvptx/*" \ | |
! -path "./gcc/config/stormy16/*" \ | |
! -path "./gcc/config/s390/*" \ | |
! -path "./gcc/config/epiphany/*" \ | |
! -path "./gcc/config/microblaze/*" \ | |
! -path "./gcc/config/mep/*" \ | |
! -path "./gcc/config/v850/*" \ | |
! -path "./gcc/config/ft32/*" \ | |
! -path "./gcc/config/sh/*" \ | |
! -path "./gcc/config/sparc/*" \ | |
! -path "./gcc/config/moxie/*" \ | |
! -path "./gcc/config/m32c/*" \ | |
! -path "./gcc/config/rx/*" \ | |
! -path "./gcc/config/msp430/*" \ | |
! -path "./gcc/config/spu/*" \ | |
! -path "./gcc/config/m68k/*" \ | |
! -path "./gcc/config/fr30/*" \ | |
! -path "./gcc/config/bfin/*" \ | |
! -path "./gcc/config/frv/*" \ | |
! -path "./gcc/config/vax/*" \ | |
! -path "./gcc/config/tilegx/*" \ | |
! -path "./gcc/config/iq2000/*" \ | |
! -path "./gcc/config/pa/*" \ | |
! -path "./gcc/config/c6x/*" \ | |
! -path "./gcc/config/mcore/*" \ | |
! -path "./gcc/config/mips/*" \ | |
! -path "./gcc/config/rl78/*" \ | |
! -path "./gcc/config/avr/*" \ | |
! -path "./gcc/config/rs6000/*" \ | |
! -path "./gcc/config/alpha/*" \ | |
! -path "./gcc/config/ia64/*" \ | |
! -path "./gcc/config/mn10300/*" \ | |
! -path "./gcc/config/cr16/*" \ | |
! -path "./gcc/config/lm32/*" \ | |
! -path "./gcc/config/xtensa/*" \ | |
! -path "./libgcc/config/mmix/*" \ | |
! -path "./libgcc/config/visium/*" \ | |
! -path "./libgcc/config/tilepro/*" \ | |
! -path "./libgcc/config/pdp11/*" \ | |
! -path "./libgcc/config/h8300/*" \ | |
! -path "./libgcc/config/arc/*" \ | |
! -path "./libgcc/config/arc/gmon/*" \ | |
! -path "./libgcc/config/arc/gmon/sys/*" \ | |
! -path "./libgcc/config/arc/ieee-754/*" \ | |
! -path "./libgcc/config/arc/ieee-754/arc600-dsp/*" \ | |
! -path "./libgcc/config/arc/ieee-754/arc600/*" \ | |
! -path "./libgcc/config/arc/ieee-754/arc600-mul64/*" \ | |
! -path "./libgcc/config/cris/*" \ | |
! -path "./libgcc/config/m32r/*" \ | |
! -path "./libgcc/config/nios2/*" \ | |
! -path "./libgcc/config/vms/*" \ | |
! -path "./libgcc/config/nvptx/*" \ | |
! -path "./libgcc/config/stormy16/*" \ | |
! -path "./libgcc/config/s390/*" \ | |
! -path "./libgcc/config/s390/32/*" \ | |
! -path "./libgcc/config/epiphany/*" \ | |
! -path "./libgcc/config/epiphany/ieee-754/*" \ | |
! -path "./libgcc/config/microblaze/*" \ | |
! -path "./libgcc/config/mep/*" \ | |
! -path "./libgcc/config/v850/*" \ | |
! -path "./libgcc/config/ft32/*" \ | |
! -path "./libgcc/config/sh/*" \ | |
! -path "./libgcc/config/sparc/*" \ | |
! -path "./libgcc/config/moxie/*" \ | |
! -path "./libgcc/config/m32c/*" \ | |
! -path "./libgcc/config/rx/*" \ | |
! -path "./libgcc/config/msp430/*" \ | |
! -path "./libgcc/config/spu/*" \ | |
! -path "./libgcc/config/m68k/*" \ | |
! -path "./libgcc/config/fr30/*" \ | |
! -path "./libgcc/config/bfin/*" \ | |
! -path "./libgcc/config/frv/*" \ | |
! -path "./libgcc/config/vax/*" \ | |
! -path "./libgcc/config/tilegx/*" \ | |
! -path "./libgcc/config/iq2000/*" \ | |
! -path "./libgcc/config/pa/*" \ | |
! -path "./libgcc/config/c6x/*" \ | |
! -path "./libgcc/config/mcore/*" \ | |
! -path "./libgcc/config/mips/*" \ | |
! -path "./libgcc/config/score/*" \ | |
! -path "./libgcc/config/rl78/*" \ | |
! -path "./libgcc/config/avr/*" \ | |
! -path "./libgcc/config/rs6000/*" \ | |
! -path "./libgcc/config/alpha/*" \ | |
! -path "./libgcc/config/ia64/*" \ | |
! -path "./libgcc/config/cr16/*" \ | |
! -path "./libgcc/config/lm32/*" \ | |
! -path "./libgcc/config/libbid/*" \ | |
! -path "./libgcc/config/sol2/*" \ | |
! -path "./libgcc/config/xtensa/*" \ | |
! -name "*.py" \ | |
! -name "*.tar.gz" \ | |
! -name "*.tar.bz2" \ | |
! -name "*.html" \ | |
! -name "ChangeLog*" \ | |
! -name "*.m4" \ | |
! -name "*.am" \ | |
! -name "*.in" \ | |
! -name "*.sh" \ | |
! -name "*.texi" \ | |
! -name "configure" \ | |
! -name "*.el" \ | |
! -name "README" \ | |
! -name "MD5SUMS" \ | |
! -name "configure.ac" \ | |
! -name "tags" \ | |
! -name "cscope.*" \ | |
-print \ | |
> cscope.files | |
find ../build_gcc/gcc/ -type f -name "*.h" -o -name "*.c" \ | |
>> cscope.files | |
ctags -R --langmap="c++:.c.h.cpp.cxx" --c++-kinds=+p --fields=+iaS \ | |
-I GTY+ -I VEC+ -I DEF_VEC_P+ \ | |
--extra=+q -L cscope.files | |
cscope -b -q -k -i cscope.files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment