make/common/Utils.gmk
branchihse-targettest-branch
changeset 57145 ceaa243112bd
parent 53484 8c296eedfb04
equal deleted inserted replaced
57144:fff0653622aa 57145:ceaa243112bd
   267     $(if $(filter-out $(VALID_JVM_VARIANTS), $1), \
   267     $(if $(filter-out $(VALID_JVM_VARIANTS), $1), \
   268       $(error Internal error: Invalid variant tested: $1)) \
   268       $(error Internal error: Invalid variant tested: $1)) \
   269     $(if $(filter $1, $(JVM_VARIANTS)), true, false))
   269     $(if $(filter $1, $(JVM_VARIANTS)), true, false))
   270 
   270 
   271 ################################################################################
   271 ################################################################################
       
   272 # Check if our build or target conforms to certain restrictions. This set of
       
   273 # functions all work in similar ways, testing the property that the name
       
   274 # implies, so e.g. isTargetCpu test the CPU of the target system.
       
   275 #
       
   276 # $1 - A property, or a space separated list of properties to test for.
       
   277 #
       
   278 # Returns true if the actual property matches one of the properties in the list,
       
   279 # and false otherwise.
       
   280 #
       
   281 # Examples: $(call isTargetOs, linux solaris) will return true when executed
       
   282 # on either linux or solaris, and false otherwise.
       
   283 # $(call isBuildCpuArch, x86) will return true iff the build CPU Arch is x86.
       
   284 
       
   285 isTargetOs = \
       
   286   $(strip $(if $(filter $(OPENJDK_TARGET_OS), $1), true, false))
       
   287 
       
   288 isTargetOsType = \
       
   289   $(strip $(if $(filter $(OPENJDK_TARGET_OS_TYPE), $1), true, false))
       
   290 
       
   291 isTargetCpu = \
       
   292   $(strip $(if $(filter $(OPENJDK_TARGET_CPU), $1), true, false))
       
   293 
       
   294 isTargetCpuArch = \
       
   295   $(strip $(if $(filter $(OPENJDK_TARGET_CPU_ARCH), $1), true, false))
       
   296 
       
   297 isTargetCpuBits = \
       
   298   $(strip $(if $(filter $(OPENJDK_TARGET_CPU_BITS), $1), true, false))
       
   299 
       
   300 isBuildOs = \
       
   301   $(strip $(if $(filter $(OPENJDK_BUILD_OS), $1), true, false))
       
   302 
       
   303 isBuildOsType = \
       
   304   $(strip $(if $(filter $(OPENJDK_BUILD_OS_TYPE), $1), true, false))
       
   305 
       
   306 isBuildOsEnv = \
       
   307   $(strip $(if $(filter $(OPENJDK_BUILD_OS_ENV), $1), true, false))
       
   308 
       
   309 isBuildCpu = \
       
   310   $(strip $(if $(filter $(OPENJDK_BUILD_CPU), $1), true, false))
       
   311 
       
   312 isBuildCpuArch = \
       
   313   $(strip $(if $(filter $(OPENJDK_BUILD_CPU_ARCH), $1), true, false))
       
   314 
       
   315 ################################################################################
   272 # Converts a space separated list to a comma separated list.
   316 # Converts a space separated list to a comma separated list.
   273 #
   317 #
   274 # Replacing double-comma with a single comma is to workaround the issue with
   318 # Replacing double-comma with a single comma is to workaround the issue with
   275 # some version of make on windows that doesn't substitute spaces with one comma
   319 # some version of make on windows that doesn't substitute spaces with one comma
   276 # properly.
   320 # properly.