diff --git a/build/linux/makefiles/cscope.make b/build/linux/makefiles/cscope.make index 149da2658700e09cfb6323b2c924652bbd170e91..458e0e2109f9c49859b3bf6dc84612a2f474490f 100644 --- a/build/linux/makefiles/cscope.make +++ b/build/linux/makefiles/cscope.make @@ -38,6 +38,7 @@ include $(GAMMADIR)/make/scm.make NAWK = awk RM = rm -f +HG = hg CS_TOP = ../.. CSDIRS = $(CS_TOP)/src $(CS_TOP)/build @@ -140,13 +141,17 @@ TAGS.clean: nametable.clean # .nametable.files and .nametable.files.tmp are used to determine if any files # were added to/deleted from/renamed in the workspace. If not, then there's -# normally no need to run find. To force a 'find': gmake nametable.clean. +# normally no need to rebuild the cscope database. To force a rebuild of +# the cscope database: gmake nametable.clean. .nametable.files: .nametable.files.tmp - cmp -s $@ $< || cp $< $@ - -.nametable.files.tmp: $(CS_TOP)/Codemgr_wsdata/nametable - $(NAWK) \ - '{ if (sub("( [a-z0-9]{2,8}){4}$$", "")) print $$0; }' $< > $@ + ( cmp -s $@ $< ) || ( cp $< $@ ) + -$(RM) $< + +# `hg status' is slightly faster than `hg fstatus'. Both are +# quite a bit slower on an NFS mounted file system, so this is +# really geared towards repos on local file systems. +.nametable.files.tmp: + -$(HG) fstatus -acmn > $@ nametable.clean: -$(RM) .nametable.files .nametable.files.tmp diff --git a/build/solaris/makefiles/cscope.make b/build/solaris/makefiles/cscope.make index 20644ec81512471a0a707749503b10ca462cac86..5eeb467ef66fcd53d8b8667fabd1cbd7f81f26ef 100644 --- a/build/solaris/makefiles/cscope.make +++ b/build/solaris/makefiles/cscope.make @@ -38,6 +38,7 @@ include $(GAMMADIR)/make/scm.make NAWK = /usr/xpg4/bin/awk RM = rm -f +HG = hg CS_TOP = ../.. CSDIRS = $(CS_TOP)/src $(CS_TOP)/build @@ -141,13 +142,17 @@ TAGS.clean: nametable.clean # .nametable.files and .nametable.files.tmp are used to determine if any files # were added to/deleted from/renamed in the workspace. If not, then there's -# normally no need to run find. To force a 'find': gmake nametable.clean. +# normally no need to rebuild the cscope database. To force a rebuild of +# the cscope database: gmake nametable.clean. .nametable.files: .nametable.files.tmp - cmp -s $@ $< || cp $< $@ - -.nametable.files.tmp: $(CS_TOP)/Codemgr_wsdata/nametable - $(NAWK) \ - '{ if (sub("( [a-z0-9]{2,8}){4}$$", "")) print $$0; }' $< > $@ + ( cmp -s $@ $< ) || ( cp $< $@ ) + -$(RM) $< + +# `hg status' is slightly faster than `hg fstatus'. Both are +# quite a bit slower on an NFS mounted file system, so this is +# really geared towards repos on local file systems. +.nametable.files.tmp: + -$(HG) fstatus -acmn > $@ nametable.clean: -$(RM) .nametable.files .nametable.files.tmp