11#
2- # Copyright (c) 2011, 2013 , Oracle and/or its affiliates. All rights reserved.
2+ # Copyright (c) 2011, 2014 , Oracle and/or its affiliates. All rights reserved.
33# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44#
55# This code is free software; you can redistribute it and/or modify it
@@ -267,10 +267,12 @@ $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents: $(IMAGES_OUTPUTDIR)/lib$
267267 $(RM) $@ $@.tmp
268268 $(GREP) -e '\.class$$' $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
269269 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
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
274276 endif
275277 $(MV) $@.tmp $@
276278
@@ -281,15 +283,15 @@ $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents: $(IMAGES_OUTPUTDI
281283 -e '/_the\.*' -e '^_the\.*' -e '\\_the\.*' -e 'javac_state' \
282284 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
283285 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
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
293295 endif
294296 $(MV) $@.tmp $@
295297
@@ -309,6 +311,15 @@ $(BEANLESS_CLASSES)/%: $(JDK_OUTPUTDIR)/classes/%
309311 $(MKDIR) -p $(@D)
310312 $(TOOL_REMOVEMETHODS) '$<' $@ addPropertyChangeListener removePropertyChangeListener
311313
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+
312323CLASSES_TO_DEBEAN = \
313324 java/util/logging/LogManager.class \
314325 java/util/jar/Pack200\$$Packer.class \
0 commit comments