--- a/make/Bundles.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/Bundles.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -35,7 +35,7 @@
# On Windows tar frequently complains that "file changed as we read it" for
# some random source files. This seems to be cause by anti virus scanners and
# is most likely safe to ignore. When it happens, tar returns '1'.
-ifeq ($(OPENJDK_BUILD_OS), windows)
+ifeq ($(call isBuildOs, windows), true)
TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1"
endif
@@ -144,7 +144,7 @@
# On Macosx, we bundle up the macosx specific images which already have the
# correct base directories.
-ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
+ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
JDK_BUNDLE_SUBDIR :=
@@ -167,7 +167,7 @@
# Create special filter rules when dealing with unzipped .dSYM directories on
# macosx
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), true)
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
$(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, $(ALL_JDK_FILES))))
--- a/make/CompileDemos.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/CompileDemos.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -234,7 +234,7 @@
$(call install-file)
$(CHMOD) -f ug+w $@
-ifeq ($(OPENJDK_TARGET_OS), solaris)
+ifeq ($(call isTargetOs, solaris), true)
TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
$(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
$(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))
--- a/make/CompileJavaModules.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/CompileJavaModules.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -51,21 +51,18 @@
# data files and shouldn't go in the product
java.base_EXCLUDE_FILES += sun/text/resources/BreakIteratorRules.java
-ifneq ($(OPENJDK_TARGET_OS), solaris)
+ifeq ($(call isTargetOs, solaris), false)
java.base_EXCLUDE_FILES += \
SolarisLoginModule.java \
SolarisSystem.java \
#
endif
-ifeq ($(filter $(OPENJDK_TARGET_OS), solaris macosx aix), )
- #
- # only solaris, macosx and aix
- #
+ifeq ($(call isTargetOs, solaris macosx aix), false)
java.base_EXCLUDE_FILES += sun/nio/fs/PollingWatchService.java
endif
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
java.base_EXCLUDE_FILES += \
sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
#
@@ -124,7 +121,7 @@
.template \
#
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
# exclude all X11 on Mac.
java.desktop_EXCLUDES += \
sun/awt/X11 \
@@ -186,7 +183,7 @@
sun/awt/X11/XwcTextItem.java
endif
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
java.desktop_EXCLUDES += com/sun/java/swing/plaf/gtk
endif
@@ -194,8 +191,7 @@
java.desktop_EXCLUDES += sun/applet
endif
-# Used on windows and macosx
-ifeq ($(filter $(OPENJDK_TARGET_OS), windows macosx), )
+ifeq ($(call isTargetOs, windows macosx), false)
java.desktop_EXCLUDE_FILES += sun/awt/AWTCharset.java
endif
@@ -374,11 +370,11 @@
$(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SendFailed.java \
$(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/Shutdown.java
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
endif
-ifeq ($(OPENJDK_TARGET_OS),aix)
+ifeq ($(call isTargetOs, aix), true)
jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
endif
--- a/make/CopyImportModules.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/CopyImportModules.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -38,7 +38,7 @@
$(eval $(call FillCacheFind, $(LIBS_DIR) $(CMDS_DIR) $(CONF_DIR)))
ifneq ($(LIBS_DIR), )
- ifeq ($(OPENJDK_TARGET_OS), windows)
+ ifeq ($(call isTargetOs, windows), true)
TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
$(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \
--- a/make/CreateJmods.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/CreateJmods.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -118,7 +118,7 @@
endif
endif
else # not java.base
- ifeq ($(OPENJDK_TARGET_OS), windows)
+ ifeq ($(call isTargetOs, windows), true)
# Only java.base needs to include the MSVC*_DLLs. Make sure no other module
# tries to include them (typically imported ones).
ifneq ($(MSVCR_DLL), )
--- a/make/Images.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/Images.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -144,7 +144,7 @@
)
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), true)
DEMO_FILES := $(call not-containing, .dSYM, $(DEMO_FILES))
else
DEMO_FILES := $(filter-out %.debuginfo %.pdb %.map, $(DEMO_FILES))
@@ -192,7 +192,7 @@
ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \
$(call FindTransitiveDepsForModule, $m)))
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
LIBS_TARGET_SUBDIR := bin
else
LIBS_TARGET_SUBDIR := lib
@@ -211,7 +211,7 @@
DEBUGINFO_SUFFIXES := .debuginfo .pdb .map
# On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM
# dirs.
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), true)
$(eval $(call FillCacheFind, \
$(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs))
FindDebuginfoFiles = \
--- a/make/InitSupport.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/InitSupport.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -483,7 +483,7 @@
$(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true
endef
- ifeq ($(OPENJDK_BUILD_OS), windows)
+ ifeq ($(call isBuildOs, windows), true)
# On windows we need to synchronize with the javac server to be able to
# move or remove the build output directory. Since we have no proper
# synchronization process, wait for a while and hope it helps. This is only
--- a/make/MacBundles.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/MacBundles.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -30,7 +30,7 @@
default: bundles
# Only macosx has bundles defined.
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
bundles: jre-bundle jdk-bundle
--- a/make/Main.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/Main.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -1032,7 +1032,7 @@
endif
endif
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
product-images: mac-jdk-bundle
endif
--- a/make/ModuleWrapper.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/ModuleWrapper.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -42,7 +42,7 @@
include $(MAKEFILE_PREFIX)-$(MODULE).gmk
# Setup copy rules from the modules directories to the jdk image directory.
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
TO_BIN_FILTER := %$(SHARED_LIBRARY_SUFFIX) %.diz %.pdb %.map
$(eval $(call SetupCopyFiles, COPY_LIBS_TO_BIN, \
--- a/make/RunTests.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/RunTests.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -61,7 +61,7 @@
endef
# Setup _NT_SYMBOL_PATH on Windows
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
ifndef _NT_SYMBOL_PATH
# Can't use PathList here as it adds quotes around the value.
_NT_SYMBOL_PATH := \
@@ -224,7 +224,7 @@
ifeq ($(TEST_JOBS), 0)
CORES_DIVIDER := 2
- ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+ ifeq ($(call isTargetCpuArch, sparc), true)
# For smaller SPARC machines we see reasonable scaling of throughput up to
# cpus/4 without affecting test reliability. On the bigger machines, cpus/4
# causes intermittent timeouts.
@@ -808,7 +808,7 @@
$1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $$(EXPR) 25 / $$($1_JTREG_JOBS))
# SPARC is in general slower per core so need to scale up timeouts a bit.
- ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+ ifeq ($(call isTargetCpuArch, sparc), true)
JTREG_TIMEOUT_FACTOR ?= 8
else
JTREG_TIMEOUT_FACTOR ?= 4
@@ -835,7 +835,7 @@
$1_JTREG_BASIC_OPTIONS += -e:JDK8_HOME=$$(BOOT_JDK)
# If running on Windows, propagate the _NT_SYMBOL_PATH to enable
# symbol lookup in hserr files
- ifeq ($$(OPENJDK_TARGET_OS), windows)
+ ifeq ($$(call isTargetOs, windows), true)
$1_JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH
endif
--- a/make/TestImage.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/TestImage.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -30,7 +30,7 @@
############################################################################
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
FIXPATH_COPY := $(TEST_IMAGE_DIR)/bin/fixpath.exe
$(FIXPATH_COPY): $(firstword $(FIXPATH))
--- a/make/ZipSecurity.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/ZipSecurity.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -70,7 +70,7 @@
#
# Windows specific binary security packages.
#
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
# sec-windows-bin.zip is used by builds where the corresponding sources are not available
$(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP, \
SRC := $(JDK_OUTPUTDIR), \
@@ -80,7 +80,7 @@
TARGETS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip
# JGSS files contain the native Kerberos library
- ifeq ($(OPENJDK_TARGET_CPU), x86_64)
+ ifeq ($(call isTargetCpu, x86_64), true)
JGSS_ZIP_NAME = jgss-windows-x64-bin.zip
else
JGSS_ZIP_NAME = jgss-windows-i586-bin.zip
--- a/make/common/MakeBase.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/common/MakeBase.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -258,7 +258,7 @@
################################################################################
# All install-file and related macros automatically call DecodeSpace when needed.
-ifeq ($(OPENJDK_TARGET_OS),solaris)
+ifeq ($(call isTargetOs, solaris), true)
# On Solaris, if the target is a symlink and exists, cp won't overwrite.
# Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the
# name of the target file differs from the source file, rename after copy.
@@ -284,7 +284,7 @@
$(CP) -f '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'; \
fi
endef
-else ifeq ($(OPENJDK_TARGET_OS),macosx)
+else ifeq ($(call isTargetOs, macosx), true)
# On mac, extended attributes sometimes creep into the source files, which may later
# cause the creation of ._* files which confuses testing. Clear these with xattr if
# set. Some files get their write permissions removed after being copied to the
@@ -418,7 +418,7 @@
# unchanged.
# This is normally not needed since we use the FIXPATH prefix for command lines,
# but might be needed in certain circumstances.
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
FixPath = \
$(shell $(CYGPATH) -m $1)
else
--- a/make/common/Modules.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/common/Modules.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -117,11 +117,11 @@
jdk.zipfs \
#
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
PLATFORM_MODULES += jdk.crypto.mscapi
endif
-ifeq ($(OPENJDK_TARGET_OS), solaris)
+ifeq ($(call isTargetOs, solaris), true)
PLATFORM_MODULES += jdk.crypto.ucrypto
endif
--- a/make/common/NativeCompilation.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/common/NativeCompilation.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -175,9 +175,9 @@
)
endef
-ifeq ($(OPENJDK_BUILD_OS_ENV), windows.cygwin)
+ifeq ($(call isBuildOsEnv, windows.cygwin), true)
UNIX_PATH_PREFIX := /cygdrive
-else ifeq ($(OPENJDK_BUILD_OS_ENV), windows.msys)
+else ifeq ($(call isBuildOsEnv, windows.msys), true)
UNIX_PATH_PREFIX :=
endif
@@ -770,7 +770,7 @@
$(TOUCH) $$@
# On windows we need to create a resource file
- ifeq ($(OPENJDK_TARGET_OS), windows)
+ ifeq ($(call isTargetOs, windows), true)
ifneq ($$($1_VERSIONINFO_RESOURCE), )
$1_RES := $$($1_OBJECT_DIR)/$$($1_BASENAME).res
$1_RES_DEP := $$($1_RES).d
@@ -808,7 +808,7 @@
ifneq ($(DISABLE_MAPFILES), true)
$1_REAL_MAPFILE := $$($1_MAPFILE)
- ifneq ($(OPENJDK_TARGET_OS), windows)
+ ifeq ($(call isTargetOs, windows), false)
ifneq ($$($1_REORDER), )
$1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile
@@ -845,13 +845,13 @@
# Only copy debug symbols for dynamic libraries and programs.
ifneq ($$($1_TYPE), STATIC_LIBRARY)
# Generate debuginfo files.
- ifeq ($(OPENJDK_TARGET_OS), windows)
+ ifeq ($(call isTargetOs, windows), true)
$1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb" \
"-map:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map"
$1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb \
$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map
- else ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), )
+ else ifeq ($(call isTargetOs, linux solaris), true)
$1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).debuginfo
# Setup the command line creating debuginfo files, to be run after linking.
# It cannot be run separately since it updates the original target file
@@ -860,13 +860,13 @@
$(CD) $$($1_OUTPUT_DIR) && \
$$($1_OBJCOPY) --add-gnu-debuglink=$$($1_DEBUGINFO_FILES) $$($1_TARGET)
- else ifeq ($(OPENJDK_TARGET_OS), macosx)
+ else ifeq ($(call isTargetOs, macosx), true)
$1_DEBUGINFO_FILES := \
$$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Info.plist \
$$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Resources/DWARF/$$($1_BASENAME)
$1_CREATE_DEBUGINFO_CMDS := \
$(DSYMUTIL) --out $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM $$($1_TARGET)
- endif # OPENJDK_TARGET_OS
+ endif
# Since the link rule creates more than one file that we want to track,
# we have to use some tricks to get make to cooperate. To properly
@@ -952,7 +952,7 @@
endif
endif
- ifeq ($(OPENJDK_TARGET_OS), windows)
+ ifeq ($(call isTargetOs, windows), true)
ifeq ($$($1_EMBED_MANIFEST), true)
$1_EXTRA_LDFLAGS += -manifest:embed
endif
@@ -1032,7 +1032,7 @@
# Keep as much as possible on one execution line for best performance
# on Windows
$$(call LogInfo, Linking $$($1_BASENAME))
- ifeq ($(OPENJDK_TARGET_OS), windows)
+ ifeq ($(call isTargetOs, windows), true)
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
$(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
@@ -1050,7 +1050,7 @@
$$($1_CREATE_DEBUGINFO_CMDS)
$$($1_STRIP_CMD)
endif
- ifeq ($(OPENJDK_TARGET_OS), windows)
+ ifeq ($(call isTargetOs, windows), true)
ifneq ($$($1_MANIFEST), )
$$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
endif
--- a/make/common/Utils.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/common/Utils.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -181,6 +181,23 @@
)
################################################################################
+# Boolean operators.
+
+# Return the word "true" if all the boolean words given as argument is "true",
+# and returns "false" otherwise. Boolean words must be "true" or "false". It is
+# an error to supply a non-boolean word. An empty string is considered "true".
+And = \
+ $(strip $(if $(filter-out true false, $1), $(error Non-boolean values: $1)) \
+ $(if $(strip $(filter-out true, $1)), false, true))
+
+# Return the word "false" if all the boolean words given as argument is "false",
+# and returns "true" otherwise. Boolean words must be "true" or "false". It is
+# an error to supply a non-boolean word. An empty string is considered "false".
+Or = \
+ $(strip $(if $(filter-out true false, $1), $(error Non-boolean values: $1)) \
+ $(if $(strip $(filter-out false, $1)), true, false))
+
+################################################################################
# Parse a multiple-keyword variable, like FOO="KEYWORD1=val1;KEYWORD2=val2;..."
# These will be converted into a series of variables like FOO_KEYWORD1=val1,
# FOO_KEYWORD2=val2, etc. Unknown keywords will cause an error.
@@ -269,6 +286,50 @@
$(if $(filter $1, $(JVM_VARIANTS)), true, false))
################################################################################
+# Check if our build or target conforms to certain restrictions. This set of
+# functions all work in similar ways, testing the property that the name
+# implies, so e.g. isTargetCpu test the CPU of the target system.
+#
+# $1 - A property, or a space separated list of properties to test for.
+#
+# Returns true if the actual property matches one of the properties in the list,
+# and false otherwise.
+#
+# Examples: $(call isTargetOs, linux solaris) will return true when executed
+# on either linux or solaris, and false otherwise.
+# $(call isBuildCpuArch, x86) will return true iff the build CPU Arch is x86.
+
+isTargetOs = \
+ $(strip $(if $(filter $(OPENJDK_TARGET_OS), $1), true, false))
+
+isTargetOsType = \
+ $(strip $(if $(filter $(OPENJDK_TARGET_OS_TYPE), $1), true, false))
+
+isTargetCpu = \
+ $(strip $(if $(filter $(OPENJDK_TARGET_CPU), $1), true, false))
+
+isTargetCpuArch = \
+ $(strip $(if $(filter $(OPENJDK_TARGET_CPU_ARCH), $1), true, false))
+
+isTargetCpuBits = \
+ $(strip $(if $(filter $(OPENJDK_TARGET_CPU_BITS), $1), true, false))
+
+isBuildOs = \
+ $(strip $(if $(filter $(OPENJDK_BUILD_OS), $1), true, false))
+
+isBuildOsType = \
+ $(strip $(if $(filter $(OPENJDK_BUILD_OS_TYPE), $1), true, false))
+
+isBuildOsEnv = \
+ $(strip $(if $(filter $(OPENJDK_BUILD_OS_ENV), $1), true, false))
+
+isBuildCpu = \
+ $(strip $(if $(filter $(OPENJDK_BUILD_CPU), $1), true, false))
+
+isBuildCpuArch = \
+ $(strip $(if $(filter $(OPENJDK_BUILD_CPU_ARCH), $1), true, false))
+
+################################################################################
# Converts a space separated list to a comma separated list.
#
# Replacing double-comma with a single comma is to workaround the issue with
--- a/make/copy/Copy-java.base.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/copy/Copy-java.base.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -31,7 +31,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), aix)
+ifeq ($(call isTargetOs, aix), true)
TZMAPPINGS_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
@@ -44,7 +44,7 @@
################################################################################
# Copy the microsoft runtime libraries on windows
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
# Chmod to avoid permission issues if bundles are unpacked on unix platforms.
define copy-and-chmod
@@ -81,7 +81,7 @@
################################################################################
# In jvm.cfg, the first listed KNOWN variant is the default. On most build
# configurations, that is the server variant.
-ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), windows-x86)
+ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86)), true)
DEFAULT_CFG_VARIANT ?= client
endif
DEFAULT_CFG_VARIANT ?= server
@@ -143,7 +143,7 @@
DEF_POLICY_SRC_LIST := $(DEF_POLICY_SRC)
DEF_POLICY_SRC_LIST += $(CUSTOM_POLICY_SRC_LIST)
-ifneq ($(filter $(OPENJDK_TARGET_OS), windows solaris), )
+ifeq ($(call isTargetOs, windows solaris), true)
DEF_POLICY_SRC_LIST += $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy
endif
@@ -183,7 +183,7 @@
TARGETS += $(COPY_NET_PROPERTIES)
-ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux), )
+ifeq ($(call isTargetOs, solaris linux), true)
$(eval $(call SetupCopyFiles, COPY_SDP_CONF, \
FILES := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/conf/sdp/sdp.conf.template, \
DEST := $(CONF_DST_DIR)/sdp, \
--- a/make/copy/Copy-jdk.crypto.cryptoki.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/copy/Copy-jdk.crypto.cryptoki.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -27,7 +27,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), solaris)
+ifeq ($(call isTargetOs, solaris), true)
SUNPKCS11_CFG_SRC := \
$(TOPDIR)/src/jdk.crypto.cryptoki/solaris/conf/security/sunpkcs11-solaris.cfg
--- a/make/copy/Copy-jdk.crypto.ucrypto.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/copy/Copy-jdk.crypto.ucrypto.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -27,7 +27,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), solaris)
+ifeq ($(call isTargetOs, solaris), true)
UCRYPTO_CFG_SRC := $(TOPDIR)/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg
UCRYPTO_CFG_DST := $(CONF_DST_DIR)/security/ucrypto-solaris.cfg
--- a/make/gensrc/Gensrc-java.desktop.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/gensrc/Gensrc-java.desktop.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -28,11 +28,11 @@
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, gensrc/Gensrc-java.desktop.gmk))
-ifneq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), false)
include GensrcIcons.gmk
endif
-ifneq ($(filter $(OPENJDK_TARGET_OS), linux solaris aix), )
+ifeq ($(call isTargetOs, linux solaris aix), true)
include GensrcX11Wrappers.gmk
endif
@@ -52,21 +52,21 @@
$(TOPDIR)/src/java.desktop/share/classes/sun/print/resources \
#
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
PROP_SRC_DIRS += \
$(TOPDIR)/src/java.desktop/macosx/classes/com/apple/laf/resources \
$(TOPDIR)/src/java.desktop/macosx/classes/sun/awt/resources \
#
endif
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
PROP_SRC_DIRS += \
$(TOPDIR)/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/resources \
$(TOPDIR)/src/java.desktop/windows/classes/sun/awt/windows \
#
endif
-ifeq ($(filter $(OPENJDK_TARGET_OS), windows macosx), )
+ifeq ($(call isTargetOs, windows macosx), false)
PROP_SRC_DIRS += $(TOPDIR)/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources
endif
--- a/make/gensrc/Gensrc-jdk.hotspot.agent.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/gensrc/Gensrc-jdk.hotspot.agent.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -42,7 +42,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
MIG_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent
MACH_EXC_HEADER := $(MIG_OUTPUT_DIR)/mach_exc.h
MACH_EXC_USER := $(MIG_OUTPUT_DIR)/mach_excUser.c
--- a/make/gensrc/GensrcIcons.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/gensrc/GensrcIcons.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -108,7 +108,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
GENSRC_OSX_ICONS_DST := $(SUPPORT_OUTPUTDIR)/headers/java.desktop
GENSRC_OSX_ICONS := $(GENSRC_OSX_ICONS_DST)/AWTIconData.h
--- a/make/gensrc/GensrcMisc.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/gensrc/GensrcMisc.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -89,7 +89,7 @@
################################################################################
-ifneq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), false)
GENSRC_UC_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java
@@ -103,7 +103,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), solaris)
+ifeq ($(call isTargetOs, solaris), true)
GENSRC_SC_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/SolarisConstants.java
--- a/make/hotspot/CopyToExplodedJdk.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/hotspot/CopyToExplodedJdk.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -25,7 +25,7 @@
# Copy all built libraries into exploded jdk
LIB_TARGETS := $(filter $(LIB_OUTPUTDIR)/%, $(TARGETS))
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupCopyFiles, COPY_LIBS_BIN, \
SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
DEST := $(JDK_OUTPUTDIR)/bin, \
--- a/make/hotspot/gensrc/GensrcAdlc.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/hotspot/gensrc/GensrcAdlc.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -34,16 +34,16 @@
# Flags depending on the build platform/tool chain
# NOTE: No optimization or debug flags set here
- ifeq ($(OPENJDK_BUILD_OS), linux)
+ ifeq ($(call isBuildOs, linux), true)
ADLC_CFLAGS := -fno-exceptions -DLINUX
- else ifeq ($(OPENJDK_BUILD_OS), solaris)
+ else ifeq ($(call isBuildOs, solaris), true)
ADLC_LDFLAGS := -m64
ADLC_CFLAGS := -m64
ADLC_CFLAGS_WARNINGS := +w
- else ifeq ($(OPENJDK_BUILD_OS), aix)
+ else ifeq ($(call isBuildOs, aix), true)
ADLC_LDFLAGS := -q64
ADLC_CFLAGS := -qnortti -qeh -q64 -DAIX
- else ifeq ($(OPENJDK_BUILD_OS), windows)
+ else ifeq ($(call isBuildOs, windows), true)
ADLC_LDFLAGS := -nologo
ADLC_CFLAGS := -nologo -EHsc
# NOTE: The old build also have -D_CRT_SECURE_NO_DEPRECATE but it doesn't
@@ -87,17 +87,17 @@
ADLCFLAGS += -q -T
# ADLC flags depending on target OS
- ifeq ($(OPENJDK_TARGET_OS), linux)
+ ifeq ($(call isTargetOs, linux), true)
ADLCFLAGS += -DLINUX=1 -D_GNU_SOURCE=1
- else ifeq ($(OPENJDK_TARGET_OS), solaris)
+ else ifeq ($(call isTargetOs, solaris), true)
ADLCFLAGS += -DSOLARIS=1 -DSPARC_WORKS=1
- else ifeq ($(OPENJDK_TARGET_OS), aix)
+ else ifeq ($(call isTargetOs, aix), true)
ADLCFLAGS += -DAIX=1
- else ifeq ($(OPENJDK_TARGET_OS), macosx)
+ else ifeq ($(call isTargetOs, macosx), true)
ADLCFLAGS += -D_ALLBSD_SOURCE=1 -D_GNU_SOURCE=1
endif
- ifneq ($(OPENJDK_TARGET_OS), windows)
+ ifeq ($(call isTargetOs, windows), false)
# NOTE: Windows adlc flags was different in the old build. Is this really
# correct?
@@ -109,7 +109,7 @@
# This generates checks in the generated C++ files that _LP64 is correctly
# (un)defined when compiling them.
- ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
+ ifeq ($(call isTargetCpuBits, 64), true)
ADLCFLAGS += -D_LP64=1
else
ADLCFLAGS += -U_LP64
--- a/make/hotspot/gensrc/GensrcDtrace.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/hotspot/gensrc/GensrcDtrace.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -28,12 +28,12 @@
ifeq ($(call check-jvm-feature, dtrace), true)
- ifeq ($(OPENJDK_TARGET_OS), solaris)
+ ifeq ($(call isTargetOs, solaris), true)
DTRACE_FLAGS := -64
DTRACE_CPP_FLAGS := -D_LP64
- else ifeq ($(OPENJDK_TARGET_OS), macosx)
+ else ifeq ($(call isTargetOs, macosx), true)
DTRACE_CPP_FLAGS := -D_LP64 -x c
- else ifeq ($(OPENJDK_TARGET_OS), linux)
+ else ifeq ($(call isTargetOs, linux), true)
DTRACE_CPP_FLAGS := -x c
endif
@@ -54,7 +54,7 @@
TARGETS += $(patsubst $(DTRACE_SOURCE_DIR)/%.d, \
$(DTRACE_GENSRC_DIR)/%.h, $(wildcard $(DTRACE_SOURCE_DIR)/*.d))
- ifeq ($(OPENJDK_TARGET_OS), solaris)
+ ifeq ($(call isTargetOs, solaris), true)
############################################################################
# First we need to generate the dtraceGenOffsets tool. When run, this will
# produce two header files and a C++ file. Note that generateJvmOffsets.cpp
--- a/make/hotspot/ide/CreateVSProject.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/hotspot/ide/CreateVSProject.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -31,7 +31,7 @@
include JavaCompilation.gmk
include SetupJavaCompilers.gmk
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
# The next part is a bit hacky. We include the CompileJvm.gmk to be
# able to extact flags, but we do not wish to execute the rules.
@@ -46,12 +46,12 @@
# Helper macro to convert a unix path to a Windows path, suitable for
# inclusion in a command line.
- ifeq ($(OPENJDK_BUILD_OS_ENV), windows.cygwin)
+ ifeq ($(call isBuildOsEnv, windows.cygwin), true)
FixPath = \
$(strip $(subst \,\\,$(shell $(CYGPATH) -w $1)))
FixLinuxExecutable = \
$(call FixPath, $1)
- else ifeq ($(OPENJDK_BUILD_OS_ENV), windows.wsl)
+ else ifeq ($(call isBuildOsEnv, windows.wsl), true)
FixPath = \
$(strip $(subst \,\\,$(shell $(WSLPATH) -w $1)))
FixLinuxExecutable = \
--- a/make/hotspot/lib/CompileDtraceLibraries.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/hotspot/lib/CompileDtraceLibraries.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -24,7 +24,7 @@
#
ifeq ($(call check-jvm-feature, dtrace), true)
- ifeq ($(OPENJDK_TARGET_OS), solaris)
+ ifeq ($(call isTargetOs, solaris), true)
JNI_INCLUDE_FLAGS := \
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
--- a/make/hotspot/lib/CompileGtest.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/hotspot/lib/CompileGtest.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -31,7 +31,7 @@
# On Windows, there are no internal debug symbols so must set copying to true
# to get any at all.
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
GTEST_COPY_DEBUG_SYMBOLS := true
else
GTEST_COPY_DEBUG_SYMBOLS := false
@@ -39,7 +39,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
GTEST_JVM_MAPFILE := $(JVM_MAPFILE)
else
GTEST_JVM_MAPFILE := $(JVM_OUTPUTDIR)/gtest/mapfile
--- a/make/hotspot/lib/CompileJvm.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/hotspot/lib/CompileJvm.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -56,9 +56,9 @@
JVM_EXCLUDES += adlc
# Needed by vm_version.cpp
-ifeq ($(OPENJDK_TARGET_CPU), x86_64)
+ifeq ($(call isTargetCpu, x86_64), true)
OPENJDK_TARGET_CPU_VM_VERSION := amd64
-else ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
+else ifeq ($(call isTargetCpu, sparcv9), true)
OPENJDK_TARGET_CPU_VM_VERSION := sparc
else
OPENJDK_TARGET_CPU_VM_VERSION := $(OPENJDK_TARGET_CPU)
@@ -107,10 +107,10 @@
# ARM source selection
-ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), linux-arm)
+ifeq ($(call And, $(call isTargetOs, linux) $(call isTargetCpu, arm)), true)
JVM_EXCLUDE_PATTERNS += arm_64
-else ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), linux-aarch64)
+else ifeq ($(call And, $(call isTargetOs, linux) $(call isTargetCpu, aarch64)), true)
# For 64-bit arm builds, we use the 64 bit hotspot/src/cpu/arm
# hotspot sources if HOTSPOT_TARGET_CPU_ARCH is set to arm.
# Exclude the aarch64 and 32 bit arm files for this build.
@@ -119,21 +119,21 @@
endif
endif
-ifneq ($(filter $(OPENJDK_TARGET_OS), linux macosx windows), )
+ifeq ($(call isTargetOs, linux macosx windows), true)
JVM_PRECOMPILED_HEADER := $(TOPDIR)/src/hotspot/share/precompiled/precompiled.hpp
endif
-ifeq ($(OPENJDK_TARGET_CPU), x86)
+ifeq ($(call isTargetCpu, x86), true)
JVM_EXCLUDE_PATTERNS += x86_64
-else ifeq ($(OPENJDK_TARGET_CPU), x86_64)
+else ifeq ($(call isTargetCpu, x86_64), true)
JVM_EXCLUDE_PATTERNS += x86_32
endif
# Inline assembly for solaris
-ifeq ($(OPENJDK_TARGET_OS), solaris)
- ifeq ($(OPENJDK_TARGET_CPU), x86_64)
+ifeq ($(call isTargetOs, solaris), true)
+ ifeq ($(call isTargetCpu, x86_64), true)
JVM_CFLAGS += $(TOPDIR)/src/hotspot/os_cpu/solaris_x86/solaris_x86_64.il
- else ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
+ else ifeq ($(call isTargetCpu, sparcv9), true)
JVM_CFLAGS += $(TOPDIR)/src/hotspot/os_cpu/solaris_sparc/solaris_sparc.il
endif
# Exclude warnings in devstudio 12.6
@@ -143,7 +143,7 @@
endif
endif
-ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-sparcv9)
+ifeq ($(call And, $(call isTargetOs, solaris) $(call isTargetCpu, sparcv9)), true)
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), false)
# NOTE: In the old build, we weirdly enough set -g/-g0 always, regardless
# of if debug symbols were needed. Without it, compilation fails on
@@ -152,8 +152,8 @@
endif
endif
-ifeq ($(OPENJDK_TARGET_OS), windows)
- ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
+ifeq ($(call isTargetOs, windows), true)
+ ifeq ($(call isTargetCpuBits, 64), true)
RC_DESC := 64-Bit$(SPACE)
endif
JVM_RCFLAGS += -D"HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(RC_DESC)$(JVM_VARIANT) VM"
@@ -209,7 +209,7 @@
$(BUILD_LIBJVM_TARGET_DEPS))
ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
- ifeq ($(OPENJDK_TARGET_OS), windows)
+ ifeq ($(call isTargetOs, windows), true)
# It doesn't matter which jvm.lib file gets exported, but we need
# to pick just one.
ifeq ($(JVM_VARIANT), $(JVM_VARIANT_MAIN))
--- a/make/hotspot/lib/JvmDtraceObjects.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/hotspot/lib/JvmDtraceObjects.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -24,7 +24,7 @@
#
ifeq ($(call check-jvm-feature, dtrace), true)
- ifeq ($(OPENJDK_TARGET_OS), solaris)
+ ifeq ($(call isTargetOs, solaris), true)
############################################################################
# Integrate with libjvm. Here we generate two object files which are
@@ -131,7 +131,7 @@
> $(DTRACE_SUPPORT_DIR)/$(@F).d))
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -o $@ \
-s $(DTRACE_SUPPORT_DIR)/$(@F).d)
- ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+ ifeq ($(call isTargetCpuArch, sparc), true)
$(call ExecuteWithLog, $@.elfedit, $(ELFEDIT) $(call GetElfeditCommands) $@)
endif
--- a/make/hotspot/lib/JvmFeatures.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/hotspot/lib/JvmFeatures.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -47,14 +47,14 @@
ifeq ($(call check-jvm-feature, zero), true)
JVM_CFLAGS_FEATURES += -DZERO -DCC_INTERP -DZERO_LIBARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' $(LIBFFI_CFLAGS)
JVM_LIBS_FEATURES += $(LIBFFI_LIBS)
- ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
+ ifeq ($(call isTargetCpu, sparcv9), true)
BUILD_LIBJVM_EXTRA_FILES := $(TOPDIR)/src/hotspot/cpu/sparc/memset_with_concurrent_readers_sparc.cpp
endif
endif
ifeq ($(call check-jvm-feature, minimal), true)
JVM_CFLAGS_FEATURES += -DMINIMAL_JVM -DVMTYPE=\"Minimal\"
- ifeq ($(OPENJDK_TARGET_OS), linux)
+ ifeq ($(call isTargetOs, linux), true)
# Override the default -g with a more liberal strip policy for the minimal JVM
JVM_STRIPFLAGS := --strip-unneeded
endif
--- a/make/hotspot/lib/JvmFlags.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/hotspot/lib/JvmFlags.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -74,7 +74,7 @@
endif
else ifeq ($(DEBUG_LEVEL), fastdebug)
JVM_CFLAGS_DEBUGLEVEL := -DASSERT
- ifeq ($(filter $(OPENJDK_TARGET_OS), windows aix), )
+ ifeq ($call isTargetOs, windows aix), false)
# NOTE: Old build did not define CHECK_UNHANDLED_OOPS on Windows and AIX.
JVM_CFLAGS_DEBUGLEVEL += -DCHECK_UNHANDLED_OOPS
endif
--- a/make/hotspot/lib/JvmMapfile.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/hotspot/lib/JvmMapfile.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -28,13 +28,13 @@
################################################################################
# Combine a list of static symbols
-ifneq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), windows-x86_64)
+ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86_64)), false)
# On Windows x86_64, we should not have any symbols at all, since that
# results in duplicate warnings from the linker (JDK-8043491).
SYMBOLS_SRC += $(TOPDIR)/make/hotspot/symbols/symbols-shared
endif
-ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
+ifeq ($(call isTargetOsType, unix), true)
SYMBOLS_SRC += $(TOPDIR)/make/hotspot/symbols/symbols-unix
endif
@@ -48,7 +48,7 @@
endif
endif
-ifeq ($(OPENJDK_TARGET_OS), solaris)
+ifeq ($(call isTargetOs, solaris), true)
ifeq ($(call check-jvm-feature, dtrace), true)
# Additional mapfiles that are only used when dtrace is enabled
ifeq ($(call check-jvm-feature, compiler2), true)
@@ -64,7 +64,7 @@
# Create a dynamic list of symbols from the built object files. This is highly
# platform dependent.
-ifeq ($(OPENJDK_TARGET_OS), linux)
+ifeq ($(call isTargetOs, linux), true)
DUMP_SYMBOLS_CMD := $(NM) --defined-only *.o
ifneq ($(FILTER_SYMBOLS_PATTERN), )
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
@@ -76,7 +76,7 @@
if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
}'
-else ifeq ($(OPENJDK_TARGET_OS), solaris)
+else ifeq ($(call isTargetOs, solaris), true)
DUMP_SYMBOLS_CMD := $(NM) -p *.o
ifneq ($(FILTER_SYMBOLS_PATTERN), )
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
@@ -90,7 +90,7 @@
if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
}'
-else ifeq ($(OPENJDK_TARGET_OS), macosx)
+else ifeq ($(call isTargetOs, macosx), true)
# nm on macosx prints out "warning: nm: no name list" to stderr for
# files without symbols. Hide this, even at the expense of hiding real errors.
DUMP_SYMBOLS_CMD := $(NM) -Uj *.o 2> /dev/null
@@ -107,7 +107,7 @@
# The script below might be what was intended, but it failes to link with tons
# of 'cannot export hidden symbol vtable for X'.
# '{ if ($$1 ~ /^__ZTV/ || $$1 ~ /^_gHotSpotVM/) print substr($$1, 2) }'
-else ifeq ($(OPENJDK_TARGET_OS), aix)
+else ifeq ($(call isTargetOs, aix), true)
# NOTE: The old build had the solution below. This should to be fixed in
# configure instead.
@@ -123,7 +123,7 @@
if ($$3 ~ /^SharedArchivePath__9Arguments$$/) print $$3; \
}'
-else ifeq ($(OPENJDK_TARGET_OS), windows)
+else ifeq ($(call isTargetOs, windows), true)
DUMP_SYMBOLS_CMD := $(DUMPBIN) -symbols *.obj
FILTER_SYMBOLS_AWK_SCRIPT := \
'{ \
@@ -153,12 +153,12 @@
################################################################################
# Finally convert the symbol list into a platform-specific mapfile
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
# On macosx, we need to add a leading underscore
define create-mapfile-work
$(AWK) '{ if ($$0 ~ ".") { print " _" $$0 } }' < $^ > $@.tmp
endef
-else ifeq ($(OPENJDK_TARGET_OS), windows)
+else ifeq ($(call isTargetOs, windows), true)
# On windows, add an 'EXPORTS' header
define create-mapfile-work
$(ECHO) "EXPORTS" > $@.tmp
--- a/make/hotspot/lib/JvmOverrideFiles.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/hotspot/lib/JvmOverrideFiles.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -51,7 +51,7 @@
LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NORM)
endif
-ifeq ($(OPENJDK_TARGET_OS), linux)
+ifeq ($(call isTargetOs, linux), true)
BUILD_LIBJVM_ostream.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64
BUILD_LIBJVM_logFileOutput.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64
@@ -65,7 +65,7 @@
#
endif
- ifeq ($(OPENJDK_TARGET_CPU), x86)
+ ifeq ($(call isTargetCpu, x86), true)
# Performance measurements show that by compiling GC related code, we could
# significantly reduce the GC pause time on 32 bit Linux/Unix platforms by
# compiling without the PIC flag (-fPIC on linux).
@@ -83,7 +83,7 @@
$(foreach s, $(NONPIC_SRC), $(eval BUILD_LIBJVM_$(notdir $s)_CXXFLAGS := -fno-PIC))
endif
-else ifeq ($(OPENJDK_TARGET_OS), solaris)
+else ifeq ($(call isTargetOs, solaris), true)
ifneq ($(DEBUG_LEVEL), slowdebug)
# dev studio 12.6 workaround
BUILD_LIBJVM_arguments.cpp_OPTIMIZATION := LOW
@@ -97,7 +97,7 @@
BUILD_LIBJVM_jni.cpp_CXXFLAGS := -Qoption ube -O~yz
BUILD_LIBJVM_stubGenerator_$(HOTSPOT_TARGET_CPU).cpp_CXXFLAGS := -xspace
- ifeq ($(OPENJDK_TARGET_CPU), x86_64)
+ ifeq ($(call isTargetCpu, x86_64), true)
# Temporary until SS10 C++ compiler is fixed
BUILD_LIBJVM_generateOptoStub.cpp_CXXFLAGS := -xO2
# Temporary util SS12u1 C++ compiler is fixed
@@ -118,7 +118,7 @@
BUILD_LIBJVM_bytecodeInterpreter.cpp_CXXFLAGS := +d
BUILD_LIBJVM_bytecodeInterpreterWithChecks.cpp_CXXFLAGS := +d
- ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
+ ifeq ($(call isTargetCpuArch, x86), true)
# ube explodes on x86
BUILD_LIBJVM_bytecodeInterpreter.cpp_CXXFLAGS += -xO1
BUILD_LIBJVM_bytecodeInterpreterWithChecks.cpp_CXXFLAGS += -xO1
@@ -129,7 +129,7 @@
# Workaround for jvmciCompilerToVM.cpp long compilation time
BUILD_LIBJVM_jvmciCompilerToVMInit.cpp_OPTIMIZATION := NONE
-else ifeq ($(OPENJDK_TARGET_OS), macosx)
+else ifeq ($(call isTargetOs, macosx), true)
# The copied fdlibm routines in these files must not be optimized
BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
@@ -160,7 +160,7 @@
#
endif
-else ifeq ($(OPENJDK_TARGET_OS), aix)
+else ifeq ($(call isTargetOs, aix), true)
BUILD_LIBJVM_synchronizer.cpp_CXXFLAGS := -qnoinline
BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
# Disable aggressive optimizations for functions in sharedRuntimeTrig.cpp
@@ -185,7 +185,7 @@
# Disable ELF decoder on AIX (AIX uses XCOFF).
JVM_EXCLUDE_PATTERNS += elf
-else ifeq ($(OPENJDK_TARGET_OS), windows)
+else ifeq ($(call isTargetOs, windows), true)
JVM_PRECOMPILED_HEADER_EXCLUDE := \
bytecodeInterpreter.cpp \
bytecodeInterpreterWithChecks.cpp \
--- a/make/hotspot/test/GtestImage.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/hotspot/test/GtestImage.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -37,7 +37,7 @@
$(eval TARGETS += $$(COPY_GTEST_$v)) \
)
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call SetupCopyFiles, COPY_GTEST_MSVCR_$v, \
DEST := $(TEST_IMAGE_DIR)/hotspot/gtest/$v, \
@@ -54,7 +54,7 @@
)
endif
-ifeq ($(OPENJDK_TARGET_OS), solaris)
+ifeq ($(call isTargetOs, solaris), true)
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call SetupCopyFiles, COPY_GTEST_STLPORT_$v, \
DEST := $(TEST_IMAGE_DIR)/hotspot/gtest/$v, \
--- a/make/launcher/Launcher-java.base.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/launcher/Launcher-java.base.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -51,7 +51,7 @@
TARGETS += $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX)
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupBuildLauncher, javaw, \
CFLAGS := -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
EXTRA_RC_FLAGS := $(JAVA_RC_FLAGS), \
@@ -65,7 +65,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), linux)
+ifeq ($(call isTargetOs, linux), true)
$(eval $(call SetupJdkExecutable, BUILD_JEXEC, \
NAME := jexec, \
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/launcher, \
@@ -84,7 +84,7 @@
################################################################################
-ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix linux), )
+ifeq ($(call isTargetOs, macosx solaris aix linux), true)
$(eval $(call SetupJdkExecutable, BUILD_JSPAWNHELPER, \
NAME := jspawnhelper, \
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \
--- a/make/launcher/Launcher-java.security.jgss.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/launcher/Launcher-java.security.jgss.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -25,7 +25,7 @@
include LauncherCommon.gmk
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupBuildLauncher, kinit, \
MAIN_CLASS := sun.security.krb5.internal.tools.Kinit, \
))
--- a/make/launcher/Launcher-jdk.accessibility.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/launcher/Launcher-jdk.accessibility.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -28,7 +28,7 @@
################################################################################
# jabswitch
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
JABSWITCH_SRC := $(TOPDIR)/src/jdk.accessibility/windows/native/jabswitch
ACCESSBRIDGE_SRC := $(TOPDIR)/src/jdk.accessibility/windows/native/common
@@ -98,7 +98,7 @@
endef
- ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+ ifeq ($(call isTargetCpuBits, 32), true)
$(eval $(call SetupInspector,-32,32))
$(eval $(call SetupWalker,-32,32))
$(eval $(call SetupInspector,,LEGACY))
--- a/make/launcher/Launcher-jdk.pack.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/launcher/Launcher-jdk.pack.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -45,7 +45,7 @@
CXXFLAGS_JDKEXE += -fvisibility=hidden
LDFLAGS_JDKEXE += -Wl,--exclude-libs,ALL
else ifeq ($(TOOLCHAIN_TYPE), clang)
- ifneq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), false)
CXXFLAGS_JDKEXE += -fvisibility=hidden
endif
else ifeq ($(TOOLCHAIN_TYPE), solstudio)
--- a/make/launcher/LauncherCommon.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/launcher/LauncherCommon.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -105,7 +105,7 @@
$$(addprefix -J, $$($1_JAVA_ARGS)) $$($1_LAUNCHER_CLASS), "$$a"$(COMMA) )) }'
$1_CFLAGS += -DJAVA_ARGS=$$($1_JAVA_ARGS_STR)
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), true)
ifeq ($$($1_MACOSX_SIGNED), true)
$1_PLIST_FILE := Info-privileged.plist
$1_CODESIGN := true
@@ -179,11 +179,11 @@
$1 += $$(BUILD_LAUNCHER_$1)
TARGETS += $$($1)
- ifeq ($(OPENJDK_TARGET_OS), aix)
+ ifeq ($(call isTargetOs, aix), true)
$$(BUILD_LAUNCHER_$1): $(call FindStaticLib, java.base, jli_static)
endif
- ifeq ($(OPENJDK_TARGET_OS), windows)
+ ifeq ($(call isTargetOs, windows), true)
$$(BUILD_LAUNCHER_$1): $(call FindStaticLib, java.base, java, /libjava) \
$$($1_WINDOWS_JLI_LIB)
endif
@@ -194,7 +194,7 @@
# relationship between executables and man pages (even if this is not always
# the case), so piggyback man page generation on the launcher compilation.
-ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
+ifeq ($(call isTargetOsType, unix), true)
# Only build manpages on unix systems.
# We assume all our man pages should reside in section 1.
--- a/make/lib/Awt2dLibraries.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Awt2dLibraries.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -43,7 +43,7 @@
BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES -DMLIB_NO_LIBSUNMATH
-ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
+ifeq ($(call isTargetCpuBits, 64), true)
BUILD_LIBMLIB_CFLAGS += -DMLIB_OS64BIT
endif
@@ -68,7 +68,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
+ifeq ($(call And, $(call isTargetOs, solaris) $(call isTargetCpuArch, sparc)), true)
# libmlib_image_v is basically built from mlib_image sources, with some additions
# and some exclusions.
@@ -80,7 +80,7 @@
LIBMLIB_IMAGE_V_CFLAGS := -xarch=sparcvis -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES \
$(TOPDIR)/src/$(MODULE)/unix/native/libmlib_image/vis_$(OPENJDK_TARGET_CPU_BITS).il
- ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
+ ifeq ($(call isTargetCpuBits, 64), true)
LIBMLIB_IMAGE_V_CFLAGS += -DMLIB_OS64BIT
endif
@@ -127,11 +127,11 @@
$(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
#
-ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
+ifeq ($(call And, $(call isTargetOs, solaris) $(call isTargetCpuArch, sparc)), true)
LIBAWT_EXTRA_SRC += $(TOPDIR)/src/$(MODULE)/share/native/common/awt/medialib
endif
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
LIBAWT_EXTRA_SRC += \
$(TOPDIR)/src/$(MODULE)/share/native/common/awt/utility \
$(TOPDIR)/src/$(MODULE)/share/native/common/font \
@@ -140,22 +140,22 @@
#
endif
-ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux macosx aix), )
+ifeq ($(call isTargetOs, solaris linux macosx aix), true)
LIBAWT_EXFILES += awt_Font.c CUPSfuncs.c fontpath.c X11Color.c
endif
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
LIBAWT_EXFILES += initIDs.c awt/image/cvutils/img_colors.c
endif
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
LIBAWT_EXFILES += \
java2d/d3d/D3DShaderGen.c \
awt/image/cvutils/img_colors.c \
#
endif
-ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-sparcv9)
+ifeq ($(call And, $(call isTargetOs, solaris) $(call isTargetCpu, sparcv9)), true)
LIBAWT_EXFILES += java2d/loops/MapAccelFunc.c
else
LIBAWT_EXCLUDES += \
@@ -182,20 +182,20 @@
LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES $(X_CFLAGS)
-ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-sparcv9)
+ifeq ($(call And, $(call isTargetOs, solaris) $(call isTargetCpu, sparcv9)), true)
LIBAWT_CFLAGS += -xarch=sparcvis -DMLIB_ADD_SUFF \
$(TOPDIR)/src/$(MODULE)/unix/native/libmlib_image/vis_$(OPENJDK_TARGET_CPU_BITS).il
LIBAWT_ASFLAGS = -P -xarch=v9a
endif
-ifneq ($(OPENJDK_TARGET_OS), solaris)
+ifeq ($(call isTargetOs, solaris), false)
LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
endif
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
- ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
+ ifeq ($(call isTargetCpuBits, 64), true)
LIBAWT_CFLAGS += -DMLIB_OS64BIT
endif
@@ -203,7 +203,7 @@
LIBAWT_VERSIONINFO_RESOURCE := $(TOPDIR)/src/$(MODULE)/windows/native/libawt/windows/awt.rc
endif
-ifeq ($(OPENJDK_TARGET_OS), linux)
+ifeq ($(call isTargetOs, linux), true)
# FIXME: This is probably not what we want to do, but keep it now for compatibility.
LIBAWT_CFLAGS += $(EXPORT_ALL_SYMBOLS)
endif
@@ -263,7 +263,7 @@
$(BUILD_LIBAWT): $(call FindLib, java.base, java)
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
$(BUILD_LIBAWT): $(BUILD_LIBMLIB_IMAGE)
endif
@@ -271,7 +271,7 @@
################################################################################
-ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx), )
+ifeq ($(call isTargetOs, windows macosx), false)
ifeq ($(ENABLE_HEADLESS_ONLY), false)
LIBAWT_XAWT_EXTRA_SRC := \
@@ -297,11 +297,11 @@
$(FONTCONFIG_CFLAGS) \
$(CUPS_CFLAGS)
- ifeq ($(OPENJDK_TARGET_OS), solaris)
+ ifeq ($(call isTargetOs, solaris), true)
LIBAWT_XAWT_CFLAGS += -DFUNCPROTO=15
endif
- ifeq ($(OPENJDK_TARGET_OS), linux)
+ ifeq ($(call isTargetOs, linux), true)
ifeq ($(DISABLE_XRENDER), true)
LIBAWT_XAWT_CFLAGS += -DDISABLE_XRENDER_BY_DEFAULT=true
endif
@@ -309,7 +309,7 @@
LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm
- ifeq ($(OPENJDK_TARGET_OS), linux)
+ ifeq ($(call isTargetOs, linux), true)
LIBAWT_XAWT_LIBS += -lpthread
endif
@@ -443,7 +443,7 @@
################################################################################
# Mac and Windows only use the native AWT lib, do not build libawt_headless
-ifeq ($(findstring $(OPENJDK_TARGET_OS), windows macosx),)
+ifeq ($(call isTargetOs, windows macosx), false)
LIBAWT_HEADLESS_EXTRA_SRC := \
common/font \
@@ -504,7 +504,7 @@
# For use by libfontmanager:
LIBFREETYPE_CFLAGS := -I$(BUILD_LIBFREETYPE_HEADER_DIRS)
- ifeq ($(OPENJDK_TARGET_OS), windows)
+ ifeq ($(call isTargetOs, windows), true)
LIBFREETYPE_LIBS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfreetype/freetype.lib
else
LIBFREETYPE_LIBS := -lfreetype
@@ -534,20 +534,20 @@
HARFBUZZ_CFLAGS := -DHAVE_OT -DHAVE_FALLBACK -DHAVE_UCDN -DHAVE_ROUND
-ifneq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), false)
HARFBUZZ_CFLAGS += -DGETPAGESIZE -DHAVE_MPROTECT -DHAVE_PTHREAD \
-DHAVE_SYSCONF -DHAVE_SYS_MMAN_H -DHAVE_UNISTD_H
endif
-ifneq (, $(findstring $(OPENJDK_TARGET_OS), linux macosx))
+ifeq ($(call isTargetOs, linux macosx), true)
HARFBUZZ_CFLAGS += -DHAVE_INTEL_ATOMIC_PRIMITIVES
endif
-ifeq ($(OPENJDK_TARGET_OS), solaris)
+ifeq ($(call isTargetOs, solaris), true)
HARFBUZZ_CFLAGS += -DHAVE_SOLARIS_ATOMIC_OPS
endif
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
HARFBUZZ_CFLAGS += -DHAVE_CORETEXT
endif
-ifneq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), false)
LIBFONTMANAGER_EXCLUDE_FILES += harfbuzz/hb-coretext.cc
endif
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later.
@@ -572,11 +572,11 @@
LIBFONTMANAGER_OPTIMIZATION := HIGH
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
X11TextRenderer.c
LIBFONTMANAGER_OPTIMIZATION := HIGHEST
-else ifeq ($(OPENJDK_TARGET_OS), macosx)
+else ifeq ($(call isTargetOs, macosx), true)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
X11TextRenderer.c \
fontpath.c \
@@ -640,7 +640,7 @@
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
$(BUILD_LIBFONTMANAGER): $(call FindLib, $(MODULE), awt_lwawt)
endif
@@ -652,7 +652,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
LIBJAWT_CFLAGS := -EHsc -DUNICODE -D_UNICODE
@@ -667,7 +667,7 @@
java.base:libjava \
#
- ifeq ($(OPENJDK_TARGET_CPU), x86)
+ ifeq ($(call isTargetCpu, x86), true)
KERNEL32_LIB := kernel32.lib
endif
@@ -692,25 +692,25 @@
TARGETS += $(COPY_JAWT_LIB)
-else # OPENJDK_TARGET_OS not windows
+else # not windows
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), true)
# libjawt on macosx do not use the unix code
LIBJAWT_EXCLUDE_SRC_PATTERNS := unix
endif
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), true)
JAWT_LIBS := -lawt_lwawt
else
JAWT_LIBS :=
- ifneq ($(OPENJDK_TARGET_OS), solaris)
+ ifeq ($(call isTargetOs, solaris), false)
JAWT_LIBS += -lawt
endif
ifeq ($(ENABLE_HEADLESS_ONLY), false)
JAWT_LIBS += -lawt_xawt
else
JAWT_LIBS += -lawt_headless
- ifeq ($(OPENJDK_TARGET_OS), linux)
+ ifeq ($(call isTargetOs, linux), true)
JAWT_CFLAGS += -DHEADLESS
endif
endif
@@ -742,11 +742,11 @@
$(BUILD_LIBJAWT): $(call FindLib, $(MODULE), awt_headless)
endif
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), true)
$(BUILD_LIBJAWT): $(call FindLib, $(MODULE), awt_lwawt)
endif
-endif # OPENJDK_TARGET_OS
+endif
TARGETS += $(BUILD_LIBJAWT)
@@ -784,20 +784,20 @@
LIBSPLASHSCREEN_EXTRA_SRC += java.base:libzip/zlib
endif
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), true)
# libsplashscreen on macosx do not use the unix code
LIBSPLASHSCREEN_EXCLUDE_SRC_PATTERNS := unix
endif
LIBSPLASHSCREEN_CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE -DPNG_ARM_NEON_OPT=0
- ifeq ($(OPENJDK_TARGET_OS), linux)
- ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
+ ifeq ($(call isTargetOs, linux), true)
+ ifeq ($(call isTargetCpuArch, ppc), true)
LIBSPLASHSCREEN_CFLAGS += -DPNG_POWERPC_VSX_OPT=0
endif
endif
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), true)
LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
BUILD_LIBSPLASHSCREEN_java_awt_SplashScreen.c_CFLAGS := -x objective-c -O0
@@ -808,7 +808,7 @@
BUILD_LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
BUILD_LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
- else ifeq ($(OPENJDK_TARGET_OS), windows)
+ else ifeq ($(call isTargetOs, windows), true)
LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
else
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
@@ -816,14 +816,14 @@
LIBSPLASHSCREEN_LIBS :=
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), true)
LIBSPLASHSCREEN_LIBS += \
$(LIBM) -lpthread -liconv -losxapp \
-framework ApplicationServices \
-framework Foundation \
-framework Cocoa \
-framework JavaNativeFoundation
- else ifeq ($(OPENJDK_TARGET_OS), windows)
+ else ifeq ($(call isTargetOs, windows), true)
LIBSPLASHSCREEN_LIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib $(WIN_JAVA_LIB) jvm.lib
else
LIBSPLASHSCREEN_LIBS += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread -ldl
@@ -863,7 +863,7 @@
TARGETS += $(BUILD_LIBSPLASHSCREEN)
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), true)
$(BUILD_LIBSPLASHSCREEN): $(call FindLib, $(MODULE), osxapp)
endif
@@ -871,7 +871,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
LIBAWT_LWAWT_EXTRA_SRC := \
$(TOPDIR)/src/$(MODULE)/unix/native/common/awt \
@@ -941,7 +941,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBOSXUI, \
NAME := osxui, \
--- a/make/lib/CoreLibraries.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/CoreLibraries.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -35,7 +35,7 @@
BUILD_LIBFDLIBM_OPTIMIZATION := NONE
-ifeq ($(OPENJDK_TARGET_OS), solaris)
+ifeq ($(call isTargetOs, solaris), true)
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
endif
@@ -68,7 +68,7 @@
##########################################################################################
LIBVERIFY_OPTIMIZATION := HIGH
-ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
+ifeq ($(call isTargetOs, solaris linux), true)
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
LIBVERIFY_OPTIMIZATION := LOW
endif
@@ -92,7 +92,7 @@
LIBJAVA_CFLAGS := -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
endif
@@ -181,11 +181,11 @@
##########################################################################################
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
LIBJLI_EXCLUDE_FILES += java_md_solinux.c
endif
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
# Supply the name of the C runtime lib.
LIBJLI_CFLAGS += -DMSVCR_DLL_NAME='"$(notdir $(MSVCR_DLL))"'
ifneq ($(MSVCP_DLL), )
@@ -233,7 +233,7 @@
LIBJLI_SRC_DIRS := $(call FindSrcDirsForComponent, java.base, libjli)
-ifeq ($(OPENJDK_TARGET_OS), aix)
+ifeq ($(call isTargetOs, aix), true)
# AIX also requires a static libjli because the compiler doesn't support '-rpath'
$(eval $(call SetupNativeCompilation, BUILD_LIBJLI_STATIC, \
NAME := jli_static, \
--- a/make/lib/Lib-java.base.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-java.base.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -99,7 +99,7 @@
################################################################################
# Create the macosx security library
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
# JavaNativeFoundation framework not supported in static builds
ifneq ($(STATIC_BUILD), true)
@@ -130,7 +130,7 @@
################################################################################
# Create the jsig library
-ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
+ifeq ($(call isTargetOsType, unix), true)
ifeq ($(STATIC_BUILD), false)
$(eval $(call SetupJdkLibrary, BUILD_LIBJSIG, \
NAME := jsig, \
@@ -205,7 +205,7 @@
################################################################################
# Copy tzmappings file for Windows
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupCopyFiles, COPY_TZMAPPINGS, \
FILES := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/windows/conf/tzmappings, \
DEST := $(call FindLibDirForModule, $(MODULE)), \
--- a/make/lib/Lib-java.desktop.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-java.desktop.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -39,7 +39,7 @@
################################################################################
# Create the libjsound library
-ifneq ($(OPENJDK_TARGET_OS), aix)
+ifeq ($(call isTargetOs, aix), false)
LIBJSOUND_CFLAGS := \
$(ALSA_CFLAGS) \
@@ -48,14 +48,14 @@
-DUSE_DAUDIO=TRUE \
#
- ifneq ($(OPENJDK_TARGET_OS), solaris)
+ ifeq ($(call isTargetOs, solaris), false)
LIBJSOUND_CFLAGS += \
-DUSE_PLATFORM_MIDI_OUT=TRUE \
-DUSE_PLATFORM_MIDI_IN=TRUE \
#
endif
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), true)
LIBJSOUND_TOOLCHAIN := TOOLCHAIN_LINK_CXX
endif
@@ -87,7 +87,7 @@
################################################################################
# Create the macosx specific osxapp and osx libraries
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBOSXAPP, \
NAME := osxapp, \
@@ -142,4 +142,3 @@
$(BUILD_LIBOSX): $(call FindLib, java.base, java)
endif
-
--- a/make/lib/Lib-java.instrument.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-java.instrument.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -30,7 +30,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
# equivalent of strcasecmp is stricmp on Windows
LIBINSTRUMENT_CFLAGS := -Dstrcasecmp=stricmp
WINDOWS_JLI_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjli/jli.lib
@@ -62,7 +62,7 @@
$(WINDOWS_JLI_LIB), \
))
-ifeq ($(OPENJDK_TARGET_OS), aix)
+ifeq ($(call isTargetOs, aix), true)
$(BUILD_LIBINSTRUMENT): $(call FindStaticLib, java.base, jli_static)
else
$(BUILD_LIBINSTRUMENT): $(call FindLib, java.base, jli)
--- a/make/lib/Lib-java.management.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-java.management.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -31,7 +31,7 @@
################################################################################
LIBMANAGEMENT_OPTIMIZATION := HIGH
-ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
+ifeq ($(call isTargetOs, solaris linux), true)
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
LIBMANAGEMENT_OPTIMIZATION := LOW
endif
@@ -57,4 +57,3 @@
# Include custom extension post hook
$(eval $(call IncludeCustomExtension, lib/Lib-java.management-post.gmk))
-
--- a/make/lib/Lib-java.prefs.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-java.prefs.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -28,7 +28,7 @@
################################################################################
# libprefs on macosx do not use the unix code
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
LIBPREFS_EXCLUDE_SRC_PATTERNS := unix
endif
--- a/make/lib/Lib-java.security.jgss.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-java.security.jgss.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -44,7 +44,7 @@
ifneq ($(BUILD_CRYPTO), false)
- ifeq ($(OPENJDK_TARGET_OS), windows)
+ ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBW2K_LSA_AUTH, \
NAME := w2k_lsa_auth, \
OPTIMIZATION := LOW, \
@@ -59,7 +59,7 @@
TARGETS += $(BUILD_LIBW2K_LSA_AUTH)
endif
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(call isTargetOs, macosx), true)
# libosxkrb5 needs to call deprecated krb5 APIs so that java
# can use the native credentials cache.
$(eval $(call SetupJdkLibrary, BUILD_LIBOSXKRB5, \
--- a/make/lib/Lib-jdk.accessibility.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-jdk.accessibility.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -27,7 +27,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
ROOT_SRCDIR := $(TOPDIR)/src/jdk.accessibility/windows/native
@@ -100,7 +100,7 @@
endef
- ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+ ifeq ($(call isTargetCpuBits, 32), true)
$(eval $(call SetupAccessBridgeSysInfo))
$(eval $(call SetupJavaDLL,-32,32))
$(eval $(call SetupJavaDLL,,LEGACY))
--- a/make/lib/Lib-jdk.attach.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-jdk.attach.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -27,7 +27,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
# In (at least) VS2013 and later, -DPSAPI_VERSION=1 is needed to generate
# a binary that is compatible with windows versions older than 7/2008R2.
# See MSDN documentation for GetProcessMemoryInfo for more information.
--- a/make/lib/Lib-jdk.crypto.mscapi.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-jdk.crypto.mscapi.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -27,7 +27,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBSUNMSCAPI, \
NAME := sunmscapi, \
--- a/make/lib/Lib-jdk.crypto.ucrypto.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-jdk.crypto.ucrypto.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -27,7 +27,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), solaris)
+ifeq ($(call isTargetOs, solaris), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBJ2UCRYPTO, \
NAME := j2ucrypto, \
--- a/make/lib/Lib-jdk.hotspot.agent.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-jdk.hotspot.agent.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -29,19 +29,19 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), linux)
+ifeq ($(call isTargetOs, linux), true)
SA_CFLAGS := -D_FILE_OFFSET_BITS=64
-else ifeq ($(OPENJDK_TARGET_OS), solaris)
+else ifeq ($(call isTargetOs, solaris), true)
SA_LDFLAGS := -mt
-else ifeq ($(OPENJDK_TARGET_OS), macosx)
+else ifeq ($(call isTargetOs, macosx), true)
SA_CFLAGS := -Damd64 -D_GNU_SOURCE -mno-omit-leaf-frame-pointer \
-mstack-alignment=16 -fPIC
LIBSA_EXTRA_SRC := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent
-else ifeq ($(OPENJDK_TARGET_OS), windows)
+else ifeq ($(call isTargetOs, windows), true)
SA_CFLAGS := -D_WINDOWS -D_DEBUG -D_CONSOLE -D_MBCS -EHsc
- ifeq ($(OPENJDK_TARGET_CPU), x86_64)
+ ifeq ($(call isTargetCpu, x86_64), true)
SA_CXXFLAGS := -DWIN64
else
# Only add /RTC1 flag for debug builds as it's
--- a/make/lib/Lib-jdk.internal.le.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-jdk.internal.le.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -27,7 +27,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBLE, \
NAME := le, \
@@ -39,6 +39,6 @@
TARGETS += $(BUILD_LIBLE)
-endif # OPENJDK_TARGET_OS
+endif
################################################################################
--- a/make/lib/Lib-jdk.jdi.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-jdk.jdi.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -27,7 +27,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBDT_SHMEM, \
NAME := dt_shmem, \
@@ -42,6 +42,6 @@
TARGETS += $(BUILD_LIBDT_SHMEM)
-endif # OPENJDK_TARGET_OS
+endif
################################################################################
--- a/make/lib/Lib-jdk.management.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-jdk.management.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -30,7 +30,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
# In (at least) VS2013 and later, -DPSAPI_VERSION=1 is needed to generate
# a binary that is compatible with windows versions older than 7/2008R2.
# See MSDN documentation for GetProcessMemoryInfo for more information.
@@ -38,7 +38,7 @@
endif
LIBMANAGEMENT_EXT_OPTIMIZATION := HIGH
-ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
+ifeq ($(call isTargetOs, solaris linux), true)
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true)
LIBMANAGEMENT_EXT_OPTIMIZATION := LOW
endif
@@ -65,4 +65,3 @@
# Include custom extension post hook
$(eval $(call IncludeCustomExtension, lib/Lib-jdk.management-post.gmk))
-
--- a/make/lib/Lib-jdk.net.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-jdk.net.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -27,7 +27,7 @@
################################################################################
-ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux macosx), )
+ifeq ($(call isTargetOs, solaris linux macosx), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBEXTNET, \
NAME := extnet, \
--- a/make/lib/Lib-jdk.sctp.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/lib/Lib-jdk.sctp.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -27,9 +27,9 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
+ifeq ($(call isTargetOsType, unix), true)
- ifeq ($(filter $(OPENJDK_TARGET_OS), macosx aix), )
+ ifeq ($(call isTargetOs, macosx aix), false)
$(eval $(call SetupJdkLibrary, BUILD_LIBSCTP, \
NAME := sctp, \
OPTIMIZATION := LOW, \
--- a/make/test/BuildFailureHandler.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/test/BuildFailureHandler.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -61,7 +61,7 @@
################################################################################
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupNativeCompilation, BUILD_LIBTIMEOUT_HANDLER, \
NAME := timeoutHandler, \
@@ -99,7 +99,7 @@
#
RUN_DIR := $(FH_SUPPORT)/test
# Add the dir of the dll to the path on windows
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
export PATH := $(PATH);$(FH_SUPPORT)
endif
--- a/make/test/JtregNativeHotspot.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/test/JtregNativeHotspot.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -140,7 +140,7 @@
-I$(VM_TESTBASE_DIR)/nsk/share/jni
NO_FRAMEPOINTER_CFLAGS :=
-ifeq ($(OPENJDK_TARGET_OS),linux)
+ifeq ($(call isTargetOs, linux), true)
NO_FRAMEPOINTER_CFLAGS := -fomit-frame-pointer
endif
@@ -849,11 +849,11 @@
################################################################################
# Platform specific setup
-ifneq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
+ifeq ($(call And, $(call isTargetOs, solaris) $(call isTargetCpuArch, sparc)), false)
BUILD_HOTSPOT_JTREG_EXCLUDE += liboverflow.c exeThreadSignalMask.c
endif
-ifeq ($(OPENJDK_TARGET_OS), linux)
+ifeq ($(call isTargetOs, linux), true)
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rw := -z noexecstack
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rwx := -z execstack
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libstepBreakPopReturn := -lpthread
@@ -870,11 +870,11 @@
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exesigtest := -ljvm
-ifeq ($(OPENJDK_TARGET_OS), solaris)
+ifeq ($(call isTargetOs, solaris), true)
BUILD_HOTSPOT_JTREG_EXCLUDE += libterminatedThread.c
endif
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c
--- a/make/test/JtregNativeJdk.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/make/test/JtregNativeJdk.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -54,7 +54,7 @@
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli
# Platform specific setup
-ifeq ($(OPENJDK_TARGET_OS), windows)
+ifeq ($(call isTargetOs, windows), true)
BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c
WIN_LIB_JAVA := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
@@ -64,15 +64,15 @@
else
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava
BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava
- ifeq ($(OPENJDK_TARGET_OS), linux)
+ ifeq ($(call isTargetOs, linux), true)
BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava
- else ifeq ($(OPENJDK_TARGET_OS), solaris)
+ else ifeq ($(call isTargetOs, solaris), true)
BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava -lsocket -lnsl
endif
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeJliLaunchTest := -ljli
endif
-ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(call isTargetOs, macosx), true)
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libTestMainKeyWindow := -ObjC
BUILD_JDK_JTREG_LIBRARIES_LIBS_libTestMainKeyWindow := -framework JavaVM \
-framework Cocoa -framework JavaNativeFoundation
--- a/test/make/TestMakeBase.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/test/make/TestMakeBase.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -116,6 +116,28 @@
endif
################################################################################
+# Test boolean operators
+
+$(eval $(call assert-equals, $(call And, true true true ), true))
+$(eval $(call assert-equals, $(call And, true false true ), false))
+$(eval $(call assert-equals, $(call And, false false false ), false))
+$(eval $(call assert-equals, $(call And, true), true))
+$(eval $(call assert-equals, $(call And, false), false))
+$(eval $(call assert-equals, $(call And, ), true))
+
+$(eval $(call assert-equals, $(call Or, true true true ), true))
+$(eval $(call assert-equals, $(call Or, true false true ), true))
+$(eval $(call assert-equals, $(call Or, false false false ), false))
+$(eval $(call assert-equals, $(call Or, true), true))
+$(eval $(call assert-equals, $(call Or, false), false))
+$(eval $(call assert-equals, $(call Or, ), false))
+
+# We cannot catch $(error) while testing, but you can enable this manually
+# by uncommenting and watch make fails.
+#$(eval $(call assert-equals, $(call And, non-boolean ), $(error ...)))
+#$(eval $(call assert-equals, $(call Or, non-boolean ), $(error ...)))
+
+################################################################################
# Test remove-prefixes
$(eval $(call assert-equals, \
--- a/test/make/UtilsForTests.gmk Thu Feb 07 10:26:32 2019 +0100
+++ b/test/make/UtilsForTests.gmk Thu Feb 07 12:35:45 2019 +0100
@@ -37,6 +37,6 @@
# On macosx, file system timestamps only have 1 second resultion so must add
# sleeps to properly test dependencies.
-ifeq ($(OPENJDK_BUILD_OS), macosx)
+ifeq ($(call isBuildOs, macosx), true)
SLEEP_ON_MAC := sleep 1
endif