7037250: cscope.make database generation is silently broken

Sat, 23 Apr 2011 04:20:09 -0700

author
jcoomes
date
Sat, 23 Apr 2011 04:20:09 -0700
changeset 2823
d6cdc6c77582
parent 2822
7f3faf7159fd
child 2824
c303b3532d4a

7037250: cscope.make database generation is silently broken
Reviewed-by: stefank

make/cscope.make file | annotate | diff | comparison | revisions
make/linux/Makefile file | annotate | diff | comparison | revisions
make/linux/makefiles/cscope.make file | annotate | diff | comparison | revisions
make/solaris/Makefile file | annotate | diff | comparison | revisions
make/solaris/makefiles/cscope.make file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/make/cscope.make	Sat Apr 23 04:20:09 2011 -0700
     1.3 @@ -0,0 +1,141 @@
     1.4 +#
     1.5 +# Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
     1.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 +#
     1.8 +# This code is free software; you can redistribute it and/or modify it
     1.9 +# under the terms of the GNU General Public License version 2 only, as
    1.10 +# published by the Free Software Foundation.
    1.11 +#
    1.12 +# This code is distributed in the hope that it will be useful, but WITHOUT
    1.13 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.14 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.15 +# version 2 for more details (a copy is included in the LICENSE file that
    1.16 +# accompanied this code).
    1.17 +#
    1.18 +# You should have received a copy of the GNU General Public License version
    1.19 +# 2 along with this work; if not, write to the Free Software Foundation,
    1.20 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.21 +#
    1.22 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.23 +# or visit www.oracle.com if you need additional information or have any
    1.24 +# questions.
    1.25 +#  
    1.26 +#
    1.27 +
    1.28 +# The cscope.out file is generated in the current directory.  The old cscope.out
    1.29 +# file is *not* removed because cscope is smart enough to only build what has
    1.30 +# changed.  cscope can be confused if files are renamed or removed, so it may be
    1.31 +# necessary to remove cscope.out (gmake cscope.clean) if a lot of reorganization
    1.32 +# has occurred.
    1.33 +
    1.34 +include $(GAMMADIR)/make/scm.make
    1.35 +
    1.36 +RM	= rm -f
    1.37 +HG	= hg
    1.38 +CS_TOP	= $(GAMMADIR)
    1.39 +
    1.40 +CSDIRS	= $(CS_TOP)/src $(CS_TOP)/make
    1.41 +CSINCS	= $(CSDIRS:%=-I%)
    1.42 +
    1.43 +CSCOPE		= cscope
    1.44 +CSCOPE_OUT	= cscope.out
    1.45 +CSCOPE_FLAGS	= -b
    1.46 +
    1.47 +# Allow .java files to be added from the environment (CSCLASSES=yes).
    1.48 +ifdef	CSCLASSES
    1.49 +ADDCLASSES=	-o -name '*.java'
    1.50 +endif
    1.51 +
    1.52 +# Adding CClassHeaders also pushes the file count of a full workspace up about
    1.53 +# 200 files (these files also don't exist in a new workspace, and thus will
    1.54 +# cause the recreation of the database as they get created, which might seem
    1.55 +# a little confusing).  Thus allow these files to be added from the environment
    1.56 +# (CSHEADERS=yes).
    1.57 +ifndef	CSHEADERS
    1.58 +RMCCHEADERS=	-o -name CClassHeaders
    1.59 +endif
    1.60 +
    1.61 +# Ignore build products.
    1.62 +CS_PRUNE_GENERATED	= -o -name '${OSNAME}_*_core' -o \
    1.63 +			     -name '${OSNAME}_*_compiler?'
    1.64 +
    1.65 +# O/S-specific files for all systems are included by default.  Set CS_OS to a
    1.66 +# space-separated list of identifiers to include only those systems.
    1.67 +ifdef	CS_OS
    1.68 +CS_PRUNE_OS	= $(patsubst %,-o -name '*%*',\
    1.69 +		    $(filter-out ${CS_OS},linux macos solaris windows))
    1.70 +endif
    1.71 +
    1.72 +# CPU-specific files for all processors are included by default.  Set CS_CPU 
    1.73 +# space-separated list identifiers to include only those CPUs.
    1.74 +ifdef	CS_CPU
    1.75 +CS_PRUNE_CPU	= $(patsubst %,-o -name '*%*',\
    1.76 +		    $(filter-out ${CS_CPU},arm ppc sparc x86 zero))
    1.77 +endif
    1.78 +
    1.79 +# What files should we include?  A simple rule might be just those files under
    1.80 +# SCCS control, however this would miss files we create like the opcodes and
    1.81 +# CClassHeaders.  The following attempts to find everything that is *useful*.
    1.82 +# (.del files are created by sccsrm, demo directories contain many .java files
    1.83 +# that probably aren't useful for development, and the pkgarchive may contain
    1.84 +# duplicates of files within the source hierarchy).
    1.85 +
    1.86 +# Directories to exclude.
    1.87 +CS_PRUNE_STD	= $(SCM_DIRS) \
    1.88 +		  -o -name '.del-*' \
    1.89 +		  -o -name '*demo' \
    1.90 +		  -o -name pkgarchive
    1.91 +
    1.92 +# Placeholder for user-defined excludes.
    1.93 +CS_PRUNE_EX	=
    1.94 +
    1.95 +CS_PRUNE	= $(CS_PRUNE_STD) \
    1.96 +		  $(CS_PRUNE_OS) \
    1.97 +		  $(CS_PRUNE_CPU) \
    1.98 +		  $(CS_PRUNE_GENERATED) \
    1.99 +		  $(CS_PRUNE_EX) \
   1.100 +		  $(RMCCHEADERS)
   1.101 +
   1.102 +# File names to include.
   1.103 +CSFILENAMES	= -name '*.[ch]pp' \
   1.104 +		  -o -name '*.[Ccshlxy]' \
   1.105 +		  $(CS_ADD_GENERATED) \
   1.106 +		  -o -name '*.d' \
   1.107 +		  -o -name '*.il' \
   1.108 +		  -o -name '*.cc' \
   1.109 +		  -o -name '*[Mm]akefile*' \
   1.110 +		  -o -name '*.gmk' \
   1.111 +		  -o -name '*.make' \
   1.112 +		  -o -name '*.ad' \
   1.113 +		  $(ADDCLASSES)
   1.114 +
   1.115 +.PHONY:		cscope cscope.clean cscope.scratch TAGS.clean FORCE
   1.116 +.PRECIOUS:	cscope.out
   1.117 +
   1.118 +cscope $(CSCOPE_OUT): cscope.files FORCE
   1.119 +	$(CSCOPE) -f $(CSCOPE_OUT) $(CSCOPE_FLAGS)
   1.120 +
   1.121 +cscope.clean:
   1.122 +	$(QUIETLY) $(RM) $(CSCOPE_OUT) cscope.files
   1.123 +
   1.124 +cscope.scratch:  cscope.clean cscope
   1.125 +
   1.126 +# The raw list is reordered so cscope displays the most relevant files first.
   1.127 +cscope.files:
   1.128 +	$(QUIETLY)						\
   1.129 +	raw=cscope.$$$$;					\
   1.130 +	find $(CSDIRS) -type d \( $(CS_PRUNE) \) -prune -o	\
   1.131 +	    -type f \( $(CSFILENAMES) \) -print > $$raw;	\
   1.132 +	{							\
   1.133 +	echo "$(CSINCS)";					\
   1.134 +	egrep -v "\.java|/make/" $$raw;				\
   1.135 +	fgrep ".java" $$raw;					\
   1.136 +	fgrep "/make/" $$raw;					\
   1.137 +	} > $@;							\
   1.138 +	rm -f $$raw
   1.139 +
   1.140 +TAGS:  cscope.files FORCE
   1.141 +	egrep -v '^-|^$$' $< | etags --members -
   1.142 +
   1.143 +TAGS.clean:
   1.144 +	$(RM) TAGS
     2.1 --- a/make/linux/Makefile	Fri Apr 22 09:26:09 2011 -0700
     2.2 +++ b/make/linux/Makefile	Sat Apr 23 04:20:09 2011 -0700
     2.3 @@ -359,7 +359,7 @@
     2.4  
     2.5  clean:  clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_docs
     2.6  
     2.7 -include $(GAMMADIR)/make/$(OSNAME)/makefiles/cscope.make
     2.8 +include $(GAMMADIR)/make/cscope.make
     2.9  
    2.10  #-------------------------------------------------------------------------------
    2.11  
     3.1 --- a/make/linux/makefiles/cscope.make	Fri Apr 22 09:26:09 2011 -0700
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,160 +0,0 @@
     3.4 -#
     3.5 -# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
     3.6 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.7 -#
     3.8 -# This code is free software; you can redistribute it and/or modify it
     3.9 -# under the terms of the GNU General Public License version 2 only, as
    3.10 -# published by the Free Software Foundation.
    3.11 -#
    3.12 -# This code is distributed in the hope that it will be useful, but WITHOUT
    3.13 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    3.14 -# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    3.15 -# version 2 for more details (a copy is included in the LICENSE file that
    3.16 -# accompanied this code).
    3.17 -#
    3.18 -# You should have received a copy of the GNU General Public License version
    3.19 -# 2 along with this work; if not, write to the Free Software Foundation,
    3.20 -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    3.21 -#
    3.22 -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    3.23 -# or visit www.oracle.com if you need additional information or have any
    3.24 -# questions.
    3.25 -#  
    3.26 -#
    3.27 -
    3.28 -#
    3.29 -# The cscope.out file is made in the current directory and spans the entire
    3.30 -# source tree.
    3.31 -#
    3.32 -# Things to note:
    3.33 -#	1. We use relative names for cscope.
    3.34 -#	2. We *don't* remove the old cscope.out file, because cscope is smart
    3.35 -#	   enough to only build what has changed.  It can be confused, however,
    3.36 -#	   if files are renamed or removed, so it may be necessary to manually
    3.37 -#	   remove cscope.out if a lot of reorganization has occurred.
    3.38 -#
    3.39 -
    3.40 -include $(GAMMADIR)/make/scm.make
    3.41 -
    3.42 -NAWK	= awk
    3.43 -RM	= rm -f
    3.44 -HG	= hg
    3.45 -CS_TOP	= ../..
    3.46 -
    3.47 -CSDIRS	= $(CS_TOP)/src $(CS_TOP)/build
    3.48 -CSINCS	= $(CSDIRS:%=-I%)
    3.49 -
    3.50 -CSCOPE		= cscope
    3.51 -CSCOPE_FLAGS	= -b
    3.52 -
    3.53 -# Allow .java files to be added from the environment (CSCLASSES=yes).
    3.54 -ifdef	CSCLASSES
    3.55 -ADDCLASSES=	-o -name '*.java'
    3.56 -endif
    3.57 -
    3.58 -# Adding CClassHeaders also pushes the file count of a full workspace up about
    3.59 -# 200 files (these files also don't exist in a new workspace, and thus will
    3.60 -# cause the recreation of the database as they get created, which might seem
    3.61 -# a little confusing).  Thus allow these files to be added from the environment
    3.62 -# (CSHEADERS=yes).
    3.63 -ifndef	CSHEADERS
    3.64 -RMCCHEADERS=	-o -name CClassHeaders
    3.65 -endif
    3.66 -
    3.67 -# Use CS_GENERATED=x to include auto-generated files in the build directories.
    3.68 -ifdef	CS_GENERATED
    3.69 -CS_ADD_GENERATED	= -o -name '*.incl'
    3.70 -else
    3.71 -CS_PRUNE_GENERATED	= -o -name '${OS}_*_core' -o -name '${OS}_*_compiler?'
    3.72 -endif
    3.73 -
    3.74 -# OS-specific files for other systems are excluded by default.  Use CS_OS=yes
    3.75 -# to include platform-specific files for other platforms.
    3.76 -ifndef	CS_OS
    3.77 -CS_OS		= linux macos solaris win32
    3.78 -CS_PRUNE_OS	= $(patsubst %,-o -name '*%*',$(filter-out ${OS},${CS_OS}))
    3.79 -endif
    3.80 -
    3.81 -# Processor-specific files for other processors are excluded by default.  Use
    3.82 -# CS_CPU=x to include platform-specific files for other platforms.
    3.83 -ifndef	CS_CPU
    3.84 -CS_CPU		= i486 sparc amd64 ia64
    3.85 -CS_PRUNE_CPU	= $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
    3.86 -endif
    3.87 -
    3.88 -# What files should we include?  A simple rule might be just those files under
    3.89 -# SCCS control, however this would miss files we create like the opcodes and
    3.90 -# CClassHeaders.  The following attempts to find everything that is *useful*.
    3.91 -# (.del files are created by sccsrm, demo directories contain many .java files
    3.92 -# that probably aren't useful for development, and the pkgarchive may contain
    3.93 -# duplicates of files within the source hierarchy).
    3.94 -
    3.95 -# Directories to exclude.
    3.96 -CS_PRUNE_STD	= $(SCM_DIRS) \
    3.97 -		  -o -name '.del-*' \
    3.98 -		  -o -name '*demo' \
    3.99 -		  -o -name pkgarchive
   3.100 -
   3.101 -CS_PRUNE	= $(CS_PRUNE_STD) \
   3.102 -		  $(CS_PRUNE_OS) \
   3.103 -		  $(CS_PRUNE_CPU) \
   3.104 -		  $(CS_PRUNE_GENERATED) \
   3.105 -		  $(RMCCHEADERS)
   3.106 -
   3.107 -# File names to include.
   3.108 -CSFILENAMES	= -name '*.[ch]pp' \
   3.109 -		  -o -name '*.[Ccshlxy]' \
   3.110 -		  $(CS_ADD_GENERATED) \
   3.111 -		  -o -name '*.il' \
   3.112 -		  -o -name '*.cc' \
   3.113 -		  -o -name '*[Mm]akefile*' \
   3.114 -		  -o -name '*.gmk' \
   3.115 -		  -o -name '*.make' \
   3.116 -		  -o -name '*.ad' \
   3.117 -		  $(ADDCLASSES)
   3.118 -
   3.119 -.PRECIOUS:	cscope.out
   3.120 -
   3.121 -cscope cscope.out: cscope.files FORCE
   3.122 -	$(CSCOPE) $(CSCOPE_FLAGS)
   3.123 -
   3.124 -# The .raw file is reordered here in an attempt to make cscope display the most
   3.125 -# relevant files first.
   3.126 -cscope.files: .cscope.files.raw
   3.127 -	echo "$(CSINCS)" > $@
   3.128 -	-egrep -v "\.java|\/make\/"	$< >> $@
   3.129 -	-fgrep ".java"			$< >> $@
   3.130 -	-fgrep "/make/"		$< >> $@
   3.131 -
   3.132 -.cscope.files.raw:  .nametable.files
   3.133 -	-find $(CSDIRS) -type d \( $(CS_PRUNE) \) -prune -o \
   3.134 -	    -type f \( $(CSFILENAMES) \) -print > $@
   3.135 -
   3.136 -cscope.clean:  nametable.clean
   3.137 -	-$(RM) cscope.out cscope.files .cscope.files.raw
   3.138 -
   3.139 -TAGS:  cscope.files FORCE
   3.140 -	egrep -v '^-|^$$' $< | etags --members -
   3.141 -
   3.142 -TAGS.clean:  nametable.clean
   3.143 -	-$(RM) TAGS
   3.144 -
   3.145 -# .nametable.files and .nametable.files.tmp are used to determine if any files
   3.146 -# were added to/deleted from/renamed in the workspace.  If not, then there's
   3.147 -# normally no need to rebuild the cscope database. To force a rebuild of
   3.148 -# the cscope database: gmake nametable.clean.
   3.149 -.nametable.files:  .nametable.files.tmp
   3.150 -	( cmp -s $@ $< ) || ( cp $< $@ )
   3.151 -	-$(RM) $<
   3.152 -
   3.153 -# `hg status' is slightly faster than `hg fstatus'. Both are
   3.154 -# quite a bit slower on an NFS mounted file system, so this is
   3.155 -# really geared towards repos on local file systems.
   3.156 -.nametable.files.tmp:
   3.157 -	-$(HG) fstatus -acmn > $@
   3.158 -nametable.clean:
   3.159 -	-$(RM) .nametable.files .nametable.files.tmp
   3.160 -
   3.161 -FORCE:
   3.162 -
   3.163 -.PHONY:		cscope cscope.clean TAGS.clean nametable.clean FORCE
     4.1 --- a/make/solaris/Makefile	Fri Apr 22 09:26:09 2011 -0700
     4.2 +++ b/make/solaris/Makefile	Sat Apr 23 04:20:09 2011 -0700
     4.3 @@ -296,7 +296,7 @@
     4.4  
     4.5  clean:  clean_compiler2 clean_compiler1 clean_core clean_docs clean_kernel
     4.6  
     4.7 -include $(GAMMADIR)/make/$(OSNAME)/makefiles/cscope.make
     4.8 +include $(GAMMADIR)/make/cscope.make
     4.9  
    4.10  #-------------------------------------------------------------------------------
    4.11  
     5.1 --- a/make/solaris/makefiles/cscope.make	Fri Apr 22 09:26:09 2011 -0700
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,162 +0,0 @@
     5.4 -#
     5.5 -# Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
     5.6 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5.7 -#
     5.8 -# This code is free software; you can redistribute it and/or modify it
     5.9 -# under the terms of the GNU General Public License version 2 only, as
    5.10 -# published by the Free Software Foundation.
    5.11 -#
    5.12 -# This code is distributed in the hope that it will be useful, but WITHOUT
    5.13 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    5.14 -# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    5.15 -# version 2 for more details (a copy is included in the LICENSE file that
    5.16 -# accompanied this code).
    5.17 -#
    5.18 -# You should have received a copy of the GNU General Public License version
    5.19 -# 2 along with this work; if not, write to the Free Software Foundation,
    5.20 -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    5.21 -#
    5.22 -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    5.23 -# or visit www.oracle.com if you need additional information or have any
    5.24 -# questions.
    5.25 -#  
    5.26 -#
    5.27 -
    5.28 -#
    5.29 -# The cscope.out file is made in the current directory and spans the entire
    5.30 -# source tree.
    5.31 -#
    5.32 -# Things to note:
    5.33 -#	1. We use relative names for cscope.
    5.34 -#	2. We *don't* remove the old cscope.out file, because cscope is smart
    5.35 -#	   enough to only build what has changed.  It can be confused, however,
    5.36 -#	   if files are renamed or removed, so it may be necessary to manually
    5.37 -#	   remove cscope.out if a lot of reorganization has occurred.
    5.38 -#
    5.39 -
    5.40 -include $(GAMMADIR)/make/scm.make
    5.41 -
    5.42 -NAWK	= /usr/xpg4/bin/awk
    5.43 -RM	= rm -f
    5.44 -HG	= hg
    5.45 -CS_TOP	= ../..
    5.46 -
    5.47 -CSDIRS	= $(CS_TOP)/src $(CS_TOP)/make
    5.48 -CSINCS	= $(CSDIRS:%=-I%)
    5.49 -
    5.50 -CSCOPE		= cscope
    5.51 -CSCOPE_FLAGS	= -b
    5.52 -
    5.53 -# Allow .java files to be added from the environment (CSCLASSES=yes).
    5.54 -ifdef	CSCLASSES
    5.55 -ADDCLASSES=	-o -name '*.java'
    5.56 -endif
    5.57 -
    5.58 -# Adding CClassHeaders also pushes the file count of a full workspace up about
    5.59 -# 200 files (these files also don't exist in a new workspace, and thus will
    5.60 -# cause the recreation of the database as they get created, which might seem
    5.61 -# a little confusing).  Thus allow these files to be added from the environment
    5.62 -# (CSHEADERS=yes).
    5.63 -ifndef	CSHEADERS
    5.64 -RMCCHEADERS=	-o -name CClassHeaders
    5.65 -endif
    5.66 -
    5.67 -# Use CS_GENERATED=x to include auto-generated files in the make directories.
    5.68 -ifdef	CS_GENERATED
    5.69 -CS_ADD_GENERATED	= -o -name '*.incl'
    5.70 -else
    5.71 -CS_PRUNE_GENERATED	= -o -name '${OS}_*_core' -o -name '${OS}_*_compiler?'
    5.72 -endif
    5.73 -
    5.74 -# OS-specific files for other systems are excluded by default.  Use CS_OS=yes
    5.75 -# to include platform-specific files for other platforms.
    5.76 -ifndef	CS_OS
    5.77 -CS_OS		= linux macos solaris win32
    5.78 -CS_PRUNE_OS	= $(patsubst %,-o -name '*%*',$(filter-out ${OS},${CS_OS}))
    5.79 -endif
    5.80 -
    5.81 -# Processor-specific files for other processors are excluded by default.  Use
    5.82 -# CS_CPU=x to include platform-specific files for other platforms.
    5.83 -ifndef	CS_CPU
    5.84 -CS_CPU		= i486 sparc amd64 ia64
    5.85 -CS_PRUNE_CPU	= $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
    5.86 -endif
    5.87 -
    5.88 -# What files should we include?  A simple rule might be just those files under
    5.89 -# SCCS control, however this would miss files we create like the opcodes and
    5.90 -# CClassHeaders.  The following attempts to find everything that is *useful*.
    5.91 -# (.del files are created by sccsrm, demo directories contain many .java files
    5.92 -# that probably aren't useful for development, and the pkgarchive may contain
    5.93 -# duplicates of files within the source hierarchy).
    5.94 -
    5.95 -# Directories to exclude.
    5.96 -CS_PRUNE_STD	= $(SCM_DIRS) \
    5.97 -		  -o -name '.del-*' \
    5.98 -		  -o -name '*demo' \
    5.99 -		  -o -name pkgarchive
   5.100 -
   5.101 -CS_PRUNE	= $(CS_PRUNE_STD) \
   5.102 -		  $(CS_PRUNE_OS) \
   5.103 -		  $(CS_PRUNE_CPU) \
   5.104 -		  $(CS_PRUNE_GENERATED) \
   5.105 -		  $(RMCCHEADERS)
   5.106 -
   5.107 -# File names to include.
   5.108 -CSFILENAMES	= -name '*.[ch]pp' \
   5.109 -		  -o -name '*.[Ccshlxy]' \
   5.110 -		  $(CS_ADD_GENERATED) \
   5.111 -		  -o -name '*.d' \
   5.112 -		  -o -name '*.il' \
   5.113 -		  -o -name '*.cc' \
   5.114 -		  -o -name '*[Mm]akefile*' \
   5.115 -		  -o -name '*.gmk' \
   5.116 -		  -o -name '*.make' \
   5.117 -		  -o -name '*.ad' \
   5.118 -		  $(ADDCLASSES)
   5.119 -
   5.120 -.PRECIOUS:	cscope.out
   5.121 -
   5.122 -cscope cscope.out: cscope.files FORCE
   5.123 -	$(CSCOPE) $(CSCOPE_FLAGS)
   5.124 -
   5.125 -# The .raw file is reordered here in an attempt to make cscope display the most
   5.126 -# relevant files first.
   5.127 -cscope.files: .cscope.files.raw
   5.128 -	echo "$(CSINCS)" > $@
   5.129 -	-egrep -v "\.java|\/make\/"	$< >> $@
   5.130 -	-fgrep ".java"			$< >> $@
   5.131 -	-fgrep "/make/"		$< >> $@
   5.132 -
   5.133 -.cscope.files.raw:  .nametable.files
   5.134 -	-find $(CSDIRS) -type d \( $(CS_PRUNE) \) -prune -o \
   5.135 -	    -type f \( $(CSFILENAMES) \) -print > $@
   5.136 -
   5.137 -cscope.clean:  nametable.clean
   5.138 -	-$(RM) cscope.out cscope.files .cscope.files.raw
   5.139 -
   5.140 -TAGS:  cscope.files FORCE
   5.141 -	egrep -v '^-|^$$' $< | etags --members -
   5.142 -
   5.143 -TAGS.clean:  nametable.clean
   5.144 -	-$(RM) TAGS
   5.145 -
   5.146 -# .nametable.files and .nametable.files.tmp are used to determine if any files
   5.147 -# were added to/deleted from/renamed in the workspace.  If not, then there's
   5.148 -# normally no need to rebuild the cscope database. To force a rebuild of
   5.149 -# the cscope database: gmake nametable.clean.
   5.150 -.nametable.files:  .nametable.files.tmp
   5.151 -	( cmp -s $@ $< ) || ( cp $< $@ )
   5.152 -	-$(RM) $<
   5.153 -
   5.154 -# `hg status' is slightly faster than `hg fstatus'. Both are
   5.155 -# quite a bit slower on an NFS mounted file system, so this is
   5.156 -# really geared towards repos on local file systems.
   5.157 -.nametable.files.tmp:
   5.158 -	-$(HG) fstatus -acmn > $@
   5.159 -
   5.160 -nametable.clean:
   5.161 -	-$(RM) .nametable.files .nametable.files.tmp
   5.162 -
   5.163 -FORCE:
   5.164 -
   5.165 -.PHONY:		cscope cscope.clean TAGS.clean nametable.clean FORCE

mercurial