1 #
2 # Copyright (c) 2011, 2019, 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
279 ################################################################################
280 # Check if a specified hotspot variant is being built, or at least one of a
281 # list of variants. Will return 'true' or 'false'.
282 # $1 - the variant to test for
283 check-jvm-variant = \
284 $(strip \
285 $(if $(filter-out $(VALID_JVM_VARIANTS), $1), \
286 $(error Internal error: Invalid variant tested: $1)) \
287 $(if $(filter $1, $(JVM_VARIANTS)), true, false))
288
289 ################################################################################
290 # Check if our build or target conforms to certain restrictions. This set of
291 # functions all work in similar ways, testing the property that the name
292 # implies, so e.g. isTargetCpu test the CPU of the target system.
293 #
294 # $1 - A property, or a space separated list of properties to test for.
295 #
296 # Returns true if the actual property matches one of the properties in the list,
297 # and false otherwise.
298 #
299 # Examples: $(call isTargetOs, linux solaris) will return true when executed
300 # on either linux or solaris, and false otherwise.
301 # $(call isBuildCpuArch, x86) will return true iff the build CPU Arch is x86.
302
303 isTargetOs = \
304 $(strip $(if $(filter $(OPENJDK_TARGET_OS), $1), true, false))
305
306 isTargetOsType = \
307 $(strip $(if $(filter $(OPENJDK_TARGET_OS_TYPE), $1), true, false))
308
309 isTargetCpu = \
310 $(strip $(if $(filter $(OPENJDK_TARGET_CPU), $1), true, false))
311
312 isTargetCpuArch = \
313 $(strip $(if $(filter $(OPENJDK_TARGET_CPU_ARCH), $1), true, false))
314
315 isTargetCpuBits = \
316 $(strip $(if $(filter $(OPENJDK_TARGET_CPU_BITS), $1), true, false))
317
318 isBuildOs = \
319 $(strip $(if $(filter $(OPENJDK_BUILD_OS), $1), true, false))
320
|
1 #
2 # Copyright (c) 2011, 2020, 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
279 ################################################################################
280 # Check if a specified hotspot variant is being built, or at least one of a
281 # list of variants. Will return 'true' or 'false'.
282 # $1 - the variant to test for
283 check-jvm-variant = \
284 $(strip \
285 $(if $(filter-out $(VALID_JVM_VARIANTS), $1), \
286 $(error Internal error: Invalid variant tested: $1)) \
287 $(if $(filter $1, $(JVM_VARIANTS)), true, false))
288
289 ################################################################################
290 # Check if our build or target conforms to certain restrictions. This set of
291 # functions all work in similar ways, testing the property that the name
292 # implies, so e.g. isTargetCpu test the CPU of the target system.
293 #
294 # $1 - A property, or a space separated list of properties to test for.
295 #
296 # Returns true if the actual property matches one of the properties in the list,
297 # and false otherwise.
298 #
299 # Examples: $(call isTargetOs, linux windows) will return true when executed
300 # on either linux or windows, and false otherwise.
301 # $(call isBuildCpuArch, x86) will return true iff the build CPU Arch is x86.
302
303 isTargetOs = \
304 $(strip $(if $(filter $(OPENJDK_TARGET_OS), $1), true, false))
305
306 isTargetOsType = \
307 $(strip $(if $(filter $(OPENJDK_TARGET_OS_TYPE), $1), true, false))
308
309 isTargetCpu = \
310 $(strip $(if $(filter $(OPENJDK_TARGET_CPU), $1), true, false))
311
312 isTargetCpuArch = \
313 $(strip $(if $(filter $(OPENJDK_TARGET_CPU_ARCH), $1), true, false))
314
315 isTargetCpuBits = \
316 $(strip $(if $(filter $(OPENJDK_TARGET_CPU_BITS), $1), true, false))
317
318 isBuildOs = \
319 $(strip $(if $(filter $(OPENJDK_BUILD_OS), $1), true, false))
320
|