Mercurial > hg > graal-compiler
annotate make/cscope.make @ 8799:1c8db54ee9f3 jdk8-b83
Added tag hs25-b24 for changeset e3a41fc02348
author | amurillo |
---|---|
date | Sat, 23 Mar 2013 01:47:25 -0700 |
parents | f08d439fab8c |
children |
rev | line source |
---|---|
0 | 1 # |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
196
diff
changeset
|
2 # Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved. |
0 | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | |
5 # This code is free software; you can redistribute it and/or modify it | |
6 # under the terms of the GNU General Public License version 2 only, as | |
7 # published by the Free Software Foundation. | |
8 # | |
9 # This code is distributed in the hope that it will be useful, but WITHOUT | |
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 # version 2 for more details (a copy is included in the LICENSE file that | |
13 # accompanied this code). | |
14 # | |
15 # You should have received a copy of the GNU General Public License version | |
16 # 2 along with this work; if not, write to the Free Software Foundation, | |
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 # | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
196
diff
changeset
|
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
196
diff
changeset
|
20 # or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
196
diff
changeset
|
21 # questions. |
0 | 22 # |
23 # | |
24 | |
3291
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
25 # The cscope.out file is generated in the current directory. The old cscope.out |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
26 # file is *not* removed because cscope is smart enough to only build what has |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
27 # changed. cscope can be confused if files are renamed or removed, so it may be |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
28 # necessary to remove cscope.out (gmake cscope.clean) if a lot of reorganization |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
29 # has occurred. |
0 | 30 |
31 include $(GAMMADIR)/make/scm.make | |
32 | |
33 RM = rm -f | |
111 | 34 HG = hg |
3291
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
35 CS_TOP = $(GAMMADIR) |
0 | 36 |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
37 CSDIRS = $(CS_TOP)/src $(CS_TOP)/make |
0 | 38 CSINCS = $(CSDIRS:%=-I%) |
39 | |
40 CSCOPE = cscope | |
3291
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
41 CSCOPE_OUT = cscope.out |
0 | 42 CSCOPE_FLAGS = -b |
43 | |
44 # Allow .java files to be added from the environment (CSCLASSES=yes). | |
45 ifdef CSCLASSES | |
46 ADDCLASSES= -o -name '*.java' | |
47 endif | |
48 | |
49 # Adding CClassHeaders also pushes the file count of a full workspace up about | |
50 # 200 files (these files also don't exist in a new workspace, and thus will | |
51 # cause the recreation of the database as they get created, which might seem | |
52 # a little confusing). Thus allow these files to be added from the environment | |
53 # (CSHEADERS=yes). | |
54 ifndef CSHEADERS | |
55 RMCCHEADERS= -o -name CClassHeaders | |
56 endif | |
57 | |
3291
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
58 # Ignore build products. |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
59 CS_PRUNE_GENERATED = -o -name '${OSNAME}_*_core' -o \ |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
60 -name '${OSNAME}_*_compiler?' |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
61 |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
62 # O/S-specific files for all systems are included by default. Set CS_OS to a |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
63 # space-separated list of identifiers to include only those systems. |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
64 ifdef CS_OS |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
65 CS_PRUNE_OS = $(patsubst %,-o -name '*%*',\ |
3960 | 66 $(filter-out ${CS_OS},bsd linux macos solaris windows)) |
0 | 67 endif |
68 | |
3291
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
69 # CPU-specific files for all processors are included by default. Set CS_CPU |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
70 # space-separated list identifiers to include only those CPUs. |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
71 ifdef CS_CPU |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
72 CS_PRUNE_CPU = $(patsubst %,-o -name '*%*',\ |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
73 $(filter-out ${CS_CPU},arm ppc sparc x86 zero)) |
0 | 74 endif |
75 | |
76 # What files should we include? A simple rule might be just those files under | |
77 # SCCS control, however this would miss files we create like the opcodes and | |
78 # CClassHeaders. The following attempts to find everything that is *useful*. | |
79 # (.del files are created by sccsrm, demo directories contain many .java files | |
80 # that probably aren't useful for development, and the pkgarchive may contain | |
81 # duplicates of files within the source hierarchy). | |
82 | |
83 # Directories to exclude. | |
84 CS_PRUNE_STD = $(SCM_DIRS) \ | |
85 -o -name '.del-*' \ | |
86 -o -name '*demo' \ | |
87 -o -name pkgarchive | |
88 | |
3291
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
89 # Placeholder for user-defined excludes. |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
90 CS_PRUNE_EX = |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
91 |
0 | 92 CS_PRUNE = $(CS_PRUNE_STD) \ |
93 $(CS_PRUNE_OS) \ | |
94 $(CS_PRUNE_CPU) \ | |
95 $(CS_PRUNE_GENERATED) \ | |
3291
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
96 $(CS_PRUNE_EX) \ |
0 | 97 $(RMCCHEADERS) |
98 | |
99 # File names to include. | |
100 CSFILENAMES = -name '*.[ch]pp' \ | |
101 -o -name '*.[Ccshlxy]' \ | |
102 $(CS_ADD_GENERATED) \ | |
103 -o -name '*.d' \ | |
104 -o -name '*.il' \ | |
105 -o -name '*.cc' \ | |
106 -o -name '*[Mm]akefile*' \ | |
107 -o -name '*.gmk' \ | |
108 -o -name '*.make' \ | |
109 -o -name '*.ad' \ | |
110 $(ADDCLASSES) | |
111 | |
3291
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
112 .PHONY: cscope cscope.clean cscope.scratch TAGS.clean FORCE |
0 | 113 .PRECIOUS: cscope.out |
114 | |
3291
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
115 cscope $(CSCOPE_OUT): cscope.files FORCE |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
116 $(CSCOPE) -f $(CSCOPE_OUT) $(CSCOPE_FLAGS) |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
117 |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
118 cscope.clean: |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
119 $(QUIETLY) $(RM) $(CSCOPE_OUT) cscope.files |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
120 |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
121 cscope.scratch: cscope.clean cscope |
0 | 122 |
3291
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
123 # The raw list is reordered so cscope displays the most relevant files first. |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
124 cscope.files: |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
125 $(QUIETLY) \ |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
126 raw=cscope.$$$$; \ |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
127 find $(CSDIRS) -type d \( $(CS_PRUNE) \) -prune -o \ |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
128 -type f \( $(CSFILENAMES) \) -print > $$raw; \ |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
129 { \ |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
130 echo "$(CSINCS)"; \ |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
131 egrep -v "\.java|/make/" $$raw; \ |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
132 fgrep ".java" $$raw; \ |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
133 fgrep "/make/" $$raw; \ |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
134 } > $@; \ |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
135 rm -f $$raw |
0 | 136 |
137 TAGS: cscope.files FORCE | |
138 egrep -v '^-|^$$' $< | etags --members - | |
139 | |
3291
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
140 TAGS.clean: |
d6cdc6c77582
7037250: cscope.make database generation is silently broken
jcoomes
parents:
1552
diff
changeset
|
141 $(RM) TAGS |