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