1 
   2 # Copyright (c) 2012, 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
  23 # questions.
  24 #
  25 
  26 include ProfileNames.gmk
  27 
  28 # This defines the include lists for each profile, categorized as lib, bin
  29 # and other. We can use these to define the file lists for each profile
  30 # directly, rather than constructing a set of files to exclude from the
  31 # set of all files. But initially we will stick with generating exclude lists
  32 # as that is how the main build process already works.
  33 
  34 include profile-includes.txt
  35 
  36 ###############################################################################
  37 # Per profile Jar lists
  38 #
  39 # These are the jar files to be built. In some builds these have to be
  40 # imported (signed jars) rather than built.
  41 #
  42 # The incoming lists, eg PROFILE_1_JRE_JARS_FILES, are the jars to be
  43 # included in this profile. They have the jar name relative to the lib 
  44 # directory. We have to turn these into targets by adding the 
  45 # $(IMAGES_OUTPUTDIR)/lib prefix
  46 #
  47 # Note that some jars may be optional depending on the type of build (jdk vs.
  48 # openjdk) and the platform.
  49 #
  50 # WARNING: incoming lists are currently validated for linux only!
  51 ###############################################################################
  52 
  53 # These are jar files for which the contents vary depending on the profile
  54 CUSTOM_JARS := rt.jar resources.jar
  55 # This is used in Images.gmk
  56 CUSTOM_PROFILE_JARS := $(addprefix $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/, $(CUSTOM_JARS))
  57 
  58 # These are the common jar files built for and included with this profile
  59 # Filter out the custom jars and turn them into targets.
  60 
  61 PROFILE_1_JARS :=  \
  62     $(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(filter-out $(CUSTOM_JARS), $(PROFILE_1_JRE_JAR_FILES)))
  63 
  64 PROFILE_2_JARS := \
  65     $(if $(PROFILE_2_JRE_JAR_FILES), $(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(PROFILE_2_JRE_JAR_FILES))) \
  66     $(PROFILE_1_JARS)
  67 
  68 ifneq ($(ENABLE_JFR), true)
  69   PROFILE_3_JRE_JAR_FILES :=  $(filter-out jfr.jar, $(PROFILE_3_JRE_JAR_FILES))
  70 endif
  71 
  72 PROFILE_3_JARS := \
  73     $(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(PROFILE_3_JRE_JAR_FILES)) \
  74     $(PROFILE_2_JARS)
  75 
  76 ifdef OPENJDK
  77   PROFILE_4_JRE_JAR_FILES := $(filter-out alt-rt.jar, $(PROFILE_4_JRE_JAR_FILES))
  78 endif
  79 
  80 PROFILE_4_JARS := \
  81     $(addprefix $(IMAGES_OUTPUTDIR)/lib/, $(PROFILE_4_JRE_JAR_FILES)) \
  82     $(PROFILE_3_JARS)
  83 
  84 # The full set of "jar" files needed for a complete JDK (ct.sym and src.zip
  85 # are also included.)
  86 # Note we need to add back the regular form of all the custom profile jars e.g.
  87 # rt.jar and resources.jar
  88 
  89 ALL_JARS := $(PROFILE_4_JARS) \
  90         $(IMAGES_OUTPUTDIR)/lib/rt.jar \
  91         $(IMAGES_OUTPUTDIR)/lib/resources.jar \
  92         $(IMAGES_OUTPUTDIR)/lib/jconsole.jar \
  93         $(IMAGES_OUTPUTDIR)/lib/dt.jar \
  94         $(IMAGES_OUTPUTDIR)/lib/tools.jar \
  95         $(IMAGES_OUTPUTDIR)/lib/ct.sym \
  96         $(IMAGES_OUTPUTDIR)/src.zip \
  97         $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar \
  98         $(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar
  99 
 100 ifeq ($(OPENJDK_TARGET_OS),solaris)
 101     ifndef OPENJDK
 102         ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
 103     endif
 104 endif
 105 
 106 ifeq ($(OPENJDK_TARGET_OS),windows)
 107     ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
 108 endif 
 109 
 110 ifeq ($(OPENJDK_TARGET_OS),macosx)
 111     ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/JObjC.jar
 112 endif
 113 
 114 ifeq ($(PROFILE), profile_1)
 115     PROFILE_JARS := $(PROFILE_1_JARS)
 116 else ifeq ($(PROFILE), profile_2)
 117     PROFILE_JARS := $(PROFILE_2_JARS)
 118 else ifeq ($(PROFILE), profile_3)
 119     PROFILE_JARS := $(PROFILE_3_JARS)
 120 endif
 121 ifneq ($(PROFILE),)
 122     JARS := $(CUSTOM_PROFILE_JARS) $(PROFILE_JARS)
 123 else
 124     JARS := $(ALL_JARS)
 125 endif
 126 
 127 ###############################################################################
 128 # JRE contents
 129 ###############################################################################
 130 
 131 # Need all files to generate the exclude lists
 132 NEW_ALL_BIN_LIST := $(patsubst $(JDK_OUTPUTDIR)/bin/%,%,$(shell $(FIND) $(JDK_OUTPUTDIR)/bin \( -type f -o -type l \) ! -name "sjavac"))
 133 
 134 ALL_JRE_BIN_FILES := \
 135    $(PROFILE_1_JRE_BIN_FILES) \
 136    $(PROFILE_2_JRE_BIN_FILES) \
 137    $(PROFILE_3_JRE_BIN_FILES) \
 138    $(PROFILE_4_JRE_BIN_FILES) 
 139 
 140 NOT_JRE_BIN_FILES := $(filter-out $(ALL_JRE_BIN_FILES), $(NEW_ALL_BIN_LIST))
 141 
 142 # Additional exclusions for profile JRE
 143 ifeq ($(PROFILE), profile_1)
 144     NOT_JRE_BIN_FILES += \
 145         $(PROFILE_2_JRE_BIN_FILES) \
 146         $(PROFILE_3_JRE_BIN_FILES) \
 147         $(PROFILE_4_JRE_BIN_FILES) 
 148 endif
 149 
 150 ifeq ($(PROFILE), profile_2)
 151     NOT_JRE_BIN_FILES += \
 152         $(PROFILE_3_JRE_BIN_FILES) \
 153         $(PROFILE_4_JRE_BIN_FILES) 
 154 endif
 155 
 156 ifeq ($(PROFILE), profile_3)
 157     NOT_JRE_BIN_FILES += \
 158         $(PROFILE_4_JRE_BIN_FILES) 
 159 endif
 160 
 161 NOT_JRE_BIN_FILES := $(addprefix $(JDK_OUTPUTDIR)/bin/, $(NOT_JRE_BIN_FILES))
 162 
 163 # Need all files to generate the exclude lists
 164 NEW_ALL_LIB_LIST := $(patsubst $(JDK_OUTPUTDIR)/lib/%,%,$(shell $(FIND) $(JDK_OUTPUTDIR)/lib \( -type f -o -type l \) -a ! \( -name "_the*" -o -name "javac_state " \) ))
 165 NEW_ALL_LIB_LIST += $(patsubst $(IMAGES_OUTPUTDIR)/lib/%,%,$(shell $(FIND) $(IMAGES_OUTPUTDIR)/lib \( -type f -o -type l \) -a ! \( -name "_the*" -o -name "javac_state " \) ))
 166 
 167 ALL_JRE_LIB_FILES := \
 168    $(PROFILE_1_JRE_LIB_FILES) \
 169    $(PROFILE_2_JRE_LIB_FILES) \
 170    $(PROFILE_3_JRE_LIB_FILES) \
 171    $(PROFILE_4_JRE_LIB_FILES) 
 172 
 173 NOT_JRE_LIB_FILES := $(filter-out $(ALL_JRE_LIB_FILES), $(NEW_ALL_LIB_LIST))
 174 
 175 # Although these are NOT JRE lib files we have to filter them from the list
 176 # (ie cause them to be added them back in here) because the logic in
 177 # Images.gmk expects them to be there and handles them differently.
 178 # If we don't, they end up in the wrong place in the JDK image.
 179 # This needs fixing.
 180 NOT_JRE_LIB_FILES := $(filter-out $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(SALIB_NAME), $(NOT_JRE_LIB_FILES))
 181 
 182 # Additional exclusions for profile JREs
 183 ifeq ($(PROFILE), profile_1)
 184     NOT_JRE_LIB_FILES += \
 185         $(PROFILE_2_JRE_LIB_FILES) \
 186         $(PROFILE_3_JRE_LIB_FILES) \
 187         $(PROFILE_4_JRE_LIB_FILES) 
 188 endif
 189 
 190 ifeq ($(PROFILE), profile_2)
 191     NOT_JRE_LIB_FILES += \
 192         $(PROFILE_3_JRE_LIB_FILES) \
 193         $(PROFILE_4_JRE_LIB_FILES) 
 194 endif
 195 
 196 ifeq ($(PROFILE), profile_3)
 197     NOT_JRE_LIB_FILES += \
 198         $(PROFILE_4_JRE_LIB_FILES) 
 199 endif
 200 
 201 # Exclude the custom jar files as these will be added back via a special rule
 202 ifneq ($(PROFILE),)
 203   NOT_JRE_LIB_FILES += $(CUSTOM_JARS)
 204 endif
 205 
 206 # Fix me: to need to check if jawt.lib, jvm.lin need special handling on
 207 # windows - they are not-jre-lib-files
 208 
 209 ###############################################################################
 210 # Customization of jar file contents
 211 # These are expressed as exclusions from everything found in the 
 212 # JDK_OUTPUTDIR/classes directory
 213 ###############################################################################
 214 
 215 # Full JRE exclude list for rt.jar and resources.jar
 216 # This is a legacy value that should exclude types destined for jars
 217 # other than rt.jar and resources.jar
 218 RT_JAR_EXCLUDES = \
 219         com/sun/javadoc \
 220         com/sun/jdi \
 221         com/sun/jarsigner \
 222         com/sun/source \
 223         com/sun/istack/internal/tools \
 224         META-INF/services/com.sun.jdi.connect.Connector \
 225         META-INF/services/com.sun.jdi.connect.spi.TransportService \
 226         META-INF/services/com.sun.tools.xjc.Plugin \
 227         com/sun/tools \
 228         sun/jvmstat \
 229         sun/nio/cs/ext \
 230         sun/awt/HKSCS.class \
 231         sun/awt/motif/X11GB2312\$$$$Decoder.class \
 232         sun/awt/motif/X11GB2312\$$$$Encoder.class \
 233         sun/awt/motif/X11GB2312.class \
 234         sun/awt/motif/X11GBK\$$$$Encoder.class \
 235         sun/awt/motif/X11GBK.class \
 236         sun/awt/motif/X11KSC5601\$$$$Decoder.class \
 237         sun/awt/motif/X11KSC5601\$$$$Encoder.class \
 238         sun/awt/motif/X11KSC5601.class \
 239         META-INF/services/java.nio.charset.spi.CharsetProvider \
 240         sun/rmi/rmic \
 241         sun/tools/asm \
 242         sun/tools/java \
 243         sun/tools/javac \
 244         com/sun/tools/classfile \
 245         com/sun/tools/javap \
 246         sun/tools/jcmd \
 247         sun/tools/jconsole \
 248         sun/tools/jps \
 249         sun/tools/jstat \
 250         sun/tools/jstatd \
 251         sun/tools/native2ascii \
 252         sun/tools/serialver \
 253         sun/tools/tree \
 254         sun/tools/util \
 255         sun/security/tools/jarsigner \
 256         sun/security/provider/Sun.class \
 257         sun/security/rsa/SunRsaSign.class \
 258         sun/security/ssl \
 259         sun/security/ec/ECDHKeyAgreement.class \
 260         sun/security/ec/ECDSASignature\$$$$Raw.class \
 261         sun/security/ec/ECDSASignature\$$$$SHA1.class \
 262         sun/security/ec/ECDSASignature\$$$$SHA224.class \
 263         sun/security/ec/ECDSASignature\$$$$SHA256.class \
 264         sun/security/ec/ECDSASignature\$$$$SHA384.class \
 265         sun/security/ec/ECDSASignature\$$$$SHA512.class \
 266         sun/security/ec/ECDSASignature.class \
 267         sun/security/ec/ECKeyFactory.class \
 268         sun/security/ec/ECKeyPairGenerator.class \
 269         sun/security/ec/SunEC\$$$$1.class \
 270         sun/security/ec/SunEC.class \
 271         sun/security/ec/SunECEntries.class \
 272         sun/security/mscapi \
 273         sun/security/pkcs11 \
 274         com/sun/net/ssl/internal/ssl \
 275         javax/crypto \
 276         sun/security/internal \
 277         com/sun/crypto/provider \
 278         META-INF/services/com.sun.tools.attach.spi.AttachProvider \
 279         com/sun/tools/attach \
 280         org/relaxng/datatype \
 281         com/sun/codemodel \
 282         com/sun/xml/internal/dtdparser \
 283         com/sun/xml/internal/rngom \
 284         com/sun/xml/internal/xsom \
 285         com/sun/tools/script/shell \
 286         sun/tools/attach \
 287         sun/tools/jstack \
 288         sun/tools/jinfo \
 289         sun/tools/jmap \
 290         sun/net/spi/nameservice/dns \
 291         META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor \
 292         javax/swing/beaninfo \
 293         javax/swing/AbstractButtonBeanInfo.class \
 294         javax/swing/BoxBeanInfo.class \
 295         javax/swing/JAppletBeanInfo.class \
 296         javax/swing/JButtonBeanInfo.class \
 297         javax/swing/JCheckBoxBeanInfo.class \
 298         javax/swing/JCheckBoxMenuItemBeanInfo.class \
 299         javax/swing/JColorChooserBeanInfo.class \
 300         javax/swing/JComboBoxBeanInfo.class \
 301         javax/swing/JComponentBeanInfo.class \
 302         javax/swing/JDesktopPaneBeanInfo.class \
 303         javax/swing/JDialogBeanInfo.class \
 304         javax/swing/JEditorPaneBeanInfo.class \
 305         javax/swing/JFileChooserBeanInfo.class \
 306         javax/swing/JFormattedTextFieldBeanInfo.class \
 307         javax/swing/JFrameBeanInfo.class \
 308         javax/swing/JInternalFrameBeanInfo.class \
 309         javax/swing/JLabelBeanInfo.class \
 310         javax/swing/JLayeredPaneBeanInfo.class \
 311         javax/swing/JListBeanInfo.class \
 312         javax/swing/JMenuBarBeanInfo.class \
 313         javax/swing/JMenuBeanInfo.class \
 314         javax/swing/JMenuItemBeanInfo.class \
 315         javax/swing/JOptionPaneBeanInfo.class \
 316         javax/swing/JPanelBeanInfo.class \
 317         javax/swing/JPasswordFieldBeanInfo.class \
 318         javax/swing/JPopupMenuBeanInfo.class \
 319         javax/swing/JProgressBarBeanInfo.class \
 320         javax/swing/JRadioButtonBeanInfo.class \
 321         javax/swing/JRadioButtonMenuItemBeanInfo.class \
 322         javax/swing/JScrollBarBeanInfo.class \
 323         javax/swing/JScrollPaneBeanInfo.class \
 324         javax/swing/JSeparatorBeanInfo.class \
 325         javax/swing/JSliderBeanInfo.class \
 326         javax/swing/JSpinnerBeanInfo.class \
 327         javax/swing/JSplitPaneBeanInfo.class \
 328         javax/swing/JTabbedPaneBeanInfo.class \
 329         javax/swing/JTableBeanInfo.class \
 330         javax/swing/JTextAreaBeanInfo.class \
 331         javax/swing/JTextFieldBeanInfo.class \
 332         javax/swing/JTextPaneBeanInfo.class \
 333         javax/swing/JToggleButtonBeanInfo.class \
 334         javax/swing/JToolBarBeanInfo.class \
 335         javax/swing/JTreeBeanInfo.class \
 336         javax/swing/JWindowBeanInfo.class \
 337         javax/swing/SwingBeanInfoBase.class \
 338         javax/swing/text/JTextComponentBeanInfo.class \
 339         sun/swing/BeanInfoUtils.class \
 340         $(LOCALEDATA_INCLUDES) \
 341         sun/text/resources/cldr \
 342         sun/util/resources/cldr \
 343         com/oracle/jrockit/jfr \
 344         oracle/jrockit/jfr
 345 
 346 ifeq ($(OPENJDK_TARGET_OS), macosx)
 347         RT_JAR_EXCLUDES += com/sun/nio/sctp \
 348                            sun/nio/ch/sctp
 349 endif
 350 #
 351 # End of legacy handling of RT_JAR_EXCLUDES
 352 #
 353 # Now build up the per-profile exclusion lists
 354 
 355 include profile-rtjar-includes.txt
 356 
 357 # For each profile we have four variables:
 358 #
 359 # - PROFILE_n_RTJAR_INCLUDE_PACKAGES
 360 #
 361 # This is a package prefix indicating that all classes in that package
 362 # and conditionally its subpackages are included in rt.jar for this profile.
 363 # The subpackages will be included as long as they do not appear in the
 364 # include list of a higher profile
 365 #
 366 # - PROFILE_n_RTJAR_INCLUDE_TYPES
 367 #
 368 # These are specific types that must be included within a package.
 369 # There are two cases:
 370 # - individual types in a package that is otherwise excluded at this 
 371 #   profile level. The only arises if there are split packages. 
 372 #
 373 # - A higher-level package is included in a high profile where a subpackage
 374 # is included in a lower profile. Including the package in the high profile
 375 # would exclude it and all subpackages from the lower profile, so instead
 376 # the classes in the package are listed for that higher profile (as *.class)
 377 #
 378 # These types are explicitly added back into the rt.jar content lists.
 379 #
 380 # - PROFILE_n_RTJAR_EXCLUDE_TYPES
 381 #
 382 # These are specific types that must be excluded even though most of the
 383 # containing package is include. Again this occurs with split packges.
 384 #
 385 # So the exclude list for each profile consists of the include lists
 386 # for all profiles above it, together with any explicitly excluded types. 
 387 # This is then combined with the overall RT_JAR_EXCLUDES list (which covers
 388 # things that go into other jar files).
 389 #
 390 # We also have to define the types to be explicitly included. This
 391 # accumulates up the profiles ie profile 3 has to include the types
 392 # that profiles 1 and 2 had to include. This is unnecessary if, for example,
 393 # profile 3 includes the entire package, but it is harmless to add them
 394 # explicitly, and complex to determine if we still need to include them.
 395 #
 396 # Need a way to express: 
 397 #  for (int i = profile+1; i < 4; i++)
 398 #     RT_JAR_EXCLUDES += PROFILE_$i_RTJAR_INCLUDE_PACKAGES
 399 #
 400 # Do it the long way for now
 401 #
 402 # - PROFILE_n_INCLUDE_METAINF_SERVICES
 403 #
 404 # These are META-INF/services/ entries found in resources.jar. Together
 405 # resources.jar and rt.jar hold the contents of the classes directory, (the
 406 # classes in rt.jar and everything else in resources.jar).Hence the 
 407 # include/exclude information for resources.jar is tied to that of rt.jar
 408 
 409 # we don't need to do anything in most cases if not building a profile
 410 ifneq ($(PROFILE),)
 411 
 412 # Function to expand foo/*.class into the set of classes
 413 # NOTE: Classfiles with $ in their name are problematic as that is the
 414 # meta-character for both make and the shell! Hence the \$$$$ substitution.
 415 # But note that if you echo these values they will NOT display as expected.
 416 class_list =  $(patsubst $(JDK_OUTPUTDIR)/classes/%,%,\
 417      $(foreach i,$(1), $(subst $$,\$$$$, $(wildcard $(JDK_OUTPUTDIR)/classes/$i))))
 418 
 419 ifeq ($(PROFILE), profile_1)
 420   RT_JAR_EXCLUDES += \
 421     $(PROFILE_1_RTJAR_EXCLUDE_TYPES) \
 422     $(PROFILE_2_RTJAR_INCLUDE_PACKAGES) \
 423     $(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES)) \
 424     $(PROFILE_3_RTJAR_INCLUDE_PACKAGES) \
 425     $(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES)) \
 426     $(PROFILE_4_RTJAR_INCLUDE_PACKAGES) \
 427     $(call class_list, $(PROFILE_4_RTJAR_INCLUDE_TYPES))
 428   RT_JAR_INCLUDE_TYPES := \
 429         $(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES))
 430   PROFILE_INCLUDE_METAINF_SERVICES := \
 431     $(PROFILE_1_INCLUDE_METAINF_SERVICES)
 432 endif
 433 ifeq ($(PROFILE), profile_2)
 434   RT_JAR_EXCLUDES += \
 435     $(PROFILE_2_RTJAR_EXCLUDE_TYPES) \
 436     $(PROFILE_3_RTJAR_INCLUDE_PACKAGES) \
 437     $(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES)) \
 438     $(PROFILE_4_RTJAR_INCLUDE_PACKAGES) \
 439     $(call class_list, $(PROFILE_4_RTJAR_INCLUDE_TYPES))
 440   RT_JAR_INCLUDE_TYPES := \
 441         $(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES)) \
 442         $(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES))
 443   PROFILE_INCLUDE_METAINF_SERVICES := \
 444     $(PROFILE_1_INCLUDE_METAINF_SERVICES) \
 445     $(PROFILE_2_INCLUDE_METAINF_SERVICES)
 446 endif
 447 ifeq ($(PROFILE), profile_3)
 448   RT_JAR_EXCLUDES += \
 449     $(PROFILE_3_RTJAR_EXCLUDE_TYPES) \
 450     $(PROFILE_4_RTJAR_INCLUDE_PACKAGES) \
 451     $(call class_list, $(PROFILE_4_RTJAR_INCLUDE_TYPES))
 452   RT_JAR_INCLUDE_TYPES := \
 453         $(call class_list, $(PROFILE_1_RTJAR_INCLUDE_TYPES)) \
 454         $(call class_list, $(PROFILE_2_RTJAR_INCLUDE_TYPES)) \
 455         $(call class_list, $(PROFILE_3_RTJAR_INCLUDE_TYPES))
 456   PROFILE_INCLUDE_METAINF_SERVICES := \
 457     $(PROFILE_1_INCLUDE_METAINF_SERVICES) \
 458     $(PROFILE_2_INCLUDE_METAINF_SERVICES) \
 459     $(PROFILE_3_INCLUDE_METAINF_SERVICES)
 460 endif
 461 
 462 else # not profile
 463   # We still have to add back all the services
 464   PROFILE_INCLUDE_METAINF_SERVICES := \
 465     $(PROFILE_1_INCLUDE_METAINF_SERVICES) \
 466     $(PROFILE_2_INCLUDE_METAINF_SERVICES) \
 467     $(PROFILE_3_INCLUDE_METAINF_SERVICES) \
 468     $(PROFILE_4_INCLUDE_METAINF_SERVICES)
 469 
 470 endif # profile
 471 
 472 # Filter out non-OpenJDK services
 473 ifdef OPENJDK
 474   EXCLUDED_SERVICES := META-INF/services/javax.script.ScriptEngineFactory 
 475   PROFILE_INCLUDE_METAINF_SERVICES := $(filter-out $(EXCLUDED_SERVICES),$(PROFILE_INCLUDE_METAINF_SERVICES))
 476 endif