diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2006-11-29 13:17:41 -0800 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2006-11-29 13:17:41 -0800 |
commit | d2a71f6b2aaad36c6420204266f006304d364ad7 (patch) | |
tree | ebeee540bf5bd860d24f69d96d677e7ce2e6bc9a /util/cscope-find.py | |
parent | ed78fc257b7e55a94cae6a54a0eacf7090ed7f26 (diff) | |
download | gem5-d2a71f6b2aaad36c6420204266f006304d364ad7.tar.xz |
cscope-find.py:
Write directly to 'cscope.files' and run 'cscope -b' .
Now this script does everything automatically.
cscope-index.py:
Rename: util/cscope-find.py -> util/cscope-index.py
util/cscope-find.py:
Write directly to 'cscope.files' and run 'cscope -b' .
Now this script does everything automatically.
--HG--
rename : util/cscope-find.py => util/cscope-index.py
extra : convert_revision : cd6fa5cc0c2146f7184c9213956aff67c7cb9341
Diffstat (limited to 'util/cscope-find.py')
-rwxr-xr-x | util/cscope-find.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/util/cscope-find.py b/util/cscope-find.py deleted file mode 100755 index 1775f1864..000000000 --- a/util/cscope-find.py +++ /dev/null @@ -1,38 +0,0 @@ -#! /usr/bin/python - -# Generate list of files to index with cscope. - -# From the m5 directory, run: -# util/cscope-find.py > cscope.files -# cscope -b - -import os - -# absolute paths to skip -skipdirs = [ 'src/unittest', 'src/doxygen' ] - -# suffixes of files to index -suffixes = [ '.cc', '.hh', '.c', '.h' ] - -def oksuffix(f): - for s in suffixes: - if f.endswith(s): - return True - return False - -for dirpath,subdirs,files in os.walk('src'): - # filter out undesirable subdirectories - for i,dir in enumerate(subdirs): - if dir == 'SCCS': - del subdirs[i] - break - - # filter out undesriable absolute paths - if dirpath in skipdirs: - del subdirs[:] - continue - - # find C/C++ sources - okfiles = [f for f in files if oksuffix(f)] - if okfiles: - print '\n'.join([os.path.join(dirpath, f) for f in okfiles]) |