1.1 --- a/make/linux/makefiles/cscope.make Sun Apr 13 17:43:42 2008 -0400 1.2 +++ b/make/linux/makefiles/cscope.make Tue Apr 15 18:11:33 2008 -0400 1.3 @@ -38,6 +38,7 @@ 1.4 1.5 NAWK = awk 1.6 RM = rm -f 1.7 +HG = hg 1.8 CS_TOP = ../.. 1.9 1.10 CSDIRS = $(CS_TOP)/src $(CS_TOP)/build 1.11 @@ -140,14 +141,17 @@ 1.12 1.13 # .nametable.files and .nametable.files.tmp are used to determine if any files 1.14 # were added to/deleted from/renamed in the workspace. If not, then there's 1.15 -# normally no need to run find. To force a 'find': gmake nametable.clean. 1.16 +# normally no need to rebuild the cscope database. To force a rebuild of 1.17 +# the cscope database: gmake nametable.clean. 1.18 .nametable.files: .nametable.files.tmp 1.19 - cmp -s $@ $< || cp $< $@ 1.20 + ( cmp -s $@ $< ) || ( cp $< $@ ) 1.21 + -$(RM) $< 1.22 1.23 -.nametable.files.tmp: $(CS_TOP)/Codemgr_wsdata/nametable 1.24 - $(NAWK) \ 1.25 - '{ if (sub("( [a-z0-9]{2,8}){4}$$", "")) print $$0; }' $< > $@ 1.26 - 1.27 +# `hg status' is slightly faster than `hg fstatus'. Both are 1.28 +# quite a bit slower on an NFS mounted file system, so this is 1.29 +# really geared towards repos on local file systems. 1.30 +.nametable.files.tmp: 1.31 + -$(HG) fstatus -acmn > $@ 1.32 nametable.clean: 1.33 -$(RM) .nametable.files .nametable.files.tmp 1.34