< prev index next >

make/CreateJars.gmk

Print this page

        

@@ -1,7 +1,7 @@
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License version 2 only, as
 # published by the Free Software Foundation.  Oracle designates this

@@ -265,34 +265,36 @@
 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
         $(MKDIR) -p $(@D)
         $(RM) $@ $@.tmp
         $(GREP) -e '\.class$$' $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
         ifneq ($(PROFILE), )
-          # # Add back classes from excluded packages (fixing the $ substitution in the process)
+          ifneq ($(strip $(RT_JAR_INCLUDE_TYPES)), )
+           # Add back classes from excluded packages (fixing the $ substitution in the process)
           for type in $(subst \$$,\, $(RT_JAR_INCLUDE_TYPES)) ; do \
             $(ECHO) $$type >> $@.tmp ; \
           done
         endif
+        endif
         $(MV) $@.tmp $@
 
 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
         $(MKDIR) -p $(@D)
         $(RM) $@ $@.tmp
         $(GREP) -v -e '\.class$$' \
             -e '/_the\.*' -e '^_the\.*' -e '\\_the\.*' -e 'javac_state' \
             $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
         ifneq ($(PROFILE), )
-          # # Strip out all META-INF/services/ entries
+          ifneq ($(strip $(PROFILE_INCLUDE_METAINF_SERVICES)), )
+            # Strip out all META-INF/services/ entries
           $(GREP) -v -e 'META-INF/services/' $@.tmp > $@.tmp2
-          # # Add back the required services
-          # # FIXME: On Solaris if PROFILE_INCLUDE_METAINF_SERVICES is not defined
-          # # we get a syntax error from sh. That doesn't happen on linux
+            # Add back the required services
           for service in $(PROFILE_INCLUDE_METAINF_SERVICES) ; do \
             $(ECHO) $$service >> $@.tmp2; \
           done
           $(MV) $@.tmp2 $@.tmp
         endif
+        endif
         $(MV) $@.tmp $@
 
 # This is a hack but I don't know how to make this fit into the existing scheme
 $(PROFILE_VERSION_CLASS_TARGETS): $(PROFILE_VERSION_JAVA_TARGETS)
         @$(JAVAC) -d $(@D)/../../ $(@D)/$(VERSION_JAVA_FILE)

@@ -307,10 +309,19 @@
 # $@ will contain \$. So we have to pass $< in single-quotes to avoid shell expansion
 $(BEANLESS_CLASSES)/%: $(JDK_OUTPUTDIR)/classes/%
         $(MKDIR) -p $(@D)
         $(TOOL_REMOVEMETHODS) '$<' $@ addPropertyChangeListener removePropertyChangeListener
 
+# Code these targets explicitly because the target "%" expansion does
+# not work with the inline "$" in the file name.
+$(BEANLESS_CLASSES)/java/util/jar/Pack200\$$Packer.class: $(JDK_OUTPUTDIR)/classes/java/util/jar/Pack200$$Packer.class
+        $(MKDIR) -p $(@D)
+        $(TOOL_REMOVEMETHODS) '$<' $@ addPropertyChangeListener removePropertyChangeListener
+$(BEANLESS_CLASSES)/java/util/jar/Pack200\$$Unpacker.class: $(JDK_OUTPUTDIR)/classes/java/util/jar/Pack200$$Unpacker.class
+        $(MKDIR) -p $(@D)
+        $(TOOL_REMOVEMETHODS) '$<' $@ addPropertyChangeListener removePropertyChangeListener
+
 CLASSES_TO_DEBEAN = \
     java/util/logging/LogManager.class \
     java/util/jar/Pack200\$$Packer.class \
     java/util/jar/Pack200\$$Unpacker.class \
     com/sun/java/util/jar/pack/PackerImpl.class \
< prev index next >