Mercurial > hg > graal-jvmci-8
comparison build/linux/makefiles/cscope.make @ 111:7747916a0945
6685160: fix cscope build with hg
Summary: Use hg's fstatus instead of teamware's nametable to trigger cscope database rebuild
Reviewed-by: jcoomes, kamg
author | ysr |
---|---|
date | Tue, 08 Apr 2008 12:10:35 -0700 |
parents | a61af66fc99e |
children |
comparison
equal
deleted
inserted
replaced
96:2acabb781f53 | 111:7747916a0945 |
---|---|
36 | 36 |
37 include $(GAMMADIR)/make/scm.make | 37 include $(GAMMADIR)/make/scm.make |
38 | 38 |
39 NAWK = awk | 39 NAWK = awk |
40 RM = rm -f | 40 RM = rm -f |
41 HG = hg | |
41 CS_TOP = ../.. | 42 CS_TOP = ../.. |
42 | 43 |
43 CSDIRS = $(CS_TOP)/src $(CS_TOP)/build | 44 CSDIRS = $(CS_TOP)/src $(CS_TOP)/build |
44 CSINCS = $(CSDIRS:%=-I%) | 45 CSINCS = $(CSDIRS:%=-I%) |
45 | 46 |
138 TAGS.clean: nametable.clean | 139 TAGS.clean: nametable.clean |
139 -$(RM) TAGS | 140 -$(RM) TAGS |
140 | 141 |
141 # .nametable.files and .nametable.files.tmp are used to determine if any files | 142 # .nametable.files and .nametable.files.tmp are used to determine if any files |
142 # were added to/deleted from/renamed in the workspace. If not, then there's | 143 # were added to/deleted from/renamed in the workspace. If not, then there's |
143 # normally no need to run find. To force a 'find': gmake nametable.clean. | 144 # normally no need to rebuild the cscope database. To force a rebuild of |
145 # the cscope database: gmake nametable.clean. | |
144 .nametable.files: .nametable.files.tmp | 146 .nametable.files: .nametable.files.tmp |
145 cmp -s $@ $< || cp $< $@ | 147 ( cmp -s $@ $< ) || ( cp $< $@ ) |
148 -$(RM) $< | |
146 | 149 |
147 .nametable.files.tmp: $(CS_TOP)/Codemgr_wsdata/nametable | 150 # `hg status' is slightly faster than `hg fstatus'. Both are |
148 $(NAWK) \ | 151 # quite a bit slower on an NFS mounted file system, so this is |
149 '{ if (sub("( [a-z0-9]{2,8}){4}$$", "")) print $$0; }' $< > $@ | 152 # really geared towards repos on local file systems. |
153 .nametable.files.tmp: | |
154 -$(HG) fstatus -acmn > $@ | |
150 | 155 |
151 nametable.clean: | 156 nametable.clean: |
152 -$(RM) .nametable.files .nametable.files.tmp | 157 -$(RM) .nametable.files .nametable.files.tmp |
153 | 158 |
154 FORCE: | 159 FORCE: |