annotate make/solaris/makefiles/cscope.make @ 196:d1605aabd0a1 jdk7-b30

6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
author xdono
date Wed, 02 Jul 2008 12:55:16 -0700
parents 34935c25a52d
children c18cbe5936b8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #
196
d1605aabd0a1 6719955: Update copyright year
xdono
parents: 114
diff changeset
2 # Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 #
a61af66fc99e Initial load
duke
parents:
diff changeset
5 # This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 # under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 # published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 #
a61af66fc99e Initial load
duke
parents:
diff changeset
9 # This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 # version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 # accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 #
a61af66fc99e Initial load
duke
parents:
diff changeset
15 # You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 # 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 #
a61af66fc99e Initial load
duke
parents:
diff changeset
19 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 # CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 # have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 #
a61af66fc99e Initial load
duke
parents:
diff changeset
23 #
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 #
a61af66fc99e Initial load
duke
parents:
diff changeset
26 # The cscope.out file is made in the current directory and spans the entire
a61af66fc99e Initial load
duke
parents:
diff changeset
27 # source tree.
a61af66fc99e Initial load
duke
parents:
diff changeset
28 #
a61af66fc99e Initial load
duke
parents:
diff changeset
29 # Things to note:
a61af66fc99e Initial load
duke
parents:
diff changeset
30 # 1. We use relative names for cscope.
a61af66fc99e Initial load
duke
parents:
diff changeset
31 # 2. We *don't* remove the old cscope.out file, because cscope is smart
a61af66fc99e Initial load
duke
parents:
diff changeset
32 # enough to only build what has changed. It can be confused, however,
a61af66fc99e Initial load
duke
parents:
diff changeset
33 # if files are renamed or removed, so it may be necessary to manually
a61af66fc99e Initial load
duke
parents:
diff changeset
34 # remove cscope.out if a lot of reorganization has occurred.
a61af66fc99e Initial load
duke
parents:
diff changeset
35 #
a61af66fc99e Initial load
duke
parents:
diff changeset
36
a61af66fc99e Initial load
duke
parents:
diff changeset
37 include $(GAMMADIR)/make/scm.make
a61af66fc99e Initial load
duke
parents:
diff changeset
38
a61af66fc99e Initial load
duke
parents:
diff changeset
39 NAWK = /usr/xpg4/bin/awk
a61af66fc99e Initial load
duke
parents:
diff changeset
40 RM = rm -f
111
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
41 HG = hg
0
a61af66fc99e Initial load
duke
parents:
diff changeset
42 CS_TOP = ../..
a61af66fc99e Initial load
duke
parents:
diff changeset
43
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 0
diff changeset
44 CSDIRS = $(CS_TOP)/src $(CS_TOP)/make
0
a61af66fc99e Initial load
duke
parents:
diff changeset
45 CSINCS = $(CSDIRS:%=-I%)
a61af66fc99e Initial load
duke
parents:
diff changeset
46
a61af66fc99e Initial load
duke
parents:
diff changeset
47 CSCOPE = cscope
a61af66fc99e Initial load
duke
parents:
diff changeset
48 CSCOPE_FLAGS = -b
a61af66fc99e Initial load
duke
parents:
diff changeset
49
a61af66fc99e Initial load
duke
parents:
diff changeset
50 # Allow .java files to be added from the environment (CSCLASSES=yes).
a61af66fc99e Initial load
duke
parents:
diff changeset
51 ifdef CSCLASSES
a61af66fc99e Initial load
duke
parents:
diff changeset
52 ADDCLASSES= -o -name '*.java'
a61af66fc99e Initial load
duke
parents:
diff changeset
53 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
54
a61af66fc99e Initial load
duke
parents:
diff changeset
55 # Adding CClassHeaders also pushes the file count of a full workspace up about
a61af66fc99e Initial load
duke
parents:
diff changeset
56 # 200 files (these files also don't exist in a new workspace, and thus will
a61af66fc99e Initial load
duke
parents:
diff changeset
57 # cause the recreation of the database as they get created, which might seem
a61af66fc99e Initial load
duke
parents:
diff changeset
58 # a little confusing). Thus allow these files to be added from the environment
a61af66fc99e Initial load
duke
parents:
diff changeset
59 # (CSHEADERS=yes).
a61af66fc99e Initial load
duke
parents:
diff changeset
60 ifndef CSHEADERS
a61af66fc99e Initial load
duke
parents:
diff changeset
61 RMCCHEADERS= -o -name CClassHeaders
a61af66fc99e Initial load
duke
parents:
diff changeset
62 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
63
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 0
diff changeset
64 # Use CS_GENERATED=x to include auto-generated files in the make directories.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
65 ifdef CS_GENERATED
a61af66fc99e Initial load
duke
parents:
diff changeset
66 CS_ADD_GENERATED = -o -name '*.incl'
a61af66fc99e Initial load
duke
parents:
diff changeset
67 else
a61af66fc99e Initial load
duke
parents:
diff changeset
68 CS_PRUNE_GENERATED = -o -name '${OS}_*_core' -o -name '${OS}_*_compiler?'
a61af66fc99e Initial load
duke
parents:
diff changeset
69 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
70
a61af66fc99e Initial load
duke
parents:
diff changeset
71 # OS-specific files for other systems are excluded by default. Use CS_OS=yes
a61af66fc99e Initial load
duke
parents:
diff changeset
72 # to include platform-specific files for other platforms.
a61af66fc99e Initial load
duke
parents:
diff changeset
73 ifndef CS_OS
a61af66fc99e Initial load
duke
parents:
diff changeset
74 CS_OS = linux macos solaris win32
a61af66fc99e Initial load
duke
parents:
diff changeset
75 CS_PRUNE_OS = $(patsubst %,-o -name '*%*',$(filter-out ${OS},${CS_OS}))
a61af66fc99e Initial load
duke
parents:
diff changeset
76 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
77
a61af66fc99e Initial load
duke
parents:
diff changeset
78 # Processor-specific files for other processors are excluded by default. Use
a61af66fc99e Initial load
duke
parents:
diff changeset
79 # CS_CPU=x to include platform-specific files for other platforms.
a61af66fc99e Initial load
duke
parents:
diff changeset
80 ifndef CS_CPU
a61af66fc99e Initial load
duke
parents:
diff changeset
81 CS_CPU = i486 sparc amd64 ia64
a61af66fc99e Initial load
duke
parents:
diff changeset
82 CS_PRUNE_CPU = $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
a61af66fc99e Initial load
duke
parents:
diff changeset
83 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
84
a61af66fc99e Initial load
duke
parents:
diff changeset
85 # What files should we include? A simple rule might be just those files under
a61af66fc99e Initial load
duke
parents:
diff changeset
86 # SCCS control, however this would miss files we create like the opcodes and
a61af66fc99e Initial load
duke
parents:
diff changeset
87 # CClassHeaders. The following attempts to find everything that is *useful*.
a61af66fc99e Initial load
duke
parents:
diff changeset
88 # (.del files are created by sccsrm, demo directories contain many .java files
a61af66fc99e Initial load
duke
parents:
diff changeset
89 # that probably aren't useful for development, and the pkgarchive may contain
a61af66fc99e Initial load
duke
parents:
diff changeset
90 # duplicates of files within the source hierarchy).
a61af66fc99e Initial load
duke
parents:
diff changeset
91
a61af66fc99e Initial load
duke
parents:
diff changeset
92 # Directories to exclude.
a61af66fc99e Initial load
duke
parents:
diff changeset
93 CS_PRUNE_STD = $(SCM_DIRS) \
a61af66fc99e Initial load
duke
parents:
diff changeset
94 -o -name '.del-*' \
a61af66fc99e Initial load
duke
parents:
diff changeset
95 -o -name '*demo' \
a61af66fc99e Initial load
duke
parents:
diff changeset
96 -o -name pkgarchive
a61af66fc99e Initial load
duke
parents:
diff changeset
97
a61af66fc99e Initial load
duke
parents:
diff changeset
98 CS_PRUNE = $(CS_PRUNE_STD) \
a61af66fc99e Initial load
duke
parents:
diff changeset
99 $(CS_PRUNE_OS) \
a61af66fc99e Initial load
duke
parents:
diff changeset
100 $(CS_PRUNE_CPU) \
a61af66fc99e Initial load
duke
parents:
diff changeset
101 $(CS_PRUNE_GENERATED) \
a61af66fc99e Initial load
duke
parents:
diff changeset
102 $(RMCCHEADERS)
a61af66fc99e Initial load
duke
parents:
diff changeset
103
a61af66fc99e Initial load
duke
parents:
diff changeset
104 # File names to include.
a61af66fc99e Initial load
duke
parents:
diff changeset
105 CSFILENAMES = -name '*.[ch]pp' \
a61af66fc99e Initial load
duke
parents:
diff changeset
106 -o -name '*.[Ccshlxy]' \
a61af66fc99e Initial load
duke
parents:
diff changeset
107 $(CS_ADD_GENERATED) \
a61af66fc99e Initial load
duke
parents:
diff changeset
108 -o -name '*.d' \
a61af66fc99e Initial load
duke
parents:
diff changeset
109 -o -name '*.il' \
a61af66fc99e Initial load
duke
parents:
diff changeset
110 -o -name '*.cc' \
a61af66fc99e Initial load
duke
parents:
diff changeset
111 -o -name '*[Mm]akefile*' \
a61af66fc99e Initial load
duke
parents:
diff changeset
112 -o -name '*.gmk' \
a61af66fc99e Initial load
duke
parents:
diff changeset
113 -o -name '*.make' \
a61af66fc99e Initial load
duke
parents:
diff changeset
114 -o -name '*.ad' \
a61af66fc99e Initial load
duke
parents:
diff changeset
115 $(ADDCLASSES)
a61af66fc99e Initial load
duke
parents:
diff changeset
116
a61af66fc99e Initial load
duke
parents:
diff changeset
117 .PRECIOUS: cscope.out
a61af66fc99e Initial load
duke
parents:
diff changeset
118
a61af66fc99e Initial load
duke
parents:
diff changeset
119 cscope cscope.out: cscope.files FORCE
a61af66fc99e Initial load
duke
parents:
diff changeset
120 $(CSCOPE) $(CSCOPE_FLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
121
a61af66fc99e Initial load
duke
parents:
diff changeset
122 # The .raw file is reordered here in an attempt to make cscope display the most
a61af66fc99e Initial load
duke
parents:
diff changeset
123 # relevant files first.
a61af66fc99e Initial load
duke
parents:
diff changeset
124 cscope.files: .cscope.files.raw
a61af66fc99e Initial load
duke
parents:
diff changeset
125 echo "$(CSINCS)" > $@
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 0
diff changeset
126 -egrep -v "\.java|\/make\/" $< >> $@
0
a61af66fc99e Initial load
duke
parents:
diff changeset
127 -fgrep ".java" $< >> $@
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 0
diff changeset
128 -fgrep "/make/" $< >> $@
0
a61af66fc99e Initial load
duke
parents:
diff changeset
129
a61af66fc99e Initial load
duke
parents:
diff changeset
130 .cscope.files.raw: .nametable.files
a61af66fc99e Initial load
duke
parents:
diff changeset
131 -find $(CSDIRS) -type d \( $(CS_PRUNE) \) -prune -o \
a61af66fc99e Initial load
duke
parents:
diff changeset
132 -type f \( $(CSFILENAMES) \) -print > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
133
a61af66fc99e Initial load
duke
parents:
diff changeset
134 cscope.clean: nametable.clean
a61af66fc99e Initial load
duke
parents:
diff changeset
135 -$(RM) cscope.out cscope.files .cscope.files.raw
a61af66fc99e Initial load
duke
parents:
diff changeset
136
a61af66fc99e Initial load
duke
parents:
diff changeset
137 TAGS: cscope.files FORCE
a61af66fc99e Initial load
duke
parents:
diff changeset
138 egrep -v '^-|^$$' $< | etags --members -
a61af66fc99e Initial load
duke
parents:
diff changeset
139
a61af66fc99e Initial load
duke
parents:
diff changeset
140 TAGS.clean: nametable.clean
a61af66fc99e Initial load
duke
parents:
diff changeset
141 -$(RM) TAGS
a61af66fc99e Initial load
duke
parents:
diff changeset
142
a61af66fc99e Initial load
duke
parents:
diff changeset
143 # .nametable.files and .nametable.files.tmp are used to determine if any files
a61af66fc99e Initial load
duke
parents:
diff changeset
144 # were added to/deleted from/renamed in the workspace. If not, then there's
111
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
145 # normally no need to rebuild the cscope database. To force a rebuild of
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
146 # the cscope database: gmake nametable.clean.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
147 .nametable.files: .nametable.files.tmp
111
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
148 ( cmp -s $@ $< ) || ( cp $< $@ )
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
149 -$(RM) $<
0
a61af66fc99e Initial load
duke
parents:
diff changeset
150
111
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
151 # `hg status' is slightly faster than `hg fstatus'. Both are
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
152 # quite a bit slower on an NFS mounted file system, so this is
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
153 # really geared towards repos on local file systems.
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
154 .nametable.files.tmp:
7747916a0945 6685160: fix cscope build with hg
ysr
parents: 0
diff changeset
155 -$(HG) fstatus -acmn > $@
0
a61af66fc99e Initial load
duke
parents:
diff changeset
156
a61af66fc99e Initial load
duke
parents:
diff changeset
157 nametable.clean:
a61af66fc99e Initial load
duke
parents:
diff changeset
158 -$(RM) .nametable.files .nametable.files.tmp
a61af66fc99e Initial load
duke
parents:
diff changeset
159
a61af66fc99e Initial load
duke
parents:
diff changeset
160 FORCE:
a61af66fc99e Initial load
duke
parents:
diff changeset
161
a61af66fc99e Initial load
duke
parents:
diff changeset
162 .PHONY: cscope cscope.clean TAGS.clean nametable.clean FORCE