Print this page
4719 Common patchset for jdk1.7 support preparation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libdtrace_jni/java/Makefile
+++ new/usr/src/lib/libdtrace_jni/java/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21
22 22 #
23 23 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 26
27 27 include $(SRC)/Makefile.master
28 28
29 29 # The Java DTrace API package
30 30
31 31 PKGPATH=org/opensolaris/os/dtrace
32 32 PKGNAME=org.opensolaris.os.dtrace
33 33
34 34 # The Java DTrace API directories
35 35
36 36 APIDIR=$(SRC)/lib/libdtrace_jni/java
37 37 CLASSES=$(APIDIR)/classes
38 38 JNI=$(APIDIR)/native
39 39 JARS=$(APIDIR)/lib
40 40 DOCS=$(APIDIR)/docs
41 41 DOCAPI=$(DOCS)/api
42 42 DOCEXAMPLES=$(DOCS)/examples
43 43 DOCHTML=$(DOCS)/html
44 44 DOCIMAGES=$(DOCS)/images
45 45 MANIFEST=$(APIDIR)/manifest
46 46 APIJAVASRC=$(APIDIR)/src
47 47
48 48 # Java DTrace API jar file, its ultimate destination, and packaging details
49 49 APIJAR=dtrace.jar
50 50 JARDESTDIR=$(ROOT)/usr/share/lib/java
51 51 INSJARS=$(JARDESTDIR)/$(APIJAR)
52 52 # javadoc
53 53 DOCDESTDIR=$(ROOT)/usr/share/lib/java/javadoc/dtrace
54 54 DOCAPIDESTDIR=$(DOCDESTDIR)/api
55 55 DOCEXAMPLESDESTDIR=$(DOCDESTDIR)/examples
56 56 DOCHTMLDESTDIR=$(DOCDESTDIR)/html
57 57 DOCIMAGESDESTDIR=$(DOCDESTDIR)/images
58 58
59 59 $(JARDESTDIR)/%: $(JARS)/%
60 60 $(INS.file)
61 61
62 62 $(DOCEXAMPLESDESTDIR)/%: $(DOCEXAMPLES)/%
63 63 $(INS.file)
64 64
65 65 $(DOCHTMLDESTDIR)/%: $(DOCHTML)/%
66 66 $(INS.file)
67 67
68 68 $(DOCIMAGESDESTDIR)/%: $(DOCIMAGES)/%
↓ open down ↓ |
68 lines elided |
↑ open up ↑ |
69 69 $(INS.file)
70 70
71 71 # Manifest files
72 72 APIMANI= $(MANIFEST)/dtrace.mf
73 73 MANIFESTS= $(APIMANI)
74 74
75 75 # Controlled CLASSPATH for making
76 76 APICLASSPATH=$(CLASSES):$(APIJAVASRC)
77 77
78 78 # javac flags
79 -JFLAGS= -g -d $(CLASSES) -sourcepath $(APICLASSPATH) -deprecation
80 -JFLAGS += -target 1.5
81 -JFLAGS += -Xlint
79 +JFLAGS= -g -d $(CLASSES) -sourcepath $(APICLASSPATH)
80 +JFLAGS += -source 1.5 -target 1.6
81 +JFLAGS += -Xlint:all,-rawtypes,-options
82 82
83 83 # The default make rule for Java files
84 84 COMPILE.java=$(JAVAC) $(JFLAGS)
85 85
86 86 $(CLASSES)/$(PKGPATH)/%.class: $(APIJAVASRC)/$(PKGPATH)/%.java
87 87 $(COMPILE.java) $<
88 88
89 89 # javah generated headers
90 90 APIHDR= LocalConsumer.h
91 -JNIHDRS=$(JNI)/$(APIHDRS)
91 +JNIHDRS=$(JNI)/$(APIHDR)
92 92
93 93 # API classes with native methods
94 94 JNI_CLASSNAMES=\
95 95 LocalConsumer
96 96
97 97 JNI_CLASSES=${JNI_CLASSNAMES:%=%.class}
98 98 DTRACE_JNI_CLASSES=${JNI_CLASSES:%=$(CLASSES)/$(PKGPATH)/%}
99 99 JNI_FULL_CLASSNAMES=${JNI_CLASSNAMES:%=$(PKGNAME).%}
100 100
101 101 # All API classes
102 102 API_CLASSNAMES=\
103 103 AbstractAggregationValue \
104 104 Aggregate \
105 105 AggregateSpec \
106 106 Aggregation \
107 107 AggregationRecord \
108 108 AggregationValue \
109 109 AvgValue \
110 110 Consumer \
111 111 ConsumerAdapter \
112 112 ConsumerEvent \
113 113 ConsumerException \
114 114 ConsumerListener \
115 115 CountValue \
116 116 DTraceException \
117 117 DataEvent \
118 118 Distribution \
119 119 Drop \
120 120 DropEvent \
121 121 Error \
122 122 ErrorEvent \
123 123 ExceptionHandler \
124 124 ExitRecord \
125 125 Flow \
126 126 InterfaceAttributes \
127 127 KernelStackRecord \
128 128 KernelSymbolRecord \
129 129 LinearDistribution \
130 130 LocalConsumer \
131 131 LogDistribution \
132 132 LogLinearDistribution \
133 133 MaxValue \
134 134 MinValue \
135 135 NativeException \
136 136 Option \
137 137 PrintaRecord \
138 138 PrintfRecord \
139 139 Probe \
140 140 ProbeData \
141 141 ProbeDescription \
142 142 ProbeInfo \
143 143 ProcessEvent \
144 144 ProcessState \
145 145 Program \
146 146 ProgramInfo \
147 147 Record \
148 148 ResourceLimitException \
149 149 ScalarRecord \
150 150 StackFrame \
151 151 StackValueRecord \
152 152 StddevValue \
153 153 SumValue \
154 154 SymbolValueRecord \
155 155 Tuple \
156 156 UserStackRecord \
157 157 UserSymbolRecord \
158 158 Utility \
159 159 ValueRecord
160 160
161 161 API_CLASSES=${API_CLASSNAMES:%=%.class}
162 162 DTRACE_API_CLASSES=${API_CLASSES:%=$(CLASSES)/$(PKGPATH)/%}
163 163
164 164
165 165 all: $(CLASSES) $(DTRACE_API_CLASSES) $(JNI)/$(APIHDR)
166 166
167 167 clean:
168 168 -$(RM) $(CLASSES)/$(PKGPATH)/*.class
169 169 -$(RM) $(JNI)/*.h
170 170 -$(RM) -r $(DOCAPI)
171 171
172 172 clobber: clean
173 173 -$(RM) $(JARS)/*.jar
174 174
175 175 # Make the class dir, if it doesn't exist
176 176 $(CLASSES):
177 177 -@mkdir -p $@
178 178
179 179 # Make the directory for javah-generated headers, if it doesn't exist
180 180 $(JNI):
181 181 -@mkdir -p $@
182 182
183 183 $(JNI)/$(APIHDR): $(JNI) $(DTRACE_JNI_CLASSES)
184 184 $(JAVAH) -o $@ -classpath $(CLASSES) $(JNI_FULL_CLASSNAMES)
185 185 -@touch $@
186 186
187 187 # Rule for installing API javadoc.
188 188 $(DOCAPIDESTDIR)/index.html: $(DTRACE_API_CLASSES)
189 189 -@mkdir -p $(DOCAPIDESTDIR)
190 190 -$(RM) -r $(DOCAPIDESTDIR)/*
191 191 cd $(APIJAVASRC); umask 022; \
192 192 $(JAVADOC) -protected -use -notimestamp \
193 193 -classpath $(APICLASSPATH) -d $(DOCAPIDESTDIR) \
194 194 $(PKGNAME)
195 195
196 196 $(CLASSES)/$(PKGPATH):
197 197 $(INS.dir)
198 198
199 199 $(JARS)/$(APIJAR): $(DTRACE_API_CLASSES) $(APIMANI)
200 200 -@mkdir -p $(JARS)
201 201 $(JAR) cfm $@ $(APIMANI) -C $(CLASSES) .
202 202
203 203 $(JARDESTDIR):
204 204 $(INS.dir)
205 205
206 206 $(DOCDESTDIR):
207 207 $(INS.dir)
208 208
209 209 $(DOCAPIDESTDIR):
210 210 $(INS.dir)
211 211
212 212 $(DOCEXAMPLESDESTDIR):
213 213 $(INS.dir)
214 214
215 215 $(DOCHTMLDESTDIR):
216 216 $(INS.dir)
217 217
218 218 $(DOCIMAGESDESTDIR):
219 219 $(INS.dir)
220 220
221 221 install: all $(JARDESTDIR) $(INSJARS) $(DOCDESTDIR) \
222 222 $(DOCAPIDESTDIR) \
223 223 $(DOCAPIDESTDIR)/index.html \
224 224 $(DOCEXAMPLESDESTDIR) \
225 225 $(DOCEXAMPLESDESTDIR)/TestAPI.java \
226 226 $(DOCEXAMPLESDESTDIR)/TestAPI2.java \
227 227 $(DOCEXAMPLESDESTDIR)/TestTarget.java \
228 228 $(DOCEXAMPLESDESTDIR)/hello.d \
229 229 $(DOCEXAMPLESDESTDIR)/intrstat.d \
230 230 $(DOCEXAMPLESDESTDIR)/syscall.d \
231 231 $(DOCEXAMPLESDESTDIR)/target.d \
232 232 $(DOCHTMLDESTDIR) \
233 233 $(DOCHTMLDESTDIR)/JavaDTraceAPI.html \
234 234 $(DOCHTMLDESTDIR)/fast.html \
235 235 $(DOCIMAGESDESTDIR) \
236 236 $(DOCIMAGESDESTDIR)/JavaDTraceAPI.gif
237 237
238 238 # empty targets for top-level building compatability
239 239
240 240 install_h lint:
241 241
242 242 # create API javadoc
243 243
244 244 doc:
245 245 -@mkdir -p $(DOCAPI)
246 246 cd $(APIJAVASRC); umask 022; \
247 247 $(JAVADOC) -protected -use -notimestamp \
248 248 -classpath $(APICLASSPATH) -d $(DOCAPI) \
249 249 $(PKGNAME)
↓ open down ↓ |
148 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX