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
144 ALL_BIN_LIST := $(filter-out %/sjavac, $(ALL_BIN_LIST))
145
146 # For unknown reason the debuginfo files for executables are not put into images
147 # e.g filter them out
148 ifneq ($(OPENJDK_TARGET_OS), windows)
149 ALL_BIN_LIST := $(filter-out %.debuginfo %.diz, $(ALL_BIN_LIST))
150 else
151 # On windows, the libraries are in the bin dir, only filter out debuginfo files
152 # for executables. "java" is both a library and executable.
153 ALL_BIN_EXEC_FILES := $(filter-out java.exe, $(notdir $(filter %.exe, $(ALL_BIN_LIST))))
154 ALL_BIN_DEBUG_FILTER := $(addprefix %, $(patsubst %.exe, %.debuginfo, $(ALL_BIN_EXEC_FILES)) \
155 $(patsubst %.exe, %.diz, $(ALL_BIN_EXEC_FILES))) %.pdb
156 ALL_BIN_LIST := $(filter-out $(ALL_BIN_DEBUG_FILTER), $(ALL_BIN_LIST))
157 endif
158
159 JDKJRE_BIN_LIST := $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES)), $(ALL_BIN_LIST))
160 JRE_BIN_LIST := $(filter-out $(addprefix %, $(WINDOWS_JDKJRE_BIN_FILES)), $(JDKJRE_BIN_LIST))
161
162 ifeq ($(OPENJDK_TARGET_OS), windows)
163 JDK_BIN_LIST := $(filter $(addprefix %, $(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST))
164 # On windows x86, the server jvm is filtered out from the j2re image. This could possibly
165 # be handled by profiles in the future. If no client jvm is built, leave server in.
166 ifeq ($(OPENJDK_TARGET_CPU), x86)
167 ifeq ($(JVM_VARIANT_CLIENT), true)
168 JRE_BIN_LIST := $(filter-out $(JDK_OUTPUTDIR)/bin/server/%, $(JRE_BIN_LIST))
169 endif
170 endif
171 else
172 JDK_BIN_LIST := $(ALL_BIN_LIST)
173 endif
174
175 ifneq ($(OPENJDK_TARGET_CPU_ISADIR), )
176 OVERLAY_FILTER := $(JDK_OUTPUTDIR)/bin$(OPENJDK_TARGET_CPU_ISADIR)%
177 endif
178
179 $(foreach f,$(filter-out $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \
180 $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_BIN_TARGETS)))
181 $(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \
182 $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_BIN_TARGETS)))
183 $(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \
184 $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS)))
185
186 $(foreach f,$(filter $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \
187 $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_BIN_TARGETS)))
188 $(foreach f,$(filter $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \
|
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
144 ALL_BIN_LIST := $(filter-out %/sjavac, $(ALL_BIN_LIST))
145
146 # For unknown reason the debuginfo files for executables are not put into images
147 # e.g filter them out
148 ifneq ($(OPENJDK_TARGET_OS), windows)
149 ALL_BIN_LIST := $(filter-out %.debuginfo %.diz, $(ALL_BIN_LIST))
150 else
151 # On windows, the libraries are in the bin dir, only filter out debuginfo files
152 # for executables. "java" is both a library and executable.
153 ALL_BIN_EXEC_FILES := $(filter-out java.exe, $(notdir $(filter %.exe, $(ALL_BIN_LIST))))
154 ALL_BIN_DEBUG_FILTER := $(addprefix %, $(patsubst %.exe, %.debuginfo, $(ALL_BIN_EXEC_FILES)) \
155 $(patsubst %.exe, %.diz, $(ALL_BIN_EXEC_FILES))) %.pdb
156 ALL_BIN_LIST := $(filter-out $(ALL_BIN_DEBUG_FILTER), $(ALL_BIN_LIST))
157 endif
158
159 JDKJRE_BIN_LIST := $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES)), $(ALL_BIN_LIST))
160 JRE_BIN_LIST := $(filter-out $(addprefix %, $(WINDOWS_JDKJRE_BIN_FILES)), $(JDKJRE_BIN_LIST))
161
162 ifeq ($(OPENJDK_TARGET_OS), windows)
163 JDK_BIN_LIST := $(filter $(addprefix %, $(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST))
164 # On windows x86, the server jvm is filtered out from the j2re image. This is historical
165 # and is not applied to compact profiles. If no client jvm is built, leave server in.
166 ifeq ($(OPENJDK_TARGET_CPU), x86)
167 ifeq ($(JVM_VARIANT_CLIENT), true)
168 ifeq ($(PROFILE), )
169 JRE_BIN_LIST := $(filter-out $(JDK_OUTPUTDIR)/bin/server/%, $(JRE_BIN_LIST))
170 endif
171 endif
172 endif
173 else
174 JDK_BIN_LIST := $(ALL_BIN_LIST)
175 endif
176
177 ifneq ($(OPENJDK_TARGET_CPU_ISADIR), )
178 OVERLAY_FILTER := $(JDK_OUTPUTDIR)/bin$(OPENJDK_TARGET_CPU_ISADIR)%
179 endif
180
181 $(foreach f,$(filter-out $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \
182 $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_BIN_TARGETS)))
183 $(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \
184 $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_BIN_TARGETS)))
185 $(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \
186 $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS)))
187
188 $(foreach f,$(filter $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \
189 $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_BIN_TARGETS)))
190 $(foreach f,$(filter $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \
|