1 #
2 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
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. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
250 $(MAKEFILE)
251 $(MKDIR) -p $(@D)
252 $(RM) $@ $@.tmp
253 $(TOOL_ADDJSUM) $< $@.tmp
254 $(MV) $@.tmp $@
255
256 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents: $(BUILD_TOOLS) $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude \
257 $(ALL_FILES_IN_CLASSES) $(IMAGES_OUTPUTDIR)/lib/classlist
258 $(MKDIR) -p $(@D)
259 $(RM) $@ $@.tmp
260 ($(CD) $(JDK_OUTPUTDIR)/classes && \
261 $(TOOL_JARREORDER) \
262 -o $@.tmp $(IMAGES_OUTPUTDIR)/lib/classlist $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude . )
263 $(MV) $@.tmp $@
264
265 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
266 $(MKDIR) -p $(@D)
267 $(RM) $@ $@.tmp
268 $(GREP) -e '\.class$$' $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
269 ifneq ($(PROFILE), )
270 # # Add back classes from excluded packages (fixing the $ substitution in the process)
271 for type in $(subst \$$,\, $(RT_JAR_INCLUDE_TYPES)) ; do \
272 $(ECHO) $$type >> $@.tmp ; \
273 done
274 endif
275 $(MV) $@.tmp $@
276
277 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
278 $(MKDIR) -p $(@D)
279 $(RM) $@ $@.tmp
280 $(GREP) -v -e '\.class$$' \
281 -e '/_the\.*' -e '^_the\.*' -e '\\_the\.*' -e 'javac_state' \
282 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
283 ifneq ($(PROFILE), )
284 # # Strip out all META-INF/services/ entries
285 $(GREP) -v -e 'META-INF/services/' $@.tmp > $@.tmp2
286 # # Add back the required services
287 # # FIXME: On Solaris if PROFILE_INCLUDE_METAINF_SERVICES is not defined
288 # # we get a syntax error from sh. That doesn't happen on linux
289 for service in $(PROFILE_INCLUDE_METAINF_SERVICES) ; do \
290 $(ECHO) $$service >> $@.tmp2; \
291 done
292 $(MV) $@.tmp2 $@.tmp
293 endif
294 $(MV) $@.tmp $@
295
296 # This is a hack but I don't know how to make this fit into the existing scheme
297 $(PROFILE_VERSION_CLASS_TARGETS): $(PROFILE_VERSION_JAVA_TARGETS)
298 @$(JAVAC) -d $(@D)/../../ $(@D)/$(VERSION_JAVA_FILE)
299
300
301 # Support for removing the addPropertyChangeListener and removePropertyChangeListener
302 # methods from classes that only go into the profile builds.
303 BEANLESS_CLASSES = $(IMAGES_OUTPUTDIR)/beanless
304
305 # When there are $ characters in filenames we have some very subtle interactions between
306 # make expansion and shell expansion. In this particular case $< will contain a single $ while
307 # $@ will contain \$. So we have to pass $< in single-quotes to avoid shell expansion
308 $(BEANLESS_CLASSES)/%: $(JDK_OUTPUTDIR)/classes/%
309 $(MKDIR) -p $(@D)
310 $(TOOL_REMOVEMETHODS) '$<' $@ addPropertyChangeListener removePropertyChangeListener
311
312 CLASSES_TO_DEBEAN = \
313 java/util/logging/LogManager.class \
314 java/util/jar/Pack200\$$Packer.class \
315 java/util/jar/Pack200\$$Unpacker.class \
316 com/sun/java/util/jar/pack/PackerImpl.class \
317 com/sun/java/util/jar/pack/UnpackerImpl.class
318
319 ifneq ($(PROFILE), )
320 BEANLESS_CLASSES_TARGETS := $(addprefix $(BEANLESS_CLASSES)/, $(CLASSES_TO_DEBEAN))
321 endif
322
323
324 RT_JAR_CREATE_OPTIONS := c0fm
325 RT_JAR_UPDATE_OPTIONS := u0f
326 ifeq ($(COMPRESS_JARS), true)
327 RT_JAR_CREATE_OPTIONS := cfm
328 RT_JAR_UPDATE_OPTIONS := uf
|
1 #
2 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
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. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
250 $(MAKEFILE)
251 $(MKDIR) -p $(@D)
252 $(RM) $@ $@.tmp
253 $(TOOL_ADDJSUM) $< $@.tmp
254 $(MV) $@.tmp $@
255
256 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents: $(BUILD_TOOLS) $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude \
257 $(ALL_FILES_IN_CLASSES) $(IMAGES_OUTPUTDIR)/lib/classlist
258 $(MKDIR) -p $(@D)
259 $(RM) $@ $@.tmp
260 ($(CD) $(JDK_OUTPUTDIR)/classes && \
261 $(TOOL_JARREORDER) \
262 -o $@.tmp $(IMAGES_OUTPUTDIR)/lib/classlist $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude . )
263 $(MV) $@.tmp $@
264
265 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
266 $(MKDIR) -p $(@D)
267 $(RM) $@ $@.tmp
268 $(GREP) -e '\.class$$' $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
269 ifneq ($(PROFILE), )
270 ifneq ($(strip $(RT_JAR_INCLUDE_TYPES)), )
271 # Add back classes from excluded packages (fixing the $ substitution in the process)
272 for type in $(subst \$$,\, $(RT_JAR_INCLUDE_TYPES)) ; do \
273 $(ECHO) $$type >> $@.tmp ; \
274 done
275 endif
276 endif
277 $(MV) $@.tmp $@
278
279 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
280 $(MKDIR) -p $(@D)
281 $(RM) $@ $@.tmp
282 $(GREP) -v -e '\.class$$' \
283 -e '/_the\.*' -e '^_the\.*' -e '\\_the\.*' -e 'javac_state' \
284 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
285 ifneq ($(PROFILE), )
286 ifneq ($(strip $(PROFILE_INCLUDE_METAINF_SERVICES)), )
287 # Strip out all META-INF/services/ entries
288 $(GREP) -v -e 'META-INF/services/' $@.tmp > $@.tmp2
289 # Add back the required services
290 for service in $(PROFILE_INCLUDE_METAINF_SERVICES) ; do \
291 $(ECHO) $$service >> $@.tmp2; \
292 done
293 $(MV) $@.tmp2 $@.tmp
294 endif
295 endif
296 $(MV) $@.tmp $@
297
298 # This is a hack but I don't know how to make this fit into the existing scheme
299 $(PROFILE_VERSION_CLASS_TARGETS): $(PROFILE_VERSION_JAVA_TARGETS)
300 @$(JAVAC) -d $(@D)/../../ $(@D)/$(VERSION_JAVA_FILE)
301
302
303 # Support for removing the addPropertyChangeListener and removePropertyChangeListener
304 # methods from classes that only go into the profile builds.
305 BEANLESS_CLASSES = $(IMAGES_OUTPUTDIR)/beanless
306
307 # When there are $ characters in filenames we have some very subtle interactions between
308 # make expansion and shell expansion. In this particular case $< will contain a single $ while
309 # $@ will contain \$. So we have to pass $< in single-quotes to avoid shell expansion
310 $(BEANLESS_CLASSES)/%: $(JDK_OUTPUTDIR)/classes/%
311 $(MKDIR) -p $(@D)
312 $(TOOL_REMOVEMETHODS) '$<' $@ addPropertyChangeListener removePropertyChangeListener
313
314 # Code these targets explicitly because the target "%" expansion does
315 # not work with the inline "$" in the file name.
316 $(BEANLESS_CLASSES)/java/util/jar/Pack200\$$Packer.class: $(JDK_OUTPUTDIR)/classes/java/util/jar/Pack200$$Packer.class
317 $(MKDIR) -p $(@D)
318 $(TOOL_REMOVEMETHODS) '$<' $@ addPropertyChangeListener removePropertyChangeListener
319 $(BEANLESS_CLASSES)/java/util/jar/Pack200\$$Unpacker.class: $(JDK_OUTPUTDIR)/classes/java/util/jar/Pack200$$Unpacker.class
320 $(MKDIR) -p $(@D)
321 $(TOOL_REMOVEMETHODS) '$<' $@ addPropertyChangeListener removePropertyChangeListener
322
323 CLASSES_TO_DEBEAN = \
324 java/util/logging/LogManager.class \
325 java/util/jar/Pack200\$$Packer.class \
326 java/util/jar/Pack200\$$Unpacker.class \
327 com/sun/java/util/jar/pack/PackerImpl.class \
328 com/sun/java/util/jar/pack/UnpackerImpl.class
329
330 ifneq ($(PROFILE), )
331 BEANLESS_CLASSES_TARGETS := $(addprefix $(BEANLESS_CLASSES)/, $(CLASSES_TO_DEBEAN))
332 endif
333
334
335 RT_JAR_CREATE_OPTIONS := c0fm
336 RT_JAR_UPDATE_OPTIONS := u0f
337 ifeq ($(COMPRESS_JARS), true)
338 RT_JAR_CREATE_OPTIONS := cfm
339 RT_JAR_UPDATE_OPTIONS := uf
|