8339336: Fix build system whitespace to adhere to coding conventions

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2024-09-03 15:31:09 +00:00
parent ad40a122d6
commit 66945e5010
81 changed files with 624 additions and 607 deletions

View File

@ -284,7 +284,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
ifeq ($(MACOSX_CODESIGN_MODE), hardened) ifeq ($(MACOSX_CODESIGN_MODE), hardened)
# Macosx release build and code signing available. # Macosx release build and code signing available.
################################################################################ ############################################################################
# JDK bundle # JDK bundle
$(eval $(call SetupCopyFiles, CREATE_JDK_BUNDLE_DIR_SIGNED, \ $(eval $(call SetupCopyFiles, CREATE_JDK_BUNDLE_DIR_SIGNED, \
SRC := $(JDK_IMAGE_DIR), \ SRC := $(JDK_IMAGE_DIR), \
@ -313,7 +313,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE) PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
################################################################################ ############################################################################
# JRE bundle # JRE bundle
$(eval $(call SetupCopyFiles, CREATE_JRE_BUNDLE_DIR_SIGNED, \ $(eval $(call SetupCopyFiles, CREATE_JRE_BUNDLE_DIR_SIGNED, \
SRC := $(JRE_IMAGE_DIR), \ SRC := $(JRE_IMAGE_DIR), \

View File

@ -52,8 +52,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
build/tools/deps \ build/tools/deps \
build/tools/docs \ build/tools/docs \
build/tools/jigsaw \ build/tools/jigsaw \
build/tools/depend \ build/tools/depend, \
, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \ BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
DISABLED_WARNINGS := dangling-doc-comments options, \ DISABLED_WARNINGS := dangling-doc-comments options, \
JAVAC_FLAGS := \ JAVAC_FLAGS := \
@ -66,17 +65,19 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
TARGETS += $(BUILD_TOOLS_JDK) TARGETS += $(BUILD_TOOLS_JDK)
$(eval $(call SetupCopyFiles,COPY_NIMBUS_TEMPLATES, \ $(eval $(call SetupCopyFiles, COPY_NIMBUS_TEMPLATES, \
SRC := $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus, \ SRC := $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources, \ DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources, \
FILES := $(wildcard $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template))) FILES := $(wildcard $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template), \
))
TARGETS += $(COPY_NIMBUS_TEMPLATES) TARGETS += $(COPY_NIMBUS_TEMPLATES)
$(eval $(call SetupCopyFiles,COPY_CLDRCONVERTER_PROPERTIES, \ $(eval $(call SetupCopyFiles, COPY_CLDRCONVERTER_PROPERTIES, \
SRC := $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter, \ SRC := $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/cldrconverter, \ DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/cldrconverter, \
FILES := $(wildcard $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter/*.properties))) FILES := $(wildcard $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter/*.properties), \
))
TARGETS += $(COPY_CLDRCONVERTER_PROPERTIES) TARGETS += $(COPY_CLDRCONVERTER_PROPERTIES)

View File

@ -30,7 +30,7 @@ include MakeBase.gmk
include CopyFiles.gmk include CopyFiles.gmk
########################################################################################## ################################################################################
### TZDB tool needs files from java.time.zone package ### TZDB tool needs files from java.time.zone package
@ -41,12 +41,13 @@ define tzdb_copyfiles
< $(<) > $@ < $(<) > $@
endef endef
$(eval $(call SetupCopyFiles,COPY_INTERIM_TZDB, \ $(eval $(call SetupCopyFiles, COPY_INTERIM_TZDB, \
SRC := $(TOPDIR)/src/java.base/share/classes/java/time/zone, \ SRC := $(TOPDIR)/src/java.base/share/classes/java/time/zone, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_tzdb_classes/build/tools/tzdb, \ DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_tzdb_classes/build/tools/tzdb, \
FILES := ZoneRules.java ZoneOffsetTransition.java ZoneOffsetTransitionRule.java Ser.java, \ FILES := ZoneRules.java ZoneOffsetTransition.java ZoneOffsetTransitionRule.java Ser.java, \
MACRO := tzdb_copyfiles)) MACRO := tzdb_copyfiles, \
))
########################################################################################## ################################################################################
all: $(COPY_INTERIM_TZDB) all: $(COPY_INTERIM_TZDB)

View File

@ -247,7 +247,7 @@ define create_overview_file
<!DOCTYPE html> \ <!DOCTYPE html> \
<html><head></head><body> \ <html><head></head><body> \
# #
ifneq ($$($1_GROUPS),) ifneq ($$($1_GROUPS), )
$1_OVERVIEW_TEXT += \ $1_OVERVIEW_TEXT += \
<p>This document is divided into \ <p>This document is divided into \
$$(subst 2,two,$$(subst 3,three,$$(words $$($1_GROUPS)))) sections:</p> \ $$(subst 2,two,$$(subst 3,three,$$(words $$($1_GROUPS)))) sections:</p> \

View File

@ -28,7 +28,7 @@
### ###
# Helper macro to allow $(info) to properly print strings beginning with spaces. # Helper macro to allow $(info) to properly print strings beginning with spaces.
_:= _ :=
help: help:
$(info ) $(info )
@ -108,7 +108,7 @@ help:
$(info $(_) TEST_OPTS="OPT1=x;..." # Generic control of all test harnesses) $(info $(_) TEST_OPTS="OPT1=x;..." # Generic control of all test harnesses)
$(info $(_) TEST_VM_OPTS="ARG ..." # Same as setting TEST_OPTS to VM_OPTIONS="ARG ...") $(info $(_) TEST_VM_OPTS="ARG ..." # Same as setting TEST_OPTS to VM_OPTIONS="ARG ...")
$(info ) $(info )
$(if $(all_confs), $(info Available configurations in $(build_dir):) $(foreach var,$(all_confs),$(info * $(var))),\ $(if $(all_confs), $(info Available configurations in $(build_dir):) $(foreach var,$(all_confs),$(info * $(var))), \
$(info No configurations were found in $(build_dir).) $(info Run 'bash configure' to create a configuration.)) $(info No configurations were found in $(build_dir).) $(info Run 'bash configure' to create a configuration.))
# We need a dummy rule otherwise make will complain # We need a dummy rule otherwise make will complain
@true @true

View File

@ -134,11 +134,11 @@ CDS_DUMP_FLAGS = -Xmx128M -Xms128M
# Param1 - VM variant (e.g., server, client, zero, ...) # Param1 - VM variant (e.g., server, client, zero, ...)
# Param2 - _nocoops, or empty # Param2 - _nocoops, or empty
define CreateCDSArchive define CreateCDSArchive
$1_$2_DUMP_EXTRA_ARG := $(if $(filter _nocoops, $2),-XX:-UseCompressedOops,) $1_$2_DUMP_EXTRA_ARG := $(if $(filter _nocoops, $2), -XX:-UseCompressedOops, )
$1_$2_DUMP_TYPE := $(if $(filter _nocoops, $2),-NOCOOPS,) $1_$2_DUMP_TYPE := $(if $(filter _nocoops, $2), -NOCOOPS, )
# Only G1 supports dumping the shared heap, so explicitly use G1 if the JVM supports it. # Only G1 supports dumping the shared heap, so explicitly use G1 if the JVM supports it.
$1_$2_CDS_DUMP_FLAGS := $(CDS_DUMP_FLAGS) $(if $(filter g1gc, $(JVM_FEATURES_$1)),-XX:+UseG1GC) $1_$2_CDS_DUMP_FLAGS := $(CDS_DUMP_FLAGS) $(if $(filter g1gc, $(JVM_FEATURES_$1)), -XX:+UseG1GC)
ifeq ($(OPENJDK_TARGET_OS), windows) ifeq ($(OPENJDK_TARGET_OS), windows)
$1_$2_CDS_ARCHIVE := bin/$1/classes$2.jsa $1_$2_CDS_ARCHIVE := bin/$1/classes$2.jsa
@ -235,7 +235,7 @@ endif
ifeq ($(GCOV_ENABLED), true) ifeq ($(GCOV_ENABLED), true)
$(eval $(call SetupCopyFiles,COPY_GCOV_GCNO, \ $(eval $(call SetupCopyFiles, COPY_GCOV_GCNO, \
SRC := $(OUTPUTDIR), \ SRC := $(OUTPUTDIR), \
DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \ DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \
FILES := $(call FindFiles, $(HOTSPOT_OUTPUTDIR) \ FILES := $(call FindFiles, $(HOTSPOT_OUTPUTDIR) \

View File

@ -37,7 +37,7 @@ default:
# serially, regardless of -j. # serially, regardless of -j.
.NOTPARALLEL: .NOTPARALLEL:
ifeq ($(HAS_SPEC),) ifeq ($(HAS_SPEC), )
############################################################################## ##############################################################################
# This is the default mode. We have not been recursively called with a SPEC. # This is the default mode. We have not been recursively called with a SPEC.
############################################################################## ##############################################################################
@ -168,7 +168,7 @@ ifeq ($(HAS_SPEC),)
endif endif
make-info: make-info:
ifneq ($(findstring $(LOG_LEVEL),info debug trace),) ifneq ($(findstring $(LOG_LEVEL), info debug trace), )
$(info Running make as '$(strip $(MAKE) $(MFLAGS) \ $(info Running make as '$(strip $(MAKE) $(MFLAGS) \
$(COMMAND_LINE_VARIABLES) $(MAKECMDGOALS))') $(COMMAND_LINE_VARIABLES) $(MAKECMDGOALS))')
endif endif

View File

@ -32,7 +32,7 @@
ifndef _INITSUPPORT_GMK ifndef _INITSUPPORT_GMK
_INITSUPPORT_GMK := 1 _INITSUPPORT_GMK := 1
ifeq ($(HAS_SPEC),) ifeq ($(HAS_SPEC), )
# COMMA is defined in spec.gmk, but that is not included yet # COMMA is defined in spec.gmk, but that is not included yet
COMMA := , COMMA := ,
@ -74,13 +74,13 @@ ifeq ($(HAS_SPEC),)
# Setup information about available configurations, if any. # Setup information about available configurations, if any.
ifneq ($(CUSTOM_ROOT), ) ifneq ($(CUSTOM_ROOT), )
build_dir=$(CUSTOM_ROOT)/build build_dir = $(CUSTOM_ROOT)/build
else else
build_dir=$(topdir)/build build_dir = $(topdir)/build
endif endif
all_spec_files=$(wildcard $(build_dir)/*/spec.gmk) all_spec_files = $(wildcard $(build_dir)/*/spec.gmk)
# Extract the configuration names from the path # Extract the configuration names from the path
all_confs=$(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files))) all_confs = $(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files)))
# Check for unknown command-line variables # Check for unknown command-line variables
define CheckControlVariables define CheckControlVariables
@ -128,7 +128,7 @@ ifeq ($(HAS_SPEC),)
ifeq ($$(CONF_CHECK), ) ifeq ($$(CONF_CHECK), )
# Default behavior is fail # Default behavior is fail
CONF_CHECK := fail CONF_CHECK := fail
else ifneq ($$(filter-out auto fail ignore, $$(CONF_CHECK)),) else ifneq ($$(filter-out auto fail ignore, $$(CONF_CHECK)), )
$$(info Error: CONF_CHECK must be one of: auto, fail or ignore.) $$(info Error: CONF_CHECK must be one of: auto, fail or ignore.)
$$(error Cannot continue) $$(error Cannot continue)
endif endif
@ -147,11 +147,11 @@ ifeq ($(HAS_SPEC),)
$$(info Error: Cannot use CONF_NAME=$$(CONF_NAME) and SPEC=$$(SPEC) at the same time. Choose one.) $$(info Error: Cannot use CONF_NAME=$$(CONF_NAME) and SPEC=$$(SPEC) at the same time. Choose one.)
$$(error Cannot continue) $$(error Cannot continue)
endif endif
ifeq ($$(wildcard $$(SPEC)),) ifeq ($$(wildcard $$(SPEC)), )
$$(info Error: Cannot locate spec.gmk, given by SPEC=$$(SPEC).) $$(info Error: Cannot locate spec.gmk, given by SPEC=$$(SPEC).)
$$(error Cannot continue) $$(error Cannot continue)
endif endif
ifeq ($$(filter /%, $$(SPEC)),) ifeq ($$(filter /%, $$(SPEC)), )
# If given with relative path, make it absolute # If given with relative path, make it absolute
SPECS := $$(CURDIR)/$$(strip $$(SPEC)) SPECS := $$(CURDIR)/$$(strip $$(SPEC))
else else
@ -162,7 +162,7 @@ ifeq ($(HAS_SPEC),)
override SPEC := override SPEC :=
else else
# Use spec.gmk files in the build output directory # Use spec.gmk files in the build output directory
ifeq ($$(all_spec_files),) ifeq ($$(all_spec_files), )
ifneq ($(CUSTOM_ROOT), ) ifneq ($(CUSTOM_ROOT), )
$$(info Error: No configurations found for $$(CUSTOM_ROOT).) $$(info Error: No configurations found for $$(CUSTOM_ROOT).)
else else
@ -180,7 +180,7 @@ ifeq ($(HAS_SPEC),)
$$(error Cannot continue) $$(error Cannot continue)
endif endif
matching_conf := $$(strip $$(filter $$(CONF_NAME), $$(all_confs))) matching_conf := $$(strip $$(filter $$(CONF_NAME), $$(all_confs)))
ifeq ($$(matching_conf),) ifeq ($$(matching_conf), )
$$(info Error: No configurations found matching CONF_NAME=$$(CONF_NAME).) $$(info Error: No configurations found matching CONF_NAME=$$(CONF_NAME).)
$$(info Available configurations in $$(build_dir):) $$(info Available configurations in $$(build_dir):)
$$(foreach var, $$(all_confs), $$(info * $$(var))) $$(foreach var, $$(all_confs), $$(info * $$(var)))
@ -197,12 +197,12 @@ ifeq ($(HAS_SPEC),)
SPECS := $$(build_dir)/$$(matching_conf)/spec.gmk SPECS := $$(build_dir)/$$(matching_conf)/spec.gmk
else ifneq ($$(origin CONF), undefined) else ifneq ($$(origin CONF), undefined)
# User have given a CONF= argument. # User have given a CONF= argument.
ifeq ($$(CONF),) ifeq ($$(CONF), )
# If given CONF=, match all configurations # If given CONF=, match all configurations
matching_confs := $$(strip $$(all_confs)) matching_confs := $$(strip $$(all_confs))
else else
# Otherwise select those that contain the given CONF string # Otherwise select those that contain the given CONF string
ifeq ($$(patsubst !%,,$$(CONF)),) ifeq ($$(patsubst !%,,$$(CONF)), )
# A CONF starting with ! means we should negate the search term # A CONF starting with ! means we should negate the search term
matching_confs := $$(strip $$(foreach var, $$(all_confs), \ matching_confs := $$(strip $$(foreach var, $$(all_confs), \
$$(if $$(findstring $$(subst !,,$$(CONF)), $$(var)), ,$$(var)))) $$(if $$(findstring $$(subst !,,$$(CONF)), $$(var)), ,$$(var))))
@ -215,12 +215,12 @@ ifeq ($(HAS_SPEC),)
matching_confs := $$(CONF) matching_confs := $$(CONF)
# Don't repeat this output on make restarts caused by including # Don't repeat this output on make restarts caused by including
# generated files. # generated files.
ifeq ($$(MAKE_RESTARTS),) ifeq ($$(MAKE_RESTARTS), )
$$(info Using exact match for CONF=$$(CONF) (other matches are possible)) $$(info Using exact match for CONF=$$(CONF) (other matches are possible))
endif endif
endif endif
endif endif
ifeq ($$(matching_confs),) ifeq ($$(matching_confs), )
$$(info Error: No configurations found matching CONF=$$(CONF).) $$(info Error: No configurations found matching CONF=$$(CONF).)
$$(info Available configurations in $$(build_dir):) $$(info Available configurations in $$(build_dir):)
$$(foreach var, $$(all_confs), $$(info * $$(var))) $$(foreach var, $$(all_confs), $$(info * $$(var)))
@ -228,9 +228,9 @@ ifeq ($(HAS_SPEC),)
else else
# Don't repeat this output on make restarts caused by including # Don't repeat this output on make restarts caused by including
# generated files. # generated files.
ifeq ($$(MAKE_RESTARTS),) ifeq ($$(MAKE_RESTARTS), )
ifeq ($$(words $$(matching_confs)), 1) ifeq ($$(words $$(matching_confs)), 1)
ifneq ($$(findstring $$(LOG_LEVEL), info debug trace),) ifneq ($$(findstring $$(LOG_LEVEL), info debug trace), )
$$(info Building configuration '$$(matching_confs)' (matching CONF=$$(CONF))) $$(info Building configuration '$$(matching_confs)' (matching CONF=$$(CONF)))
endif endif
else else
@ -272,7 +272,7 @@ ifeq ($(HAS_SPEC),)
# count. # count.
main_targets_file := $$(dir $(strip $2))make-support/main-targets.gmk main_targets_file := $$(dir $(strip $2))make-support/main-targets.gmk
ifeq ($$(MAKE_RESTARTS),) ifeq ($$(MAKE_RESTARTS), )
# Only do this if make has not been restarted, and if we do not force it. # Only do this if make has not been restarted, and if we do not force it.
ifeq ($(strip $1), FORCE) ifeq ($(strip $1), FORCE)
$$(shell rm -f $$(main_targets_file)) $$(shell rm -f $$(main_targets_file))
@ -316,9 +316,9 @@ else # $(HAS_SPEC)=true
BUILD_LOG_PIPE_SIMPLE := | $(TEE) -a $(BUILD_LOG) BUILD_LOG_PIPE_SIMPLE := | $(TEE) -a $(BUILD_LOG)
ifneq ($(CUSTOM_ROOT), ) ifneq ($(CUSTOM_ROOT), )
topdir=$(CUSTOM_ROOT) topdir = $(CUSTOM_ROOT)
else else
topdir=$(TOPDIR) topdir = $(TOPDIR)
endif endif
# Setup the build environment to match the requested specification on # Setup the build environment to match the requested specification on
@ -349,39 +349,39 @@ else # $(HAS_SPEC)=true
ifneq ($$(findstring :, $$(COMPARE_BUILD)), ) ifneq ($$(findstring :, $$(COMPARE_BUILD)), )
$$(foreach part, $$(subst :, , $$(COMPARE_BUILD)), \ $$(foreach part, $$(subst :, , $$(COMPARE_BUILD)), \
$$(if $$(filter PATCH=%, $$(part)), \ $$(if $$(filter PATCH=%, $$(part)), \
$$(eval COMPARE_BUILD_PATCH=$$(strip $$(patsubst PATCH=%, %, $$(part)))) \ $$(eval COMPARE_BUILD_PATCH = $$(strip $$(patsubst PATCH=%, %, $$(part)))) \
) \ ) \
$$(if $$(filter CONF=%, $$(part)), \ $$(if $$(filter CONF=%, $$(part)), \
$$(eval COMPARE_BUILD_CONF=$$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(part))))) \ $$(eval COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(part))))) \
) \ ) \
$$(if $$(filter MAKE=%, $$(part)), \ $$(if $$(filter MAKE=%, $$(part)), \
$$(eval COMPARE_BUILD_MAKE=$$(strip $$(subst +, , $$(patsubst MAKE=%, %, $$(part))))) \ $$(eval COMPARE_BUILD_MAKE = $$(strip $$(subst +, , $$(patsubst MAKE=%, %, $$(part))))) \
) \ ) \
$$(if $$(filter COMP_OPTS=%, $$(part)), \ $$(if $$(filter COMP_OPTS=%, $$(part)), \
$$(eval COMPARE_BUILD_COMP_OPTS=$$(strip $$(subst +, , $$(patsubst COMP_OPTS=%, %, $$(part))))) \ $$(eval COMPARE_BUILD_COMP_OPTS = $$(strip $$(subst +, , $$(patsubst COMP_OPTS=%, %, $$(part))))) \
) \ ) \
$$(if $$(filter COMP_DIR=%, $$(part)), \ $$(if $$(filter COMP_DIR=%, $$(part)), \
$$(eval COMPARE_BUILD_COMP_DIR=$$(strip $$(subst +, , $$(patsubst COMP_DIR=%, %, $$(part))))) \ $$(eval COMPARE_BUILD_COMP_DIR = $$(strip $$(subst +, , $$(patsubst COMP_DIR=%, %, $$(part))))) \
) \ ) \
$$(if $$(filter FAIL=%, $$(part)), \ $$(if $$(filter FAIL=%, $$(part)), \
$$(eval COMPARE_BUILD_FAIL=$$(strip $$(subst +, , $$(patsubst FAIL=%, %, $$(part))))) \ $$(eval COMPARE_BUILD_FAIL = $$(strip $$(subst +, , $$(patsubst FAIL=%, %, $$(part))))) \
) \ ) \
$$(if $$(filter NODRYRUN=%, $$(part)), \ $$(if $$(filter NODRYRUN=%, $$(part)), \
$$(eval COMPARE_BUILD_NODRYRUN=$$(strip $$(subst +, , $$(patsubst NODRYRUN=%, %, $$(part))))) \ $$(eval COMPARE_BUILD_NODRYRUN = $$(strip $$(subst +, , $$(patsubst NODRYRUN=%, %, $$(part))))) \
) \ ) \
) )
else else
# Separate handling for single field case, to allow for spaces in values. # Separate handling for single field case, to allow for spaces in values.
ifneq ($$(filter PATCH=%, $$(COMPARE_BUILD)), ) ifneq ($$(filter PATCH=%, $$(COMPARE_BUILD)), )
COMPARE_BUILD_PATCH=$$(strip $$(patsubst PATCH=%, %, $$(COMPARE_BUILD))) COMPARE_BUILD_PATCH = $$(strip $$(patsubst PATCH=%, %, $$(COMPARE_BUILD)))
else ifneq ($$(filter CONF=%, $$(COMPARE_BUILD)), ) else ifneq ($$(filter CONF=%, $$(COMPARE_BUILD)), )
COMPARE_BUILD_CONF=$$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(COMPARE_BUILD)))) COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(COMPARE_BUILD))))
else ifneq ($$(filter --%, $$(COMPARE_BUILD)), ) else ifneq ($$(filter --%, $$(COMPARE_BUILD)), )
# Assume CONF if value begins with -- # Assume CONF if value begins with --
COMPARE_BUILD_CONF=$$(strip $$(subst +, , $$(COMPARE_BUILD))) COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(COMPARE_BUILD)))
else else
# Otherwise assume patch file # Otherwise assume patch file
COMPARE_BUILD_PATCH=$$(strip $$(COMPARE_BUILD)) COMPARE_BUILD_PATCH = $$(strip $$(COMPARE_BUILD))
endif endif
endif endif
ifneq ($$(COMPARE_BUILD_PATCH), ) ifneq ($$(COMPARE_BUILD_PATCH), )
@ -531,7 +531,7 @@ else # $(HAS_SPEC)=true
# used by build comparisons. # used by build comparisons.
define WaitForJavacServerFinish define WaitForJavacServerFinish
$(if $(JAVAC_SERVER_DIR), \ $(if $(JAVAC_SERVER_DIR), \
sleep 5\ sleep 5 \
) )
endef endef
else else
@ -544,7 +544,7 @@ else # $(HAS_SPEC)=true
############################################################################## ##############################################################################
# Store the build times in this directory. # Store the build times in this directory.
BUILDTIMESDIR=$(OUTPUTDIR)/make-support/build-times BUILDTIMESDIR = $(OUTPUTDIR)/make-support/build-times
# Record starting time for build of a sub repository. # Record starting time for build of a sub repository.
define RecordStartTime define RecordStartTime
@ -605,7 +605,7 @@ endif # HAS_SPEC
# $1: The option to look for # $1: The option to look for
# $2: The variable to set to "true" if the option is found # $2: The variable to set to "true" if the option is found
define ParseLogOption define ParseLogOption
ifneq ($$(findstring $1, $$(LOG)),) ifneq ($$(findstring $1, $$(LOG)), )
override $2 := true override $2 := true
# First try to remove ",<option>" if it exists, otherwise just remove "<option>" # First try to remove ",<option>" if it exists, otherwise just remove "<option>"
LOG_STRIPPED := $$(subst $1,, $$(subst $$(COMMA)$$(strip $1),, $$(LOG))) LOG_STRIPPED := $$(subst $1,, $$(subst $$(COMMA)$$(strip $1),, $$(LOG)))
@ -620,7 +620,7 @@ endef
# $1: The option to look for # $1: The option to look for
# $2: The variable to set to the value of the option, if found # $2: The variable to set to the value of the option, if found
define ParseLogValue define ParseLogValue
ifneq ($$(findstring $1=, $$(LOG)),) ifneq ($$(findstring $1=, $$(LOG)), )
# Make words of out comma-separated list and find the one with opt=val # Make words of out comma-separated list and find the one with opt=val
value := $$(strip $$(subst $$(strip $1)=,, $$(filter $$(strip $1)=%, $$(subst $$(COMMA), , $$(LOG))))) value := $$(strip $$(subst $$(strip $1)=,, $$(filter $$(strip $1)=%, $$(subst $$(COMMA), , $$(LOG)))))
override $2 := $$(value) override $2 := $$(value)
@ -673,7 +673,7 @@ define ParseLogLevel
override LOG_LEVEL := $$(LOG) override LOG_LEVEL := $$(LOG)
ifeq ($$(LOG_LEVEL),) ifeq ($$(LOG_LEVEL), )
# Set LOG to "warn" as default if not set # Set LOG to "warn" as default if not set
override LOG_LEVEL := warn override LOG_LEVEL := warn
endif endif

View File

@ -67,7 +67,8 @@ $(eval $(call SetupJavaCompilation, BUILD_JRTFS, \
$(eval $(call SetupCopyFiles, COPY_JIMAGE_SERVICE_PROVIDER, \ $(eval $(call SetupCopyFiles, COPY_JIMAGE_SERVICE_PROVIDER, \
SRC := $(TOPDIR)/src/java.base/share/classes, \ SRC := $(TOPDIR)/src/java.base/share/classes, \
DEST := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \ DEST := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \
FILES := META-INF/services/java.nio.file.spi.FileSystemProvider)) FILES := META-INF/services/java.nio.file.spi.FileSystemProvider, \
))
$(eval $(call SetupJarArchive, BUILD_JRTFS_JAR, \ $(eval $(call SetupJarArchive, BUILD_JRTFS_JAR, \
DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER), \ DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER), \

View File

@ -31,7 +31,7 @@
# Declare default target # Declare default target
default: default:
ifeq ($(wildcard $(SPEC)),) ifeq ($(wildcard $(SPEC)), )
$(error Main.gmk needs SPEC set to a proper spec.gmk) $(error Main.gmk needs SPEC set to a proper spec.gmk)
endif endif
@ -1414,7 +1414,7 @@ dist-clean: clean
($(CD) $(OUTPUTDIR) && \ ($(CD) $(OUTPUTDIR) && \
$(RM) -r *spec.gmk $(CONFIGURESUPPORT_OUTPUTDIR) Makefile compare.sh ide \ $(RM) -r *spec.gmk $(CONFIGURESUPPORT_OUTPUTDIR) Makefile compare.sh ide \
configure.log* build.log*) configure.log* build.log*)
$(if $(filter $(CONF_NAME),$(notdir $(OUTPUTDIR))), \ $(if $(filter $(CONF_NAME), $(notdir $(OUTPUTDIR))), \
if test "x`$(LS) $(OUTPUTDIR)`" != x; then \ if test "x`$(LS) $(OUTPUTDIR)`" != x; then \
$(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \ $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
else \ else \

View File

@ -175,7 +175,7 @@ define DeclareRecipesForPhaseAndModule
$$(foreach d, $$($1_$2_TOPDIRS), \ $$(foreach d, $$($1_$2_TOPDIRS), \
$$(eval $1 += $2-$$($1_TARGET_SUFFIX)-$$(notdir $$d))) $$(eval $1 += $2-$$($1_TARGET_SUFFIX)-$$(notdir $$d)))
endif endif
ifeq ($(NO_RECIPES),) ifeq ($(NO_RECIPES), )
$$(eval $$(call DeclareRecipeForModuleMakefile,$1,$2)) $$(eval $$(call DeclareRecipeForModuleMakefile,$1,$2))
endif endif
$1 += $2-$$($1_TARGET_SUFFIX) $1 += $2-$$($1_TARGET_SUFFIX)
@ -197,8 +197,8 @@ endef
# $1_MODULES : All modules that had rules generated # $1_MODULES : All modules that had rules generated
# $1_TARGETS : All targets generated # $1_TARGETS : All targets generated
define DeclareRecipesForPhase define DeclareRecipesForPhase
$(foreach i,2 3 4 5 6 7 8, $(if $(strip $($i)),$(strip $1)_$(strip $($i)))$(NEWLINE)) $(foreach i, 2 3 4 5 6 7 8, $(if $(strip $($i)),$(strip $1)_$(strip $($i)))$(NEWLINE))
$(if $(9),$(error Internal makefile error: Too many arguments to \ $(if $(9), $(error Internal makefile error: Too many arguments to \
DeclareRecipesForPhase, please update MakeHelper.gmk)) DeclareRecipesForPhase, please update MakeHelper.gmk))
$$(foreach m, $$($(strip $1)_CHECK_MODULES), \ $$(foreach m, $$($(strip $1)_CHECK_MODULES), \

View File

@ -104,7 +104,8 @@ ifneq ($(wildcard $(JTREG_FAILURE_HANDLER)), )
-observerDir:$(JTREG_FAILURE_HANDLER) \ -observerDir:$(JTREG_FAILURE_HANDLER) \
-timeoutHandler:jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler \ -timeoutHandler:jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler \
-observer:jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserver \ -observer:jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserver \
-timeoutHandlerTimeout:$(JTREG_FAILURE_HANDLER_TIMEOUT) -timeoutHandlerTimeout:$(JTREG_FAILURE_HANDLER_TIMEOUT) \
#
endif endif
GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher, %, \ GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher, %, \
@ -500,7 +501,7 @@ define SetupRunGtestTestBody
endif endif
ifneq ($$(GTEST_REPEAT), ) ifneq ($$(GTEST_REPEAT), )
$1_GTEST_REPEAT :=--gtest_repeat=$$(GTEST_REPEAT) $1_GTEST_REPEAT := --gtest_repeat=$$(GTEST_REPEAT)
endif endif
run-test-$1: pre-run-test run-test-$1: pre-run-test

View File

@ -34,7 +34,7 @@ ifneq ($(findstring :, $(MAKE)), )
endif endif
# Locate this Makefile # Locate this Makefile
ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),) ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))), )
makefile_path := $(CURDIR)/$(strip $(lastword $(MAKEFILE_LIST))) makefile_path := $(CURDIR)/$(strip $(lastword $(MAKEFILE_LIST)))
else else
makefile_path := $(lastword $(MAKEFILE_LIST)) makefile_path := $(lastword $(MAKEFILE_LIST))
@ -67,7 +67,7 @@ define SetupVariable
ifneq ($$(findstring $$(LOG), info debug trace), ) ifneq ($$(findstring $$(LOG), info debug trace), )
$$(info Prebuilt variable $1=$2 (default value)) $$(info Prebuilt variable $1=$2 (default value))
endif endif
$1:=$2 $1 := $2
endif endif
else else
ifneq ($$(findstring $$(LOG), info debug trace), ) ifneq ($$(findstring $$(LOG), info debug trace), )
@ -163,7 +163,7 @@ else ifeq ($(UNAME_OS), MINGW64)
OPENJDK_TARGET_OS_TYPE := windows OPENJDK_TARGET_OS_TYPE := windows
OPENJDK_TARGET_OS_ENV := windows.msys2 OPENJDK_TARGET_OS_ENV := windows.msys2
else else
OPENJDK_TARGET_OS_TYPE:=unix OPENJDK_TARGET_OS_TYPE := unix
ifeq ($(UNAME_OS), Linux) ifeq ($(UNAME_OS), Linux)
OPENJDK_TARGET_OS := linux OPENJDK_TARGET_OS := linux
else ifeq ($(UNAME_OS), Darwin) else ifeq ($(UNAME_OS), Darwin)

View File

@ -70,9 +70,9 @@ BUILD_JAVA_FLAGS := $(JAVA_FLAGS_BIG)
################################################################################ ################################################################################
# Hard-coded values copied from spec.gmk.in. # Hard-coded values copied from spec.gmk.in.
X:= X :=
SPACE:=$(X) $(X) SPACE := $(X) $(X)
COMMA:=, COMMA := ,
MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \ MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" LOG_LEVEL=$(LOG_LEVEL) MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" LOG_LEVEL=$(LOG_LEVEL)
BASH_ARGS := -o pipefail -e BASH_ARGS := -o pipefail -e

View File

@ -64,7 +64,7 @@ ifeq ($(USE_SCM), true)
# Verify that the entire forest is consistent # Verify that the entire forest is consistent
$(foreach repo, $(call FindAllReposRel), \ $(foreach repo, $(call FindAllReposRel), \
$(if $(wildcard $(TOPDIR)/$(repo)/$(SCM_DIR)),, \ $(if $(wildcard $(TOPDIR)/$(repo)/$(SCM_DIR)), , \
$(error Inconsistent revision control: $(repo) is missing $(SCM_DIR) directory)) \ $(error Inconsistent revision control: $(repo) is missing $(SCM_DIR) directory)) \
) )
@ -72,7 +72,7 @@ ifeq ($(USE_SCM), true)
MakeFilenameFromRepo = \ MakeFilenameFromRepo = \
$(strip $(subst .,top, $(subst /,-, $1))) $(strip $(subst .,top, $(subst /,-, $1)))
################################################################################ ##############################################################################
# SetupGetRevisionForRepo defines a make rule for creating a file containing # SetupGetRevisionForRepo defines a make rule for creating a file containing
# the name of the repository and the output of the scm command for that # the name of the repository and the output of the scm command for that
# repository. # repository.

View File

@ -41,9 +41,9 @@ ALL_MODULES = $(call FindAllModules)
TARGETS := TARGETS :=
ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), ) ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), )
IMAGE_DEST_DIR=$(STATIC_LIBS_IMAGE_DIR)/lib IMAGE_DEST_DIR = $(STATIC_LIBS_IMAGE_DIR)/lib
else ifneq ($(filter static-libs-graal-image, $(MAKECMDGOALS)), ) else ifneq ($(filter static-libs-graal-image, $(MAKECMDGOALS)), )
IMAGE_DEST_DIR=$(STATIC_LIBS_GRAAL_IMAGE_DIR)/lib IMAGE_DEST_DIR = $(STATIC_LIBS_GRAAL_IMAGE_DIR)/lib
endif endif
# Copy JDK static libs to the image. # Copy JDK static libs to the image.

View File

@ -31,7 +31,7 @@ include MakeBase.gmk
# Hook to include the corresponding custom file, if present. # Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, TestImage-pre.gmk)) $(eval $(call IncludeCustomExtension, TestImage-pre.gmk))
############################################################################ ################################################################################
BUILD_INFO_PROPERTIES := $(TEST_IMAGE_DIR)/build-info.properties BUILD_INFO_PROPERTIES := $(TEST_IMAGE_DIR)/build-info.properties

View File

@ -42,6 +42,6 @@ BUILD_TOOLS_HOTSPOT := $(call SetupJavaCompilationCompileTarget, \
TOOL_JFR_GEN := $(JAVA_SMALL) -cp $(HOTSPOT_TOOLS_OUTPUTDIR) \ TOOL_JFR_GEN := $(JAVA_SMALL) -cp $(HOTSPOT_TOOLS_OUTPUTDIR) \
build.tools.jfr.GenerateJfrFiles build.tools.jfr.GenerateJfrFiles
########################################################################################## ################################################################################
endif # _TOOLS_HOTSPOT_GMK endif # _TOOLS_HOTSPOT_GMK

View File

@ -128,14 +128,14 @@ TOOL_PUBLICSUFFIXLIST = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_clas
TOOL_FIXUPPANDOC = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \ TOOL_FIXUPPANDOC = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.fixuppandoc.Main build.tools.fixuppandoc.Main
########################################################################################## ################################################################################
# Executable javascript filter for man page generation using pandoc. # Executable javascript filter for man page generation using pandoc.
PANDOC_TROFF_MANPAGE_FILTER := $(BUILDTOOLS_OUTPUTDIR)/manpages/pandoc-troff-manpage-filter PANDOC_TROFF_MANPAGE_FILTER := $(BUILDTOOLS_OUTPUTDIR)/manpages/pandoc-troff-manpage-filter
PANDOC_HTML_MANPAGE_FILTER := $(BUILDTOOLS_OUTPUTDIR)/manpages/pandoc-html-manpage-filter PANDOC_HTML_MANPAGE_FILTER := $(BUILDTOOLS_OUTPUTDIR)/manpages/pandoc-html-manpage-filter
########################################################################################## ################################################################################
# Hook to include the corresponding custom post file, if present. # Hook to include the corresponding custom post file, if present.
$(eval $(call IncludeCustomExtension, ToolsJdk-post.gmk)) $(eval $(call IncludeCustomExtension, ToolsJdk-post.gmk))

View File

@ -29,11 +29,11 @@ include $(SPEC)
include MakeBase.gmk include MakeBase.gmk
include JavaCompilation.gmk include JavaCompilation.gmk
########################################################################################## ################################################################################
# #
# sec-bin.zip is used by builds where the corresponding sources are not available # sec-bin.zip is used by builds where the corresponding sources are not available
# #
$(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP, \ $(eval $(call SetupZipArchive, BUILD_SEC_BIN_ZIP, \
SRC := $(JDK_OUTPUTDIR), \ SRC := $(JDK_OUTPUTDIR), \
INCLUDES := \ INCLUDES := \
modules/java.base/javax/crypto \ modules/java.base/javax/crypto \
@ -60,20 +60,22 @@ $(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP, \
modules/java.security.jgss/sun/security/krb5/internal/util, \ modules/java.security.jgss/sun/security/krb5/internal/util, \
INCLUDE_FILES := modules/java.security.jgss/sun/security/jgss/spi/GSSContextSpi.class, \ INCLUDE_FILES := modules/java.security.jgss/sun/security/jgss/spi/GSSContextSpi.class, \
EXCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \ EXCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \
ZIP := $(IMAGES_OUTPUTDIR)/sec-bin.zip)) ZIP := $(IMAGES_OUTPUTDIR)/sec-bin.zip, \
))
TARGETS += $(IMAGES_OUTPUTDIR)/sec-bin.zip TARGETS += $(IMAGES_OUTPUTDIR)/sec-bin.zip
########################################################################################## ################################################################################
# #
# Windows specific binary security packages. # Windows specific binary security packages.
# #
ifeq ($(call isTargetOs, windows), true) ifeq ($(call isTargetOs, windows), true)
# sec-windows-bin.zip is used by builds where the corresponding sources are not available # sec-windows-bin.zip is used by builds where the corresponding sources are not available
$(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP, \ $(eval $(call SetupZipArchive, BUILD_SEC_WINDOWS_BIN_ZIP, \
SRC := $(JDK_OUTPUTDIR), \ SRC := $(JDK_OUTPUTDIR), \
INCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \ INCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \
ZIP := $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip)) ZIP := $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip, \
))
TARGETS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip TARGETS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip
@ -84,18 +86,19 @@ ifeq ($(call isTargetOs, windows), true)
JGSS_ZIP_NAME = jgss-windows-i586-bin.zip JGSS_ZIP_NAME = jgss-windows-i586-bin.zip
endif endif
$(eval $(call SetupZipArchive,BUILD_JGSS_BIN_ZIP, \ $(eval $(call SetupZipArchive, BUILD_JGSS_BIN_ZIP, \
SRC := $(SUPPORT_OUTPUTDIR), \ SRC := $(SUPPORT_OUTPUTDIR), \
INCLUDE_FILES := modules_libs/java.security.jgss/w2k_lsa_auth.dll \ INCLUDE_FILES := modules_libs/java.security.jgss/w2k_lsa_auth.dll \
modules_libs/java.security.jgss/w2k_lsa_auth.dll.diz \ modules_libs/java.security.jgss/w2k_lsa_auth.dll.diz \
modules_libs/java.security.jgss/w2k_lsa_auth.dll.map \ modules_libs/java.security.jgss/w2k_lsa_auth.dll.map \
modules_libs/java.security.jgss/w2k_lsa_auth.dll.pdb, \ modules_libs/java.security.jgss/w2k_lsa_auth.dll.pdb, \
ZIP := $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME))) ZIP := $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME), \
))
TARGETS += $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME) TARGETS += $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)
endif endif
########################################################################################## ################################################################################
all: $(TARGETS) all: $(TARGETS)

View File

@ -23,5 +23,5 @@
# This Makefile was generated by configure @DATE_WHEN_CONFIGURED@ # This Makefile was generated by configure @DATE_WHEN_CONFIGURED@
# GENERATED FILE, DO NOT EDIT # GENERATED FILE, DO NOT EDIT
SPEC:=@OUTPUTDIR@/spec.gmk SPEC := @OUTPUTDIR@/spec.gmk
include @WORKSPACE_ROOT@/Makefile include @WORKSPACE_ROOT@/Makefile

View File

@ -26,7 +26,7 @@
m4_include([basic_tools.m4]) m4_include([basic_tools.m4])
m4_include([basic_windows.m4]) m4_include([basic_windows.m4])
############################################################################### ################################################################################
AC_DEFUN_ONCE([BASIC_INIT], AC_DEFUN_ONCE([BASIC_INIT],
[ [
# Save the original command line. This is passed to us by the wrapper configure script. # Save the original command line. This is passed to us by the wrapper configure script.
@ -46,7 +46,7 @@ AC_DEFUN_ONCE([BASIC_INIT],
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.]) AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
]) ])
############################################################################### ################################################################################
# Check that there are no unprocessed overridden variables left. # Check that there are no unprocessed overridden variables left.
# If so, they are an incorrect argument and we will exit with an error. # If so, they are an incorrect argument and we will exit with an error.
AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN], AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN],
@ -58,7 +58,7 @@ AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN],
fi fi
]) ])
############################################################################### ################################################################################
# Setup basic configuration paths, and platform-specific stuff related to PATHs. # Setup basic configuration paths, and platform-specific stuff related to PATHs.
# Make sure to only use tools set up in BASIC_SETUP_FUNDAMENTAL_TOOLS. # Make sure to only use tools set up in BASIC_SETUP_FUNDAMENTAL_TOOLS.
AC_DEFUN_ONCE([BASIC_SETUP_PATHS], AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
@ -102,7 +102,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
AUTOCONF_DIR=$TOPDIR/make/autoconf AUTOCONF_DIR=$TOPDIR/make/autoconf
]) ])
############################################################################### ################################################################################
# Setup what kind of build environment type we have (CI or local developer) # Setup what kind of build environment type we have (CI or local developer)
AC_DEFUN_ONCE([BASIC_SETUP_BUILD_ENV], AC_DEFUN_ONCE([BASIC_SETUP_BUILD_ENV],
[ [
@ -141,7 +141,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_BUILD_ENV],
AC_SUBST(LOCALE_USED) AC_SUBST(LOCALE_USED)
]) ])
############################################################################### ################################################################################
# Evaluates platform specific overrides for devkit variables. # Evaluates platform specific overrides for devkit variables.
# $1: Name of variable # $1: Name of variable
AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE], AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
@ -151,7 +151,7 @@ AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
fi fi
]) ])
############################################################################### ################################################################################
# Evaluates platform specific overrides for build devkit variables. # Evaluates platform specific overrides for build devkit variables.
# $1: Name of variable # $1: Name of variable
AC_DEFUN([BASIC_EVAL_BUILD_DEVKIT_VARIABLE], AC_DEFUN([BASIC_EVAL_BUILD_DEVKIT_VARIABLE],
@ -161,7 +161,7 @@ AC_DEFUN([BASIC_EVAL_BUILD_DEVKIT_VARIABLE],
fi fi
]) ])
############################################################################### ################################################################################
AC_DEFUN([BASIC_SETUP_XCODE_SYSROOT], AC_DEFUN([BASIC_SETUP_XCODE_SYSROOT],
[ [
AC_MSG_CHECKING([for sdk name]) AC_MSG_CHECKING([for sdk name])
@ -246,7 +246,7 @@ AC_DEFUN([BASIC_SETUP_XCODE_SYSROOT],
fi fi
]) ])
############################################################################### ################################################################################
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT], AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
[ [
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit], AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
@ -380,7 +380,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
AC_MSG_RESULT([$EXTRA_PATH]) AC_MSG_RESULT([$EXTRA_PATH])
]) ])
############################################################################### ################################################################################
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
[ [
@ -477,7 +477,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
AC_CONFIG_FILES([$OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.template]) AC_CONFIG_FILES([$OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.template])
]) ])
############################################################################### ################################################################################
# Check if build directory is on local disk. If not possible to determine, # Check if build directory is on local disk. If not possible to determine,
# we prefer to claim it's local. # we prefer to claim it's local.
# Argument 1: directory to test # Argument 1: directory to test
@ -514,7 +514,7 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
fi fi
]) ])
############################################################################### ################################################################################
# Check that source files have basic read permissions set. This might # Check that source files have basic read permissions set. This might
# not be the case in cygwin in certain conditions. # not be the case in cygwin in certain conditions.
AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS], AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
@ -529,7 +529,7 @@ AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
fi fi
]) ])
############################################################################### ################################################################################
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES], AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
[ [
AC_MSG_CHECKING([if build directory is on local disk]) AC_MSG_CHECKING([if build directory is on local disk])
@ -572,7 +572,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_MAKE_TARGET],
AC_SUBST(DEFAULT_MAKE_TARGET) AC_SUBST(DEFAULT_MAKE_TARGET)
]) ])
############################################################################### ################################################################################
# Setup the default value for LOG= # Setup the default value for LOG=
# #
AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_LOG], AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_LOG],
@ -591,7 +591,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_LOG],
AC_SUBST(DEFAULT_LOG) AC_SUBST(DEFAULT_LOG)
]) ])
############################################################################### ################################################################################
# Code to run after AC_OUTPUT # Code to run after AC_OUTPUT
AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT], AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT],
[ [

View File

@ -23,12 +23,12 @@
# questions. # questions.
# #
############################################################################### ################################################################################
# It is recommended to use exactly this version of pandoc, especially for # It is recommended to use exactly this version of pandoc, especially for
# re-generating checked in html files # re-generating checked in html files
RECOMMENDED_PANDOC_VERSION=2.19.2 RECOMMENDED_PANDOC_VERSION=2.19.2
############################################################################### ################################################################################
# Setup the most fundamental tools, used for setting up build platform and # Setup the most fundamental tools, used for setting up build platform and
# path handling. # path handling.
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS], AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
@ -59,7 +59,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32) UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
]) ])
############################################################################### ################################################################################
# Setup further tools that should be resolved early but after setting up # Setup further tools that should be resolved early but after setting up
# build platform and path handling. # build platform and path handling.
AC_DEFUN_ONCE([BASIC_SETUP_TOOLS], AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
@ -116,7 +116,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
RM="$RM -f" RM="$RM -f"
]) ])
############################################################################### ################################################################################
# Check if we have found a usable version of make # Check if we have found a usable version of make
# $1: the path to a potential make binary (or empty) # $1: the path to a potential make binary (or empty)
# $2: the description on how we found this # $2: the description on how we found this
@ -176,7 +176,7 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
fi fi
]) ])
############################################################################### ################################################################################
AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC], AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
[ [
# Check if make supports the output sync option and if so, setup using it. # Check if make supports the output sync option and if so, setup using it.
@ -201,7 +201,7 @@ AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
AC_SUBST(OUTPUT_SYNC) AC_SUBST(OUTPUT_SYNC)
]) ])
############################################################################### ################################################################################
# Goes looking for a usable version of GNU make. # Goes looking for a usable version of GNU make.
AC_DEFUN([BASIC_CHECK_GNU_MAKE], AC_DEFUN([BASIC_CHECK_GNU_MAKE],
[ [
@ -249,7 +249,7 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE],
BASIC_CHECK_MAKE_OUTPUT_SYNC BASIC_CHECK_MAKE_OUTPUT_SYNC
]) ])
############################################################################### ################################################################################
AC_DEFUN([BASIC_CHECK_FIND_DELETE], AC_DEFUN([BASIC_CHECK_FIND_DELETE],
[ [
# Test if find supports -delete # Test if find supports -delete
@ -278,7 +278,7 @@ AC_DEFUN([BASIC_CHECK_FIND_DELETE],
AC_SUBST(FIND_DELETE) AC_SUBST(FIND_DELETE)
]) ])
############################################################################### ################################################################################
AC_DEFUN([BASIC_CHECK_TAR], AC_DEFUN([BASIC_CHECK_TAR],
[ [
# Test which kind of tar was found # Test which kind of tar was found
@ -316,7 +316,7 @@ AC_DEFUN([BASIC_CHECK_TAR],
AC_SUBST(TAR_SUPPORTS_TRANSFORM) AC_SUBST(TAR_SUPPORTS_TRANSFORM)
]) ])
############################################################################### ################################################################################
AC_DEFUN([BASIC_CHECK_GREP], AC_DEFUN([BASIC_CHECK_GREP],
[ [
# Test that grep supports -Fx with a list of pattern which includes null pattern. # Test that grep supports -Fx with a list of pattern which includes null pattern.
@ -340,7 +340,7 @@ AC_DEFUN([BASIC_CHECK_GREP],
fi fi
]) ])
############################################################################### ################################################################################
AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS], AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
[ [
BASIC_CHECK_GNU_MAKE BASIC_CHECK_GNU_MAKE
@ -412,7 +412,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
fi fi
]) ])
############################################################################### ################################################################################
# Check for support for specific options in bash # Check for support for specific options in bash
AC_DEFUN_ONCE([BASIC_CHECK_BASH_OPTIONS], AC_DEFUN_ONCE([BASIC_CHECK_BASH_OPTIONS],
[ [

View File

@ -23,7 +23,7 @@
# questions. # questions.
# #
######################################################################## ################################################################################
# This file handles detection of the Boot JDK. The Boot JDK detection # This file handles detection of the Boot JDK. The Boot JDK detection
# process has been developed as a response to solve a complex real-world # process has been developed as a response to solve a complex real-world
# problem. Initially, it was simple, but it has grown as platform after # problem. Initially, it was simple, but it has grown as platform after
@ -49,7 +49,7 @@
# JDK, and if one is found, check if it is acceptable. If not, we print # JDK, and if one is found, check if it is acceptable. If not, we print
# our reasons for rejecting it (useful when debugging non-working # our reasons for rejecting it (useful when debugging non-working
# configure situations) and continue checking the next one. # configure situations) and continue checking the next one.
######################################################################## ################################################################################
# Execute the check given as argument, and verify the result # Execute the check given as argument, and verify the result
# If the Boot JDK was previously found, do nothing # If the Boot JDK was previously found, do nothing
@ -322,7 +322,7 @@ AC_DEFUN([BOOTJDK_SETUP_CLASSPATH],
AC_SUBST(CLASSPATH) AC_SUBST(CLASSPATH)
]) ])
############################################################################### ################################################################################
# #
# We need a Boot JDK to bootstrap the build. # We need a Boot JDK to bootstrap the build.
# #

View File

@ -34,10 +34,10 @@ include @SPEC@
BOOT_JDK := $(JDK_IMAGE_DIR) BOOT_JDK := $(JDK_IMAGE_DIR)
# The bootcycle build has a different output directory # The bootcycle build has a different output directory
OLD_OUTPUTDIR:=@OUTPUTDIR@ OLD_OUTPUTDIR := @OUTPUTDIR@
OUTPUTDIR:=$(OLD_OUTPUTDIR)/bootcycle-build OUTPUTDIR := $(OLD_OUTPUTDIR)/bootcycle-build
# No spaces in patsubst to avoid leading space in variable # No spaces in patsubst to avoid leading space in variable
JAVAC_SERVER_DIR:=$(patsubst $(OLD_OUTPUTDIR)%,$(OUTPUTDIR)%,$(JAVAC_SERVER_DIR)) JAVAC_SERVER_DIR := $(patsubst $(OLD_OUTPUTDIR)%,$(OUTPUTDIR)%,$(JAVAC_SERVER_DIR))
JAVA_CMD := $(FIXPATH) $(BOOT_JDK)/bin/java JAVA_CMD := $(FIXPATH) $(BOOT_JDK)/bin/java
JAVAC_CMD := $(FIXPATH) $(BOOT_JDK)/bin/javac JAVAC_CMD := $(FIXPATH) $(BOOT_JDK)/bin/javac
@ -48,4 +48,3 @@ JAVA_FLAGS_BIG := @BOOTCYCLE_JVM_ARGS_BIG@
# By filtering out those JVM args, the bootcycle JVM will use its default # By filtering out those JVM args, the bootcycle JVM will use its default
# settings for CDS. # settings for CDS.
JAVA_FLAGS := $(filter-out -XX:SharedArchiveFile% -Xshare%, $(JAVA_FLAGS)) JAVA_FLAGS := $(filter-out -XX:SharedArchiveFile% -Xshare%, $(JAVA_FLAGS))

View File

@ -26,7 +26,7 @@
# the root of the build directory. # the root of the build directory.
########################################################################################## ################################################################################
# Substitutions from autoconf # Substitutions from autoconf
export LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@ export LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@

View File

@ -23,11 +23,11 @@
# questions. # questions.
# #
############################################################################### ################################################################################
# #
# Includes and boilerplate # Includes and boilerplate
# #
############################################################################### ################################################################################
AC_PREREQ([2.69]) AC_PREREQ([2.69])
@ -63,14 +63,14 @@ m4_include([platform.m4])
m4_include([source-dirs.m4]) m4_include([source-dirs.m4])
m4_include([toolchain.m4]) m4_include([toolchain.m4])
############################################################################### ################################################################################
# #
# Initialization / Boot-strapping # Initialization / Boot-strapping
# #
# The bootstrapping process needs to solve the "chicken or the egg" problem, # The bootstrapping process needs to solve the "chicken or the egg" problem,
# thus it jumps back and forth, each time gaining something needed later on. # thus it jumps back and forth, each time gaining something needed later on.
# #
############################################################################### ################################################################################
# If we are requested to print additional help, do that and then exit. # If we are requested to print additional help, do that and then exit.
# This must be the very first call. # This must be the very first call.
@ -128,51 +128,51 @@ PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION
BASIC_SETUP_DEFAULT_MAKE_TARGET BASIC_SETUP_DEFAULT_MAKE_TARGET
BASIC_SETUP_DEFAULT_LOG BASIC_SETUP_DEFAULT_LOG
############################################################################### ################################################################################
# #
# Determine OpenJDK variants and version numbers. # Determine OpenJDK variants and version numbers.
# #
############################################################################### ################################################################################
# We need build & target for this. # We need build & target for this.
JDKOPT_SETUP_JMOD_OPTIONS JDKOPT_SETUP_JMOD_OPTIONS
JDKOPT_SETUP_JLINK_OPTIONS JDKOPT_SETUP_JLINK_OPTIONS
JDKVER_SETUP_JDK_VERSION_NUMBERS JDKVER_SETUP_JDK_VERSION_NUMBERS
############################################################################### ################################################################################
# #
# Setup BootJDK, used to bootstrap the build. # Setup BootJDK, used to bootstrap the build.
# #
############################################################################### ################################################################################
BOOTJDK_SETUP_BOOT_JDK BOOTJDK_SETUP_BOOT_JDK
BOOTJDK_SETUP_BUILD_JDK BOOTJDK_SETUP_BUILD_JDK
BOOTJDK_SETUP_DOCS_REFERENCE_JDK BOOTJDK_SETUP_DOCS_REFERENCE_JDK
############################################################################### ################################################################################
# #
# Determine JDK specific build time options. # Determine JDK specific build time options.
# #
############################################################################### ################################################################################
JDKOPT_SETUP_REPRODUCIBLE_BUILD JDKOPT_SETUP_REPRODUCIBLE_BUILD
JDKOPT_SETUP_JDK_OPTIONS JDKOPT_SETUP_JDK_OPTIONS
############################################################################### ################################################################################
# #
# Configure the sources to use. We can add or override individual directories. # Configure the sources to use. We can add or override individual directories.
# #
############################################################################### ################################################################################
SRCDIRS_SETUP_DIRS SRCDIRS_SETUP_DIRS
SRCDIRS_SETUP_IMPORT_MODULES SRCDIRS_SETUP_IMPORT_MODULES
############################################################################### ################################################################################
# #
# Setup the toolchain (compilers etc), i.e. tools used to compile and process # Setup the toolchain (compilers etc), i.e. tools used to compile and process
# native code. # native code.
# #
############################################################################### ################################################################################
# See if we are doing a complete static build or not # See if we are doing a complete static build or not
JDKOPT_SETUP_STATIC_BUILD JDKOPT_SETUP_STATIC_BUILD
@ -227,31 +227,31 @@ JDKOPT_SETUP_LEAK_SANITIZER
# This needs to go before 'LIB_DETERMINE_DEPENDENCIES' # This needs to go before 'LIB_DETERMINE_DEPENDENCIES'
JDKOPT_SETUP_FALLBACK_LINKER JDKOPT_SETUP_FALLBACK_LINKER
############################################################################### ################################################################################
# #
# Check dependencies for external and internal libraries. # Check dependencies for external and internal libraries.
# #
############################################################################### ################################################################################
LIB_DETERMINE_DEPENDENCIES LIB_DETERMINE_DEPENDENCIES
LIB_SETUP_LIBRARIES LIB_SETUP_LIBRARIES
############################################################################### ################################################################################
# #
# Setup hotspot and JVM features (needs toolchain). # Setup hotspot and JVM features (needs toolchain).
# #
############################################################################### ################################################################################
JVM_FEATURES_PARSE_OPTIONS JVM_FEATURES_PARSE_OPTIONS
JVM_FEATURES_SETUP JVM_FEATURES_SETUP
HOTSPOT_SETUP_MISC HOTSPOT_SETUP_MISC
############################################################################### ################################################################################
# #
# We need to do some final tweaking, when everything else is done. # We need to do some final tweaking, when everything else is done.
# #
############################################################################### ################################################################################
LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER
LIB_TESTS_ENABLE_DISABLE_JTREG_TEST_THREAD_FACTORY LIB_TESTS_ENABLE_DISABLE_JTREG_TEST_THREAD_FACTORY
@ -263,12 +263,12 @@ JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT
JDKOPT_SETUP_MACOSX_SIGNING JDKOPT_SETUP_MACOSX_SIGNING
############################################################################### ################################################################################
# #
# Configure parts of the build that only affect the build performance, # Configure parts of the build that only affect the build performance,
# not the result. # not the result.
# #
############################################################################### ################################################################################
BPERF_SETUP_BUILD_CORES BPERF_SETUP_BUILD_CORES
BPERF_SETUP_BUILD_MEMORY BPERF_SETUP_BUILD_MEMORY
@ -288,11 +288,11 @@ BPERF_SETUP_PRECOMPILED_HEADERS
# Setup use of ccache, if available # Setup use of ccache, if available
BPERF_SETUP_CCACHE BPERF_SETUP_CCACHE
############################################################################### ################################################################################
# #
# And now the finish... # And now the finish...
# #
############################################################################### ################################################################################
# Check for some common pitfalls # Check for some common pitfalls
BASIC_TEST_USABILITY_ISSUES BASIC_TEST_USABILITY_ISSUES

View File

@ -480,7 +480,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
# Always enable optional macros for VM. # Always enable optional macros for VM.
ALWAYS_CFLAGS_JVM="-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS" ALWAYS_CFLAGS_JVM="-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS"
############################################################################### ##############################################################################
# Adjust flags according to debug level. # Adjust flags according to debug level.
# Setup debug/release defines # Setup debug/release defines
@ -514,7 +514,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
ALWAYS_DEFINES_JVM="$ALWAYS_DEFINES -DNOMINMAX" ALWAYS_DEFINES_JVM="$ALWAYS_DEFINES -DNOMINMAX"
fi fi
############################################################################### ##############################################################################
# #
# #
# CFLAGS BASIC # CFLAGS BASIC

View File

@ -26,7 +26,7 @@
# All valid JVM variants # All valid JVM variants
VALID_JVM_VARIANTS="server client minimal core zero custom" VALID_JVM_VARIANTS="server client minimal core zero custom"
############################################################################### ################################################################################
# Check if the specified JVM variant should be built. To be used in shell if # Check if the specified JVM variant should be built. To be used in shell if
# constructs, like this: # constructs, like this:
# if HOTSPOT_CHECK_JVM_VARIANT(server); then # if HOTSPOT_CHECK_JVM_VARIANT(server); then
@ -38,7 +38,7 @@ VALID_JVM_VARIANTS="server client minimal core zero custom"
AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT], AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
[ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ]) [ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
############################################################################### ################################################################################
# Check which variants of the JVM that we want to build. Available variants are: # Check which variants of the JVM that we want to build. Available variants are:
# server: normal interpreter, and a tiered C1/C2 compiler # server: normal interpreter, and a tiered C1/C2 compiler
# client: normal interpreter, and C1 (no C2 compiler) # client: normal interpreter, and C1 (no C2 compiler)
@ -102,7 +102,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
AC_SUBST(JVM_VARIANT_MAIN) AC_SUBST(JVM_VARIANT_MAIN)
]) ])
############################################################################### ################################################################################
# Misc hotspot setup that does not fit elsewhere. # Misc hotspot setup that does not fit elsewhere.
# #
AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC], AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],

View File

@ -23,7 +23,7 @@
# questions. # questions.
# #
############################################################################### ################################################################################
# Set the debug level # Set the debug level
# release: no debug information, all optimizations, no asserts. # release: no debug information, all optimizations, no asserts.
# optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'. # optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
@ -81,7 +81,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
AC_SUBST(DEBUG_LEVEL) AC_SUBST(DEBUG_LEVEL)
]) ])
############################################################################### ################################################################################
# #
# Should we build only OpenJDK even if closed sources are present? # Should we build only OpenJDK even if closed sources are present?
# #
@ -246,7 +246,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
]) ])
############################################################################### ################################################################################
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS], AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
[ [
@ -410,7 +410,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
AC_SUBST(JCOV_FILTERS) AC_SUBST(JCOV_FILTERS)
]) ])
############################################################################### ################################################################################
# #
# AddressSanitizer # AddressSanitizer
# #
@ -467,7 +467,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
AC_SUBST(ASAN_ENABLED) AC_SUBST(ASAN_ENABLED)
]) ])
############################################################################### ################################################################################
# #
# LeakSanitizer # LeakSanitizer
# #
@ -500,7 +500,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_LEAK_SANITIZER],
AC_SUBST(LSAN_ENABLED) AC_SUBST(LSAN_ENABLED)
]) ])
############################################################################### ################################################################################
# #
# UndefinedBehaviorSanitizer # UndefinedBehaviorSanitizer
# #

View File

@ -23,7 +23,7 @@
# questions. # questions.
# #
############################################################################### ################################################################################
# #
# Setup version numbers # Setup version numbers
# #

View File

@ -23,7 +23,7 @@
# questions. # questions.
# #
############################################################################### ################################################################################
# Terminology used in this file: # Terminology used in this file:
# #
# Valid features == All possible features that the JVM knows about. # Valid features == All possible features that the JVM knows about.
@ -36,7 +36,7 @@
# #
# All valid features are considered available, unless listed as unavailable. # All valid features are considered available, unless listed as unavailable.
# All available features will be turned on as default, unless listed in a filter. # All available features will be turned on as default, unless listed in a filter.
############################################################################### ################################################################################
# We need these as m4 defines to be able to loop over them using m4 later on. # We need these as m4 defines to be able to loop over them using m4 later on.
@ -78,7 +78,7 @@ m4_define(jvm_feature_desc_vm_structs, [export JVM structures to the Serviceabli
m4_define(jvm_feature_desc_zero, [support building variant 'zero']) m4_define(jvm_feature_desc_zero, [support building variant 'zero'])
m4_define(jvm_feature_desc_zgc, [include the Z garbage collector]) m4_define(jvm_feature_desc_zgc, [include the Z garbage collector])
############################################################################### ################################################################################
# Parse command line options for JVM feature selection. After this function # Parse command line options for JVM feature selection. After this function
# has run $JVM_FEATURES_ENABLED, $JVM_FEATURES_DISABLED and $JVM_FEATURES_VALID # has run $JVM_FEATURES_ENABLED, $JVM_FEATURES_DISABLED and $JVM_FEATURES_VALID
# can be used. # can be used.
@ -199,7 +199,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_PARSE_OPTIONS],
AC_SUBST(VALID_JVM_FEATURES) AC_SUBST(VALID_JVM_FEATURES)
]) ])
############################################################################### ################################################################################
# Helper function for the JVM_FEATURES_CHECK_* suite. # Helper function for the JVM_FEATURES_CHECK_* suite.
# The code in the code block should assign 'false' to the variable AVAILABLE # The code in the code block should assign 'false' to the variable AVAILABLE
# if the feature is not available, and this function will handle everything # if the feature is not available, and this function will handle everything
@ -225,7 +225,7 @@ AC_DEFUN([JVM_FEATURES_CHECK_AVAILABILITY],
fi fi
]) ])
############################################################################### ################################################################################
# Check if the feature 'cds' is available on this platform. # Check if the feature 'cds' is available on this platform.
# #
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_CDS], AC_DEFUN_ONCE([JVM_FEATURES_CHECK_CDS],
@ -241,7 +241,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_CDS],
]) ])
]) ])
############################################################################### ################################################################################
# Check if the feature 'dtrace' is available on this platform. # Check if the feature 'dtrace' is available on this platform.
# #
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_DTRACE], AC_DEFUN_ONCE([JVM_FEATURES_CHECK_DTRACE],
@ -270,7 +270,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_DTRACE],
]) ])
]) ])
############################################################################### ################################################################################
# Check if the feature 'jvmci' is available on this platform. # Check if the feature 'jvmci' is available on this platform.
# #
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI], AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI],
@ -290,7 +290,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI],
]) ])
]) ])
############################################################################### ################################################################################
# Check if the feature 'shenandoahgc' is available on this platform. # Check if the feature 'shenandoahgc' is available on this platform.
# #
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_SHENANDOAHGC], AC_DEFUN_ONCE([JVM_FEATURES_CHECK_SHENANDOAHGC],
@ -309,7 +309,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_SHENANDOAHGC],
]) ])
]) ])
############################################################################### ################################################################################
# Check if the feature 'zgc' is available on this platform. # Check if the feature 'zgc' is available on this platform.
# #
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_ZGC], AC_DEFUN_ONCE([JVM_FEATURES_CHECK_ZGC],
@ -365,7 +365,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_ZGC],
]) ])
]) ])
############################################################################### ################################################################################
# Setup JVM_FEATURES_PLATFORM_UNAVAILABLE and JVM_FEATURES_PLATFORM_FILTER # Setup JVM_FEATURES_PLATFORM_UNAVAILABLE and JVM_FEATURES_PLATFORM_FILTER
# to contain those features that are unavailable, or should be off by default, # to contain those features that are unavailable, or should be off by default,
# for this platform, regardless of JVM variant. # for this platform, regardless of JVM variant.
@ -383,7 +383,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_PREPARE_PLATFORM],
]) ])
############################################################################### ################################################################################
# Setup JVM_FEATURES_VARIANT_UNAVAILABLE and JVM_FEATURES_VARIANT_FILTER # Setup JVM_FEATURES_VARIANT_UNAVAILABLE and JVM_FEATURES_VARIANT_FILTER
# to contain those features that are unavailable, or should be off by default, # to contain those features that are unavailable, or should be off by default,
# for this particular JVM variant. # for this particular JVM variant.
@ -431,7 +431,7 @@ AC_DEFUN([JVM_FEATURES_PREPARE_VARIANT],
fi fi
]) ])
############################################################################### ################################################################################
# Calculate the actual set of active JVM features for this JVM variant. Store # Calculate the actual set of active JVM features for this JVM variant. Store
# the result in JVM_FEATURES_ACTIVE. # the result in JVM_FEATURES_ACTIVE.
# #
@ -479,7 +479,7 @@ AC_DEFUN([JVM_FEATURES_CALCULATE_ACTIVE],
$JVM_FEATURES_ENABLED, $JVM_FEATURES_DISABLED) $JVM_FEATURES_ENABLED, $JVM_FEATURES_DISABLED)
]) ])
############################################################################### ################################################################################
# Helper function for JVM_FEATURES_VERIFY. Check if the specified JVM # Helper function for JVM_FEATURES_VERIFY. Check if the specified JVM
# feature is active. To be used in shell if constructs, like this: # feature is active. To be used in shell if constructs, like this:
# 'if JVM_FEATURES_IS_ACTIVE(jvmti); then' # 'if JVM_FEATURES_IS_ACTIVE(jvmti); then'
@ -489,7 +489,7 @@ AC_DEFUN([JVM_FEATURES_CALCULATE_ACTIVE],
AC_DEFUN([JVM_FEATURES_IS_ACTIVE], AC_DEFUN([JVM_FEATURES_IS_ACTIVE],
[ [ [[ " $JVM_FEATURES_ACTIVE " =~ ' '$1' ' ]] ] ]) [ [ [[ " $JVM_FEATURES_ACTIVE " =~ ' '$1' ' ]] ] ])
############################################################################### ################################################################################
# Verify that the resulting set of features is consistent and legal. # Verify that the resulting set of features is consistent and legal.
# #
# arg 1: JVM variant # arg 1: JVM variant
@ -527,7 +527,7 @@ AC_DEFUN([JVM_FEATURES_VERIFY],
fi fi
]) ])
############################################################################### ################################################################################
# Set up all JVM features for each enabled JVM variant. Requires that # Set up all JVM features for each enabled JVM variant. Requires that
# JVM_FEATURES_PARSE_OPTIONS has been called. # JVM_FEATURES_PARSE_OPTIONS has been called.
# #

View File

@ -31,7 +31,7 @@
JTREG_MINIMUM_VERSION=7.4 JTREG_MINIMUM_VERSION=7.4
GTEST_MINIMUM_VERSION=1.14.0 GTEST_MINIMUM_VERSION=1.14.0
############################################################################### ################################################################################
# #
# Setup and check for gtest framework source files # Setup and check for gtest framework source files
# #
@ -74,7 +74,7 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_GTEST],
AC_SUBST(GTEST_FRAMEWORK_SRC) AC_SUBST(GTEST_FRAMEWORK_SRC)
]) ])
############################################################################### ################################################################################
# #
# Setup and check the Java Microbenchmark Harness # Setup and check the Java Microbenchmark Harness
# #

View File

@ -678,7 +678,7 @@ AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION], AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
[ [
############################################################################### ##############################################################################
# Note that this is the build platform OS version! # Note that this is the build platform OS version!
@ -693,7 +693,7 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS], AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
[ [
############################################################################### ##############################################################################
# #
# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code. # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
# (The JVM can use 32 or 64 bit Java pointers but that decision # (The JVM can use 32 or 64 bit Java pointers but that decision
@ -739,7 +739,7 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS], AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
[ [
############################################################################### ##############################################################################
# #
# Is the target little or big endian? # Is the target little or big endian?
# #

View File

@ -272,7 +272,7 @@ VERSION_CFLAGS = \
-DVERSION_CLASSFILE_MINOR=$(VERSION_CLASSFILE_MINOR) \ -DVERSION_CLASSFILE_MINOR=$(VERSION_CLASSFILE_MINOR) \
# #
ifneq ($(COMPANY_NAME),) ifneq ($(COMPANY_NAME), )
# COMPANY_NAME is set to "N/A" in make/conf/branding.conf by default, # COMPANY_NAME is set to "N/A" in make/conf/branding.conf by default,
# but can be customized with the '--with-vendor-name' configure option. # but can be customized with the '--with-vendor-name' configure option.
# Only export "VENDOR" to the build if COMPANY_NAME contains a real value. # Only export "VENDOR" to the build if COMPANY_NAME contains a real value.
@ -288,13 +288,13 @@ endif
# Only export VENDOR_URL, VENDOR_URL_BUG and VENDOR_VM_URL_BUG to the build if # Only export VENDOR_URL, VENDOR_URL_BUG and VENDOR_VM_URL_BUG to the build if
# they are not empty. Otherwise, default values which are defined in the sources # they are not empty. Otherwise, default values which are defined in the sources
# will be used. # will be used.
ifneq ($(VENDOR_URL),) ifneq ($(VENDOR_URL), )
VERSION_CFLAGS += -DVENDOR_URL='"$(VENDOR_URL)"' VERSION_CFLAGS += -DVENDOR_URL='"$(VENDOR_URL)"'
endif endif
ifneq ($(VENDOR_URL_BUG),) ifneq ($(VENDOR_URL_BUG), )
VERSION_CFLAGS += -DVENDOR_URL_BUG='"$(VENDOR_URL_BUG)"' VERSION_CFLAGS += -DVENDOR_URL_BUG='"$(VENDOR_URL_BUG)"'
endif endif
ifneq ($(VENDOR_URL_VM_BUG),) ifneq ($(VENDOR_URL_VM_BUG), )
VERSION_CFLAGS += -DVENDOR_URL_VM_BUG='"$(VENDOR_URL_VM_BUG)"' VERSION_CFLAGS += -DVENDOR_URL_VM_BUG='"$(VENDOR_URL_VM_BUG)"'
endif endif
@ -804,11 +804,7 @@ UCRT_DLL_DIR := @UCRT_DLL_DIR@
ENABLE_PANDOC := @ENABLE_PANDOC@ ENABLE_PANDOC := @ENABLE_PANDOC@
PANDOC_MARKDOWN_FLAG := @PANDOC_MARKDOWN_FLAG@ PANDOC_MARKDOWN_FLAG := @PANDOC_MARKDOWN_FLAG@
####################################################
#
# Libraries # Libraries
#
USE_EXTERNAL_LCMS := @USE_EXTERNAL_LCMS@ USE_EXTERNAL_LCMS := @USE_EXTERNAL_LCMS@
LCMS_CFLAGS := @LCMS_CFLAGS@ LCMS_CFLAGS := @LCMS_CFLAGS@
LCMS_LIBS := @LCMS_LIBS@ LCMS_LIBS := @LCMS_LIBS@
@ -821,11 +817,7 @@ USE_EXTERNAL_LIBPNG := @USE_EXTERNAL_LIBPNG@
PNG_LIBS := @PNG_LIBS@ PNG_LIBS := @PNG_LIBS@
PNG_CFLAGS := @PNG_CFLAGS@ PNG_CFLAGS := @PNG_CFLAGS@
####################################################
#
# Misc # Misc
#
INCLUDE_SA := @INCLUDE_SA@ INCLUDE_SA := @INCLUDE_SA@
INCLUDE_JVMCI := @INCLUDE_JVMCI@ INCLUDE_JVMCI := @INCLUDE_JVMCI@
INCLUDE_COMPILER2 := @INCLUDE_COMPILER2@ INCLUDE_COMPILER2 := @INCLUDE_COMPILER2@

View File

@ -23,14 +23,14 @@
# questions. # questions.
# #
######################################################################## ################################################################################
# This file is responsible for detecting, verifying and setting up the # This file is responsible for detecting, verifying and setting up the
# toolchain, i.e. the compiler, linker and related utilities. It will setup # toolchain, i.e. the compiler, linker and related utilities. It will setup
# proper paths to the binaries, but it will not setup any flags. # proper paths to the binaries, but it will not setup any flags.
# #
# The binaries used is determined by the toolchain type, which is the family of # The binaries used is determined by the toolchain type, which is the family of
# compilers and related tools that are used. # compilers and related tools that are used.
######################################################################## ################################################################################
m4_include([toolchain_microsoft.m4]) m4_include([toolchain_microsoft.m4])

View File

@ -25,7 +25,7 @@
m4_include([util_paths.m4]) m4_include([util_paths.m4])
############################################################################### ################################################################################
# Create a function/macro that takes a series of named arguments. The call is # Create a function/macro that takes a series of named arguments. The call is
# similar to AC_DEFUN, but the setup of the function looks like this: # similar to AC_DEFUN, but the setup of the function looks like this:
# UTIL_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [ # UTIL_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
@ -100,7 +100,7 @@ AC_DEFUN([UTIL_DEFUN_NAMED],
]) ])
]) ])
############################################################################### ################################################################################
# Assert that a programmatic condition holds. If not, exit with an error message. # Assert that a programmatic condition holds. If not, exit with an error message.
# Check that a shell expression gives return code 0 # Check that a shell expression gives return code 0
# #
@ -121,7 +121,7 @@ AC_DEFUN([UTIL_ASSERT_SHELL_TEST],
]) ])
############################################################################### ################################################################################
# Assert that a programmatic condition holds. If not, exit with an error message. # Assert that a programmatic condition holds. If not, exit with an error message.
# Check that two strings are equal. # Check that two strings are equal.
# #
@ -137,7 +137,7 @@ AC_DEFUN([UTIL_ASSERT_STRING_EQUALS],
$3) $3)
]) ])
############################################################################### ################################################################################
# Assert that a programmatic condition holds. If not, exit with an error message. # Assert that a programmatic condition holds. If not, exit with an error message.
# Check that two strings not are equal. # Check that two strings not are equal.
# #
@ -153,7 +153,7 @@ AC_DEFUN([UTIL_ASSERT_STRING_NOT_EQUALS],
$3) $3)
]) ])
############################################################################### ################################################################################
# Assert that a programmatic condition holds. If not, exit with an error message. # Assert that a programmatic condition holds. If not, exit with an error message.
# Check that the given expression evaluates to the string 'true' # Check that the given expression evaluates to the string 'true'
# #
@ -165,7 +165,7 @@ AC_DEFUN([UTIL_ASSERT_TRUE],
UTIL_ASSERT_STRING_EQUALS($1, true, $3) UTIL_ASSERT_STRING_EQUALS($1, true, $3)
]) ])
############################################################################### ################################################################################
# Assert that a programmatic condition holds. If not, exit with an error message. # Assert that a programmatic condition holds. If not, exit with an error message.
# Check that the given expression does not evaluate to the string 'true' # Check that the given expression does not evaluate to the string 'true'
# #
@ -177,7 +177,7 @@ AC_DEFUN([UTIL_ASSERT_NOT_TRUE],
UTIL_ASSERT_STRING_NOT_EQUALS($1, true, $3) UTIL_ASSERT_STRING_NOT_EQUALS($1, true, $3)
]) ])
############################################################################### ################################################################################
# Check if a list of space-separated words are selected only from a list of # Check if a list of space-separated words are selected only from a list of
# space-separated legal words. Typical use is to see if a user-specified # space-separated legal words. Typical use is to see if a user-specified
# set of words is selected from a set of legal words. # set of words is selected from a set of legal words.
@ -204,7 +204,7 @@ AC_DEFUN([UTIL_GET_NON_MATCHING_VALUES],
fi fi
]) ])
############################################################################### ################################################################################
# Check if a list of space-separated words contains any word(s) from a list of # Check if a list of space-separated words contains any word(s) from a list of
# space-separated illegal words. Typical use is to see if a user-specified # space-separated illegal words. Typical use is to see if a user-specified
# set of words contains any from a set of illegal words. # set of words contains any from a set of illegal words.
@ -231,7 +231,7 @@ AC_DEFUN([UTIL_GET_MATCHING_VALUES],
fi fi
]) ])
############################################################################### ################################################################################
# Converts an ISO-8601 date/time string to a unix epoch timestamp. If no # Converts an ISO-8601 date/time string to a unix epoch timestamp. If no
# suitable conversion method was found, an empty string is returned. # suitable conversion method was found, an empty string is returned.
# #
@ -259,7 +259,7 @@ AC_DEFUN([UTIL_GET_EPOCH_TIMESTAMP],
$1=$timestamp $1=$timestamp
]) ])
############################################################################### ################################################################################
# Sort a space-separated list, and remove duplicates. # Sort a space-separated list, and remove duplicates.
# #
# Sets the specified variable to the resulting list. # Sets the specified variable to the resulting list.
@ -273,7 +273,7 @@ AC_DEFUN([UTIL_SORT_LIST],
$1=${result//$'\n'/ } $1=${result//$'\n'/ }
]) ])
############################################################################### ################################################################################
# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3) # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
# If so, then append $1 to $2 \ # If so, then append $1 to $2 \
# Also set JVM_ARG_OK to true/false depending on outcome. # Also set JVM_ARG_OK to true/false depending on outcome.
@ -294,7 +294,7 @@ AC_DEFUN([UTIL_ADD_JVM_ARG_IF_OK],
fi fi
]) ])
############################################################################### ################################################################################
# Register a --with argument but mark it as deprecated # Register a --with argument but mark it as deprecated
# $1: The name of the with argument to deprecate, not including --with- # $1: The name of the with argument to deprecate, not including --with-
AC_DEFUN([UTIL_DEPRECATED_ARG_WITH], AC_DEFUN([UTIL_DEPRECATED_ARG_WITH],
@ -304,7 +304,7 @@ AC_DEFUN([UTIL_DEPRECATED_ARG_WITH],
[AC_MSG_WARN([Option --with-$1 is deprecated and will be ignored.])]) [AC_MSG_WARN([Option --with-$1 is deprecated and will be ignored.])])
]) ])
############################################################################### ################################################################################
# Register a --enable argument but mark it as deprecated # Register a --enable argument but mark it as deprecated
# $1: The name of the with argument to deprecate, not including --enable- # $1: The name of the with argument to deprecate, not including --enable-
AC_DEFUN([UTIL_DEPRECATED_ARG_ENABLE], AC_DEFUN([UTIL_DEPRECATED_ARG_ENABLE],
@ -314,7 +314,7 @@ AC_DEFUN([UTIL_DEPRECATED_ARG_ENABLE],
[AC_MSG_WARN([Option --enable-$1 is deprecated and will be ignored.])]) [AC_MSG_WARN([Option --enable-$1 is deprecated and will be ignored.])])
]) ])
############################################################################### ################################################################################
# Register an --enable-* argument as an alias for another argument. # Register an --enable-* argument as an alias for another argument.
# $1: The name of the enable argument for the new alias, not including --enable- # $1: The name of the enable argument for the new alias, not including --enable-
# $2: The full name of the argument of which to make this an alias, including # $2: The full name of the argument of which to make this an alias, including
@ -329,7 +329,7 @@ AC_DEFUN([UTIL_ALIASED_ARG_ENABLE],
]) ])
]) ])
############################################################################### ################################################################################
# Creates a command-line option using the --enable-* pattern. Will return a # Creates a command-line option using the --enable-* pattern. Will return a
# value of 'true' or 'false' in the RESULT variable, depending on whether the # value of 'true' or 'false' in the RESULT variable, depending on whether the
# option was enabled or not by the user. The option can not be turned on if it # option was enabled or not by the user. The option can not be turned on if it
@ -471,7 +471,7 @@ UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
fi fi
]) ])
############################################################################### ################################################################################
# Helper functions for ARG_WITH, to validate different types of argument # Helper functions for ARG_WITH, to validate different types of argument
# Dispatcher to call the correct UTIL_CHECK_TYPE_* function depending on the ARG_TYPE # Dispatcher to call the correct UTIL_CHECK_TYPE_* function depending on the ARG_TYPE
@ -575,7 +575,7 @@ AC_DEFUN([UTIL_CHECK_TYPE_features],
ARG_RESULT=$($ECHO $feature_list) ARG_RESULT=$($ECHO $feature_list)
]) ])
############################################################################### ################################################################################
# Creates a command-line option using the --with-* pattern. Will return a # Creates a command-line option using the --with-* pattern. Will return a
# string in the RESULT variable with the option provided by the user, or the # string in the RESULT variable with the option provided by the user, or the
# empty string if the --with-* option was not given. The option can not be given # empty string if the --with-* option was not given. The option can not be given
@ -810,7 +810,7 @@ UTIL_DEFUN_NAMED([UTIL_ARG_WITH],
fi fi
]) ])
############################################################################### ################################################################################
# Helper functions for CHECK_VALUE in ARG_WITH. # Helper functions for CHECK_VALUE in ARG_WITH.
AC_DEFUN([UTIL_CHECK_STRING_NON_EMPTY], AC_DEFUN([UTIL_CHECK_STRING_NON_EMPTY],
[ [

View File

@ -23,7 +23,7 @@
# questions. # questions.
# #
############################################################################### ################################################################################
# Appends a string to a path variable, only adding the : when needed. # Appends a string to a path variable, only adding the : when needed.
AC_DEFUN([UTIL_APPEND_TO_PATH], AC_DEFUN([UTIL_APPEND_TO_PATH],
[ [
@ -36,7 +36,7 @@ AC_DEFUN([UTIL_APPEND_TO_PATH],
fi fi
]) ])
############################################################################### ################################################################################
# Prepends a string to a path variable, only adding the : when needed. # Prepends a string to a path variable, only adding the : when needed.
AC_DEFUN([UTIL_PREPEND_TO_PATH], AC_DEFUN([UTIL_PREPEND_TO_PATH],
[ [
@ -49,7 +49,7 @@ AC_DEFUN([UTIL_PREPEND_TO_PATH],
fi fi
]) ])
############################################################################### ################################################################################
# This will make sure the given variable points to a full and proper # This will make sure the given variable points to a full and proper
# path. This means: # path. This means:
# 1) There will be no spaces in the path. On unix platforms, # 1) There will be no spaces in the path. On unix platforms,
@ -118,7 +118,7 @@ AC_DEFUN([UTIL_FIXUP_PATH],
fi fi
]) ])
############################################################################## ################################################################################
# Fixup path to be a Windows full long path # Fixup path to be a Windows full long path
# Note: Only supported with cygwin/msys2 (cygpath tool) # Note: Only supported with cygwin/msys2 (cygpath tool)
AC_DEFUN([UTIL_FIXUP_WIN_LONG_PATH], AC_DEFUN([UTIL_FIXUP_WIN_LONG_PATH],
@ -136,7 +136,7 @@ AC_DEFUN([UTIL_FIXUP_WIN_LONG_PATH],
]) ])
############################################################################### ################################################################################
# Check if the given file is a unix-style or windows-style executable, that is, # Check if the given file is a unix-style or windows-style executable, that is,
# if it expects paths in unix-style or windows-style. # if it expects paths in unix-style or windows-style.
# Returns "windows" or "unix" in $RESULT. # Returns "windows" or "unix" in $RESULT.
@ -170,7 +170,7 @@ AC_DEFUN([UTIL_CHECK_WINENV_EXEC_TYPE],
fi fi
]) ])
############################################################################### ################################################################################
# This will make sure the given variable points to a executable # This will make sure the given variable points to a executable
# with a full and proper path. This means: # with a full and proper path. This means:
# 1) There will be no spaces in the path. On unix platforms, # 1) There will be no spaces in the path. On unix platforms,
@ -289,7 +289,7 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
fi fi
]) ])
############################################################################### ################################################################################
# Setup a tool for the given variable. If correctly specified by the user, # Setup a tool for the given variable. If correctly specified by the user,
# use that value, otherwise search for the tool using the supplied code snippet. # use that value, otherwise search for the tool using the supplied code snippet.
# $1: variable to set # $1: variable to set
@ -369,7 +369,7 @@ AC_DEFUN([UTIL_SETUP_TOOL],
fi fi
]) ])
############################################################################### ################################################################################
# Locate a tool using proper methods. # Locate a tool using proper methods.
# $1: variable to set # $1: variable to set
# $2: executable name (or list of names) to look for # $2: executable name (or list of names) to look for
@ -436,7 +436,7 @@ AC_DEFUN([UTIL_LOOKUP_PROGS],
]) ])
]) ])
############################################################################### ################################################################################
# Call UTIL_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool. This will look # Call UTIL_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool. This will look
# first for cross-compilation tools. # first for cross-compilation tools.
# $1: variable to set # $1: variable to set
@ -452,7 +452,7 @@ AC_DEFUN([UTIL_LOOKUP_TOOLCHAIN_PROGS],
fi fi
]) ])
############################################################################### ################################################################################
# Test that variable $1 denoting a program is not empty. If empty, exit with an error. # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
# $1: variable to check # $1: variable to check
AC_DEFUN([UTIL_CHECK_NONEMPTY], AC_DEFUN([UTIL_CHECK_NONEMPTY],
@ -462,7 +462,7 @@ AC_DEFUN([UTIL_CHECK_NONEMPTY],
fi fi
]) ])
############################################################################### ################################################################################
# Like UTIL_LOOKUP_PROGS but fails if no tool was found. # Like UTIL_LOOKUP_PROGS but fails if no tool was found.
# $1: variable to set # $1: variable to set
# $2: executable name (or list of names) to look for # $2: executable name (or list of names) to look for
@ -473,7 +473,7 @@ AC_DEFUN([UTIL_REQUIRE_PROGS],
UTIL_CHECK_NONEMPTY($1) UTIL_CHECK_NONEMPTY($1)
]) ])
############################################################################### ################################################################################
# Like UTIL_LOOKUP_PROGS but fails if no tool was found. # Like UTIL_LOOKUP_PROGS but fails if no tool was found.
# $1: variable to set # $1: variable to set
# $2: executable name (or list of names) to look for # $2: executable name (or list of names) to look for
@ -485,7 +485,7 @@ AC_DEFUN([UTIL_REQUIRE_TOOLCHAIN_PROGS],
]) ])
############################################################################### ################################################################################
# Like UTIL_SETUP_TOOL but fails if no tool was found. # Like UTIL_SETUP_TOOL but fails if no tool was found.
# $1: variable to set # $1: variable to set
# $2: autoconf macro to call to look for the special tool # $2: autoconf macro to call to look for the special tool
@ -497,7 +497,7 @@ AC_DEFUN([UTIL_REQUIRE_SPECIAL],
# unix tools. No further processing needed. # unix tools. No further processing needed.
]) ])
############################################################################### ################################################################################
# Add FIXPATH prefix to variable. Normally this is done by UTIL_LOOKUP_PROGS # Add FIXPATH prefix to variable. Normally this is done by UTIL_LOOKUP_PROGS
# or UTIL_FIXUP_EXECUTABLE, but in some circumstances this has to be done # or UTIL_FIXUP_EXECUTABLE, but in some circumstances this has to be done
# explicitly, such as when the command in question does not exist yet. # explicitly, such as when the command in question does not exist yet.
@ -510,7 +510,7 @@ AC_DEFUN([UTIL_ADD_FIXPATH],
fi fi
]) ])
############################################################################### ################################################################################
AC_DEFUN([UTIL_REMOVE_SYMBOLIC_LINKS], AC_DEFUN([UTIL_REMOVE_SYMBOLIC_LINKS],
[ [
if test "x$OPENJDK_BUILD_OS" != xwindows; then if test "x$OPENJDK_BUILD_OS" != xwindows; then

View File

@ -23,7 +23,7 @@
# questions. # questions.
# #
ifeq (,$(_MAKEBASE_GMK)) ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including CopyFiles.gmk) $(error You must include MakeBase.gmk prior to including CopyFiles.gmk)
endif endif

View File

@ -23,7 +23,7 @@
# questions. # questions.
# #
ifeq (,$(_MAKEBASE_GMK)) ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including Execute.gmk) $(error You must include MakeBase.gmk prior to including Execute.gmk)
endif endif

View File

@ -23,7 +23,7 @@
# questions. # questions.
# #
ifeq (,$(_MAKEBASE_GMK)) ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including FileUtils.gmk) $(error You must include MakeBase.gmk prior to including FileUtils.gmk)
endif endif
@ -287,7 +287,7 @@ CacheFindFiles = \
# #
# $1 - Directories to start search in # $1 - Directories to start search in
FillFindCache = \ FillFindCache = \
$(eval CacheFindFiles_NEW_DIRS := $$(filter-out $$(addsuffix /%,\ $(eval CacheFindFiles_NEW_DIRS := $$(filter-out $$(addsuffix /%, \
$$(CacheFindFiles_CACHED_DIRS)) $$(CacheFindFiles_CACHED_DIRS), $1)) \ $$(CacheFindFiles_CACHED_DIRS)) $$(CacheFindFiles_CACHED_DIRS), $1)) \
$(if $(CacheFindFiles_NEW_DIRS), \ $(if $(CacheFindFiles_NEW_DIRS), \
$(eval CacheFindFiles_CACHED_DIRS += $$(patsubst %/,%,$$(CacheFindFiles_NEW_DIRS))) \ $(eval CacheFindFiles_CACHED_DIRS += $$(patsubst %/,%,$$(CacheFindFiles_NEW_DIRS))) \

View File

@ -26,13 +26,13 @@
ifndef _JAR_ARCHIVE_GMK ifndef _JAR_ARCHIVE_GMK
_JAR_ARCHIVE_GMK := 1 _JAR_ARCHIVE_GMK := 1
ifeq (,$(_MAKEBASE_GMK)) ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including JarArchive.gmk) $(error You must include MakeBase.gmk prior to including JarArchive.gmk)
endif endif
include MakeIO.gmk include MakeIO.gmk
FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST FALSE_FIND_PATTERN := -name FILE_NAME_THAT_DOESNT_EXIST
# Setup make rules for creating a jar archive. # Setup make rules for creating a jar archive.
# #
@ -40,81 +40,81 @@ FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST
# and the targets generated are listed in a variable by that name. # and the targets generated are listed in a variable by that name.
# #
# Remaining parameters are named arguments. These include: # Remaining parameters are named arguments. These include:
# DEPENDENCIES:=List of dependencies for the jar target. If left empty, # DEPENDENCIES List of dependencies for the jar target. If left empty,
# dependencies are calculated automatically from the source files found. # dependencies are calculated automatically from the source files found.
# For this to work, the source files must exist when the makefile is # For this to work, the source files must exist when the makefile is
# parsed. # parsed.
# SRCS:=List of directories in where to find files to add to archive # SRCS List of directories in where to find files to add to archive
# BIN:=Directory where to store build control files # BIN Directory where to store build control files
# SUFFIXES:=File suffixes to include in jar # SUFFIXES File suffixes to include in jar
# INCLUDES:=List of directories/packages in SRCS that should be included # INCLUDES List of directories/packages in SRCS that should be included
# EXCLUDES:=List of directories/packages in SRCS that should be excluded # EXCLUDES List of directories/packages in SRCS that should be excluded
# EXCLUDE_FILES:=List of files in SRCS that should be excluded # EXCLUDE_FILES List of files in SRCS that should be excluded
# EXTRA_FILES:=List of files in SRCS that should be included regardless of suffix match. # EXTRA_FILES List of files in SRCS that should be included regardless of suffix match.
# JAR:=Jar file to create # JAR Jar file to create
# MANIFEST:=Optional manifest file template. # MANIFEST Optional manifest file template.
# JARMAIN:=Optional main class to add to manifest # JARMAIN Optional main class to add to manifest
# JARINDEX:=true means generate the index in the jar file. # JARINDEX true means generate the index in the jar file.
# SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically # SKIP_METAINF Set to prevent contents of an META-INF directory to be automatically
# added to the archive. # added to the archive.
# EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest. # EXTRA_MANIFEST_ATTR Extra attribute to add to manifest.
# CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable # CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
# JAR_CMD:=Optionally override the jar command to use when creating the archive. # JAR_CMD Optionally override the jar command to use when creating the archive.
SetupJarArchive = $(NamedParamsMacroTemplate) SetupJarArchive = $(NamedParamsMacroTemplate)
define SetupJarArchiveBody define SetupJarArchiveBody
$1_JARMAIN:=$(strip $$($1_JARMAIN)) $1_JARMAIN := $(strip $$($1_JARMAIN))
$1_JARNAME:=$$(notdir $$($1_JAR)) $1_JARNAME := $$(notdir $$($1_JAR))
$1_JAR_OUTPUT_DIR := $$(patsubst %/, %, $$(dir $$($1_JAR))) $1_JAR_OUTPUT_DIR := $$(patsubst %/, %, $$(dir $$($1_JAR)))
$$(call SetIfEmpty, $1_BIN, $$($1_JAR_OUTPUT_DIR)) $$(call SetIfEmpty, $1_BIN, $$($1_JAR_OUTPUT_DIR))
$1_MANIFEST_FILE:=$$($1_BIN)/_the.$$($1_JARNAME)_manifest $1_MANIFEST_FILE := $$($1_BIN)/_the.$$($1_JARNAME)_manifest
$1_DELETESS_FILE:=$$($1_BIN)/_the.$$($1_JARNAME)_deletess $1_DELETESS_FILE := $$($1_BIN)/_the.$$($1_JARNAME)_deletess
$1_DELETES_FILE:=$$($1_BIN)/_the.$$($1_JARNAME)_deletes $1_DELETES_FILE := $$($1_BIN)/_the.$$($1_JARNAME)_deletes
$$(call SetIfEmpty, $1_JAR_CMD, $$(JAR)) $$(call SetIfEmpty, $1_JAR_CMD, $$(JAR))
ifeq (,$$($1_SUFFIXES)) ifeq ($$($1_SUFFIXES), )
# No suffix was set, default to classes. # No suffix was set, default to classes.
$1_SUFFIXES:=.class $1_SUFFIXES := .class
endif endif
# Convert suffixes to a find expression # Convert suffixes to a find expression
$1_FIND_PATTERNS:=$(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES)) $1_FIND_PATTERNS := $(FALSE_FIND_PATTERN) $$(patsubst %,$(SPACE)-o$(SPACE)-name$(SPACE)$(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
# On windows, a lot of includes/excludes risk making the command line too long, so # On windows, a lot of includes/excludes risk making the command line too long, so
# writing the grep patterns to files. # writing the grep patterns to files.
# Grep returns 1 if nothing is matched. Do not fail the build for this. # Grep returns 1 if nothing is matched. Do not fail the build for this.
ifneq (,$$($1_INCLUDES)) ifneq ($$($1_INCLUDES), )
$1_GREP_INCLUDE_PATTERNS:=$$(call EscapeDollar, \ $1_GREP_INCLUDE_PATTERNS := $$(call EscapeDollar, \
$$(foreach src,$$($1_SRCS), $$(addprefix $$(src)/,$$($1_INCLUDES)))) $$(foreach src,$$($1_SRCS), $$(addprefix $$(src)/,$$($1_INCLUDES))))
# If there are a lot of include patterns, output to file to shorten command lines # If there are a lot of include patterns, output to file to shorten command lines
ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),) ifeq ($$(word 20, $$($1_GREP_INCLUDE_PATTERNS)), )
$1_GREP_INCLUDES:=| ( $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS)) \ $1_GREP_INCLUDES := | ( $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS)) \
|| test "$$$$?" = "1" ) || test "$$$$?" = "1" )
else else
$1_GREP_INCLUDE_OUTPUT = \ $1_GREP_INCLUDE_OUTPUT = \
$$(eval $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS, \ $$(eval $$(call ListPathsSafely, $1_GREP_INCLUDE_PATTERNS, \
$$($1_BIN)/_the.$$($1_JARNAME)_include)) $$($1_BIN)/_the.$$($1_JARNAME)_include))
$1_GREP_INCLUDES:=| ( $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include \ $1_GREP_INCLUDES := | ( $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include \
|| test "$$$$?" = "1" ) || test "$$$$?" = "1" )
endif endif
endif endif
ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES)) ifneq ($$($1_EXCLUDES)$$($1_EXCLUDE_FILES), )
$1_GREP_EXCLUDE_PATTERNS:=$$(call EscapeDollar, \ $1_GREP_EXCLUDE_PATTERNS := $$(call EscapeDollar, \
$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/, \ $$(foreach src, $$($1_SRCS), $$(addprefix $$(src)/, \
$$($1_EXCLUDES) $$($1_EXCLUDE_FILES)))) $$($1_EXCLUDES) $$($1_EXCLUDE_FILES))))
# If there are a lot of include patterns, output to file to shorten command lines # If there are a lot of include patterns, output to file to shorten command lines
ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),) ifeq ($$(word 20, $$($1_GREP_EXCLUDE_PATTERNS)), )
$1_GREP_EXCLUDES:=| ( $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS)) \ $1_GREP_EXCLUDES := | ( $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS)) \
|| test "$$$$?" = "1" ) || test "$$$$?" = "1" )
else else
$1_GREP_EXCLUDE_OUTPUT = \ $1_GREP_EXCLUDE_OUTPUT = \
$$(eval $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS, \ $$(eval $$(call ListPathsSafely, $1_GREP_EXCLUDE_PATTERNS, \
$$($1_BIN)/_the.$$($1_JARNAME)_exclude)) $$($1_BIN)/_the.$$($1_JARNAME)_exclude))
$1_GREP_EXCLUDES:=| ( $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude \ $1_GREP_EXCLUDES := | ( $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude \
|| test "$$$$?" = "1" ) || test "$$$$?" = "1" )
endif endif
endif endif
# Check if this jar needs to have its index generated. # Check if this jar needs to have its index generated.
ifneq (,$$($1_JARINDEX)) ifneq ($$($1_JARINDEX), )
$1_JARINDEX = (cd $$(dir $$@) && $$($1_JAR_CMD) -i $$(notdir $$@)) $1_JARINDEX = (cd $$(dir $$@) && $$($1_JAR_CMD) -i $$(notdir $$@))
else else
$1_JARINDEX = true $1_JARINDEX = true
@ -127,19 +127,19 @@ define SetupJarArchiveBody
# Add all source roots to the find cache since we are likely going to run find # Add all source roots to the find cache since we are likely going to run find
# on these more than once. The cache will only be updated if necessary. # on these more than once. The cache will only be updated if necessary.
$$(call FillFindCache, $$($1_FIND_LIST)) $$(call FillFindCache, $$($1_FIND_LIST))
$1_DEPENDENCIES:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \ $1_DEPENDENCIES := $$(filter $$(addprefix %, $$($1_SUFFIXES)), \
$$(call FindFiles,$$($1_SRCS))) $$(call FindFiles, $$($1_SRCS)))
ifneq (,$$($1_GREP_INCLUDE_PATTERNS)) ifneq ($$($1_GREP_INCLUDE_PATTERNS), )
$1_DEPENDENCIES:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPENDENCIES)) $1_DEPENDENCIES := $$(filter $$(addsuffix %, $$($1_GREP_INCLUDE_PATTERNS)), $$($1_DEPENDENCIES))
endif endif
ifneq (,$$($1_GREP_EXCLUDE_PATTERNS)) ifneq ($$($1_GREP_EXCLUDE_PATTERNS), )
$1_DEPENDENCIES:=$$(filter-out $$(addsuffix %,$$($1_GREP_EXCLUDE_PATTERNS)),$$($1_DEPENDENCIES)) $1_DEPENDENCIES := $$(filter-out $$(addsuffix %, $$($1_GREP_EXCLUDE_PATTERNS)), $$($1_DEPENDENCIES))
endif endif
# Look for EXTRA_FILES in all SRCS dirs and as absolute paths. # Look for EXTRA_FILES in all SRCS dirs and as absolute paths.
$1_DEPENDENCIES+=$$(wildcard $$(foreach src, $$($1_SRCS), \ $1_DEPENDENCIES += $$(wildcard $$(foreach src, $$($1_SRCS), \
$$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES)) $$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES))
ifeq (,$$($1_SKIP_METAINF)) ifeq ($$($1_SKIP_METAINF), )
$1_DEPENDENCIES+=$$(call FindFiles,$$(wildcard $$(addsuffix /META-INF,$$($1_SRCS)))) $1_DEPENDENCIES += $$(call FindFiles, $$(wildcard $$(addsuffix /META-INF, $$($1_SRCS))))
endif endif
endif endif
# The dependency list should never be empty # The dependency list should never be empty
@ -156,23 +156,23 @@ define SetupJarArchiveBody
# into -C <dir> <file> lines. # into -C <dir> <file> lines.
# The EXTRA_FILES_RESOLVED variable must be set in the macro so that it's evaluated # The EXTRA_FILES_RESOLVED variable must be set in the macro so that it's evaluated
# in the recipe when the files are guaranteed to exist. # in the recipe when the files are guaranteed to exist.
$1_CAPTURE_EXTRA_FILES=\ $1_CAPTURE_EXTRA_FILES = \
$$(eval $1_EXTRA_FILES_RESOLVED:=$$(call DoubleDollar, \ $$(eval $1_EXTRA_FILES_RESOLVED := $$(call DoubleDollar, \
$$(wildcard $$(foreach src, $$($1_SRCS), \ $$(wildcard $$(foreach src, $$($1_SRCS), \
$$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES)))) \ $$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES)))) \
$$(if $$($1_EXTRA_FILES_RESOLVED), \ $$(if $$($1_EXTRA_FILES_RESOLVED), \
$$(eval $$(call ListPathsSafely,$1_EXTRA_FILES_RESOLVED, \ $$(eval $$(call ListPathsSafely, $1_EXTRA_FILES_RESOLVED, \
$$($1_BIN)/_the.$$($1_JARNAME)_contents.extra)) \ $$($1_BIN)/_the.$$($1_JARNAME)_contents.extra)) \
$(SED) $$(foreach src,$$($1_SRCS), -e 's|$$(src)/|-C $$(src) |g') \ $(SED) $$(foreach src, $$($1_SRCS), -e 's|$$(src)/|-C $$(src) |g') \
$$($1_BIN)/_the.$$($1_JARNAME)_contents.extra \ $$($1_BIN)/_the.$$($1_JARNAME)_contents.extra \
>> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)) >> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE))
# The capture contents macro finds all files (matching the patterns, typically # The capture contents macro finds all files (matching the patterns, typically
# .class and .prp) that are newer than the jar-file, ie the new content to be put into the jar. # .class and .prp) that are newer than the jar-file, ie the new content to be put into the jar.
# NOTICE: please leave the parentheses space separated otherwise the AIX build will break! # NOTICE: please leave the parentheses space separated otherwise the AIX build will break!
$1_CAPTURE_CONTENTS=\ $1_CAPTURE_CONTENTS = \
$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE) \ $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE) \
$$(foreach src,$$($1_SRCS), \ $$(foreach src, $$($1_SRCS), \
$(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) \ $(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) \
$$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/|-C $$(src) |g' \ $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/|-C $$(src) |g' \
>> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)) \ >> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)) \
@ -180,19 +180,19 @@ define SetupJarArchiveBody
# The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file. # The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file.
# Find returns non zero if the META-INF dir does not exist, ignore this. # Find returns non zero if the META-INF dir does not exist, ignore this.
ifeq (,$$($1_SKIP_METAINF)) ifeq ($$($1_SKIP_METAINF), )
$1_CAPTURE_METAINF =$$(foreach src,$$($1_SRCS), \ $1_CAPTURE_METAINF = $$(foreach src, $$($1_SRCS), \
( ( $(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null || true ) \ ( ( $(FIND) $$(src)/META-INF -type f -a -newer $$@ 2> /dev/null || true ) \
| $(SED) 's|$$(src)/|-C $$(src) |g' >> \ | $(SED) 's|$$(src)/|-C $$(src) |g' >> \
$$($1_BIN)/_the.$$($1_JARNAME)_contents ) $$(NEWLINE) ) $$($1_BIN)/_the.$$($1_JARNAME)_contents ) $$(NEWLINE) )
endif endif
# The capture deletes macro finds all deleted files and concatenates them. The resulting file # The capture deletes macro finds all deleted files and concatenates them. The resulting file
# tells us what to remove from the jar-file. # tells us what to remove from the jar-file.
$1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ \ $1_CAPTURE_DELETES = $$(foreach src, $$($1_SRCS), ($(FIND) $$(src) -name _the.package.deleted -newer $$@ \
-exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE)) -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE))
# The update contents macro updates the jar file with the previously capture contents. # The update contents macro updates the jar file with the previously capture contents.
# Use 'wc -w' to see if the contents file is empty. # Use 'wc -w' to see if the contents file is empty.
$1_UPDATE_CONTENTS=\ $1_UPDATE_CONTENTS = \
if [ "`$(WC) -l $$($1_BIN)/_the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'`" -gt "0" ]; then \ if [ "`$(WC) -l $$($1_BIN)/_the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'`" -gt "0" ]; then \
$(ECHO) " updating" `$(WC) -l $$($1_BIN)/_the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \ $(ECHO) " updating" `$(WC) -l $$($1_BIN)/_the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \
$(SORT) $$($1_BIN)/_the.$$($1_JARNAME)_contents > $$($1_BIN)/_the.$$($1_JARNAME)_contents_sorted && \ $(SORT) $$($1_BIN)/_the.$$($1_JARNAME)_contents > $$($1_BIN)/_the.$$($1_JARNAME)_contents_sorted && \
@ -200,27 +200,27 @@ define SetupJarArchiveBody
fi $$(NEWLINE) fi $$(NEWLINE)
# The s-variants of the above macros are used when the jar is created from scratch. # The s-variants of the above macros are used when the jar is created from scratch.
# NOTICE: please leave the parentheses space separated otherwise the AIX build will break! # NOTICE: please leave the parentheses space separated otherwise the AIX build will break!
$1_SCAPTURE_CONTENTS=\ $1_SCAPTURE_CONTENTS = \
$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE) \ $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE) \
$$(foreach src,$$($1_SRCS), \ $$(foreach src, $$($1_SRCS), \
$(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \ $(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
$$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/|-C $$(src) |g' \ $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/|-C $$(src) |g' \
>> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)) \ >> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)) \
$$($1_CAPTURE_EXTRA_FILES) $$($1_CAPTURE_EXTRA_FILES)
# Find returns non zero if the META-INF dir does not exist, ignore this. # Find returns non zero if the META-INF dir does not exist, ignore this.
ifeq (,$$($1_SKIP_METAINF)) ifeq ($$($1_SKIP_METAINF), )
$1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS), \ $1_SCAPTURE_METAINF = $$(foreach src, $$($1_SRCS), \
( ( $(FIND) $$(src)/META-INF -type f 2> /dev/null || true ) \ ( ( $(FIND) $$(src)/META-INF -type f 2> /dev/null || true ) \
| $(SED) 's|$$(src)/|-C $$(src) |g' >> \ | $(SED) 's|$$(src)/|-C $$(src) |g' >> \
$$($1_BIN)/_the.$$($1_JARNAME)_contents) $$(NEWLINE) ) $$($1_BIN)/_the.$$($1_JARNAME)_contents) $$(NEWLINE) )
endif endif
$1_SUPDATE_CONTENTS=\ $1_SUPDATE_CONTENTS = \
$(SORT) $$($1_BIN)/_the.$$($1_JARNAME)_contents > $$($1_BIN)/_the.$$($1_JARNAME)_contents_sorted && \ $(SORT) $$($1_BIN)/_the.$$($1_JARNAME)_contents > $$($1_BIN)/_the.$$($1_JARNAME)_contents_sorted && \
$$($1_JAR_CMD) --update $$($1_JAR_OPTIONS) --file $$@ @$$($1_BIN)/_the.$$($1_JARNAME)_contents_sorted $$(NEWLINE) $$($1_JAR_CMD) --update $$($1_JAR_OPTIONS) --file $$@ @$$($1_BIN)/_the.$$($1_JARNAME)_contents_sorted $$(NEWLINE)
# Use a slightly shorter name for logging, but with enough path to identify this jar. # Use a slightly shorter name for logging, but with enough path to identify this jar.
$1_NAME:=$$(subst $$(OUTPUTDIR)/,,$$($1_JAR)) $1_NAME := $$(subst $$(OUTPUTDIR)/,,$$($1_JAR))
# If reproducible build and the boot jdk jar supports --date option # If reproducible build and the boot jdk jar supports --date option
# then specify the --date using SOURCE_DATE in ISO-8601 # then specify the --date using SOURCE_DATE in ISO-8601
@ -228,7 +228,7 @@ define SetupJarArchiveBody
ifeq ($$(BOOT_JDK_JAR_SUPPORTS_DATE), true) ifeq ($$(BOOT_JDK_JAR_SUPPORTS_DATE), true)
$1_JAR_OPTIONS += --date $(SOURCE_DATE_ISO_8601) $1_JAR_OPTIONS += --date $(SOURCE_DATE_ISO_8601)
endif endif
ifneq (,$$($1_CHECK_COMPRESS_JAR)) ifneq ($$($1_CHECK_COMPRESS_JAR), )
ifneq ($(COMPRESS_JARS), true) ifneq ($(COMPRESS_JARS), true)
$1_JAR_OPTIONS += --no-compress $1_JAR_OPTIONS += --no-compress
endif endif

View File

@ -26,7 +26,7 @@
ifndef _JAVA_COMPILATION_GMK ifndef _JAVA_COMPILATION_GMK
_JAVA_COMPILATION_GMK := 1 _JAVA_COMPILATION_GMK := 1
ifeq (,$(_MAKEBASE_GMK)) ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including JavaCompilation.gmk) $(error You must include MakeBase.gmk prior to including JavaCompilation.gmk)
endif endif
@ -57,9 +57,9 @@ TARGET_RELEASE_NEWJDK_UPGRADED := $(TARGET_RELEASE_NEWJDK) \
define add_file_to_copy define add_file_to_copy
# param 1 = BUILD_MYPACKAGE # param 1 = BUILD_MYPACKAGE
# parma 2 = The source file to copy. # parma 2 = The source file to copy.
$2_TARGET:=$2 $2_TARGET := $2
# Remove the source prefix. # Remove the source prefix.
$$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET))) $$(foreach i, $$($1_SRC), $$(eval $$(call remove_string,$$i,$2_TARGET)))
# To allow for automatic overrides, do not create a rule for a target file that # To allow for automatic overrides, do not create a rule for a target file that
# already has one # already has one
ifneq ($$($1_COPY_$$($2_TARGET)), 1) ifneq ($$($1_COPY_$$($2_TARGET)), 1)
@ -98,9 +98,9 @@ endef
define add_file_to_clean define add_file_to_clean
# param 1 = BUILD_MYPACKAGE # param 1 = BUILD_MYPACKAGE
# parma 2 = The source file to copy and clean. # parma 2 = The source file to copy and clean.
$2_TARGET:=$2 $2_TARGET := $2
# Remove the source prefix. # Remove the source prefix.
$$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET))) $$(foreach i, $$($1_SRC), $$(eval $$(call remove_string,$$i,$2_TARGET)))
# Now we can setup the dependency that will trigger the copying. # Now we can setup the dependency that will trigger the copying.
# To allow for automatic overrides, do not create a rule for a target file that # To allow for automatic overrides, do not create a rule for a target file that
# already has one # already has one
@ -138,44 +138,44 @@ endef
# The target for public API digest is returned in $1_API_TARGET. # The target for public API digest is returned in $1_API_TARGET.
# #
# Remaining parameters are named arguments. These include: # Remaining parameters are named arguments. These include:
# SMALL_JAVA:=set to false to run javac as a "big" java app # SMALL_JAVA set to false to run javac as a "big" java app
# COMPILER:=bootjdk or interim, the latter is default # COMPILER bootjdk or interim, the latter is default
# TARGET_RELEASE:=javac flags to set the targeted jdk release (-source/-target or --release) # TARGET_RELEASE javac flags to set the targeted jdk release (-source/-target or --release)
# Defaults to $(TARGET_RELEASE_NEWJDK). # Defaults to $(TARGET_RELEASE_NEWJDK).
# JAVAC_FLAGS:=javac flags to append to the default ones. # JAVAC_FLAGS javac flags to append to the default ones.
# JAVA_FLAGS:=flags to be appended to the java launching the compiler # JAVA_FLAGS flags to be appended to the java launching the compiler
# DISABLED_WARNINGS:=list of Xlint warnings that should be disabled # DISABLED_WARNINGS list of Xlint warnings that should be disabled
# SRC:=one or more directories to search for sources. The order of the source roots # SRC one or more directories to search for sources. The order of the source roots
# is significant. The first found file of a certain name has priority. # is significant. The first found file of a certain name has priority.
# BIN:=store classes here # BIN store classes here
# MODULE:=Name of module being compiled. If set, classes are put in BIN/MODULE. # MODULE Name of module being compiled. If set, classes are put in BIN/MODULE.
# CLASSPATH:=a list of additional entries to set as classpath to javac # CLASSPATH a list of additional entries to set as classpath to javac
# INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages. # INCLUDES myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
# EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages. # EXCLUDES myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
# COPY:=.prp means copy all prp files to the corresponding package in BIN. # COPY .prp means copy all prp files to the corresponding package in BIN.
# COPY_FILES:=myapp/foo/setting.txt means copy this file over to the package myapp/foo # COPY_FILES myapp/foo/setting.txt means copy this file over to the package myapp/foo
# CLEAN:=.properties means copy and clean all properties file to the corresponding package in BIN. # CLEAN .properties means copy and clean all properties file to the corresponding package in BIN.
# CLEAN_FILES:=myapp/foo/setting.txt means clean this file over to the package myapp/foo # CLEAN_FILES myapp/foo/setting.txt means clean this file over to the package myapp/foo
# SRCZIP:=Create a src.zip based on the found sources and copied files. # SRCZIP Create a src.zip based on the found sources and copied files.
# INCLUDE_FILES:="com/sun/SolarisFoobar.java" means only compile this file! # INCLUDE_FILES "com/sun/SolarisFoobar.java" means only compile this file!
# EXCLUDE_FILES:="com/sun/SolarisFoobar.java" means do not compile this particular file! # EXCLUDE_FILES "com/sun/SolarisFoobar.java" means do not compile this particular file!
# "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found. # "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
# EXTRA_FILES:=List of extra source files to include in compilation. Can be used to # EXTRA_FILES List of extra source files to include in compilation. Can be used to
# specify files that need to be generated by other rules first. # specify files that need to be generated by other rules first.
# HEADERS:=path to directory where all generated c-headers are written. # HEADERS path to directory where all generated c-headers are written.
# DEPENDS:=Extra dependency # DEPENDS Extra dependency
# KEEP_DUPS:=Do not remove duplicate file names from different source roots. # KEEP_DUPS Do not remove duplicate file names from different source roots.
# FAIL_NO_SRC:=Set to false to not fail the build if no source files are found, # FAIL_NO_SRC Set to false to not fail the build if no source files are found,
# default is true. # default is true.
# CREATE_API_DIGEST:=Set to true to use a javac plugin to generate a public API # CREATE_API_DIGEST Set to true to use a javac plugin to generate a public API
# hash which can be used for down stream dependencies to only rebuild # hash which can be used for down stream dependencies to only rebuild
# when the API changes. # when the API changes.
# KEEP_ALL_TRANSLATIONS:=Set to true to skip translation filtering # KEEP_ALL_TRANSLATIONS Set to true to skip translation filtering
SetupJavaCompilation = $(NamedParamsMacroTemplate) SetupJavaCompilation = $(NamedParamsMacroTemplate)
define SetupJavaCompilationBody define SetupJavaCompilationBody
# Verify arguments # Verify arguments
ifeq ($$($1_BIN),) ifeq ($$($1_BIN), )
$$(error Must specify BIN (in $1)) $$(error Must specify BIN (in $1))
endif endif
@ -313,7 +313,7 @@ define SetupJavaCompilationBody
) \ ) \
) \ ) \
) )
$$(call MakeDir,$$($1_BIN)) $$(call MakeDir, $$($1_BIN))
# Order src files according to the order of the src dirs. Correct ordering is # Order src files according to the order of the src dirs. Correct ordering is
# needed for correct overriding between different source roots. # needed for correct overriding between different source roots.
$1_ALL_SRC_RAW := $$(call FindFiles, $$($1_SRC)) $1_ALL_SRC_RAW := $$(call FindFiles, $$($1_SRC))
@ -369,60 +369,60 @@ define SetupJavaCompilationBody
endif endif
else else
# All files below META-INF are always copied. # All files below META-INF are always copied.
$1_ALL_COPIES := $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS)) $1_ALL_COPIES := $$(filter $$(addsuffix /META-INF%, $$($1_SRC)), $$($1_ALL_SRCS))
# Find all files to be copied from source to bin. # Find all files to be copied from source to bin.
ifneq (,$$($1_COPY)$$($1_COPY_FILES)) ifneq ($$($1_COPY)$$($1_COPY_FILES), )
# Search for all files to be copied. # Search for all files to be copied.
$1_ALL_COPIES += $$(filter $$(addprefix %,$$($1_COPY)),$$($1_ALL_SRCS)) $1_ALL_COPIES += $$(filter $$(addprefix %, $$($1_COPY)), $$($1_ALL_SRCS))
# Copy these explicitly # Copy these explicitly
$1_ALL_COPIES += $$($1_COPY_FILES) $1_ALL_COPIES += $$($1_COPY_FILES)
endif endif
# Copy must also respect filters. # Copy must also respect filters.
ifneq (,$$($1_INCLUDE_PATTERN)) ifneq ($$($1_INCLUDE_PATTERN), )
$1_ALL_COPIES := $$(filter $$($1_INCLUDE_PATTERN),$$($1_ALL_COPIES)) $1_ALL_COPIES := $$(filter $$($1_INCLUDE_PATTERN), $$($1_ALL_COPIES))
endif endif
ifneq (,$$($1_EXCLUDE_PATTERN)) ifneq ($$($1_EXCLUDE_PATTERN), )
$1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_PATTERN),$$($1_ALL_COPIES)) $1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_PATTERN), $$($1_ALL_COPIES))
endif endif
# Filter out any excluded translations # Filter out any excluded translations
ifneq ($$($1_KEEP_ALL_TRANSLATIONS), true) ifneq ($$($1_KEEP_ALL_TRANSLATIONS), true)
$1_ALL_COPIES := $$(call FilterExcludedTranslations, $$($1_ALL_COPIES), .properties) $1_ALL_COPIES := $$(call FilterExcludedTranslations, $$($1_ALL_COPIES), .properties)
endif endif
ifneq (,$$($1_ALL_COPIES)) ifneq ($$($1_ALL_COPIES), )
# Yep, there are files to be copied! # Yep, there are files to be copied!
$1_ALL_COPY_TARGETS:= $1_ALL_COPY_TARGETS :=
$$(foreach i,$$($1_ALL_COPIES),$$(eval $$(call add_file_to_copy,$1,$$i))) $$(foreach i, $$($1_ALL_COPIES), $$(eval $$(call add_file_to_copy,$1,$$i)))
# Now we can depend on $$($1_ALL_COPY_TARGETS) to copy all files! # Now we can depend on $$($1_ALL_COPY_TARGETS) to copy all files!
endif endif
# Find all property files to be copied and cleaned from source to bin. # Find all property files to be copied and cleaned from source to bin.
ifneq (,$$($1_CLEAN)$$($1_CLEAN_FILES)) ifneq ($$($1_CLEAN)$$($1_CLEAN_FILES), )
# Search for all files to be copied. # Search for all files to be copied.
$1_ALL_CLEANS := $$(filter $$(addprefix %,$$($1_CLEAN)),$$($1_ALL_SRCS)) $1_ALL_CLEANS := $$(filter $$(addprefix %, $$($1_CLEAN)), $$($1_ALL_SRCS))
# Clean these explicitly # Clean these explicitly
$1_ALL_CLEANS += $$($1_CLEAN_FILES) $1_ALL_CLEANS += $$($1_CLEAN_FILES)
# Copy and clean must also respect filters. # Copy and clean must also respect filters.
ifneq (,$$($1_INCLUDE_PATTERN)) ifneq ($$($1_INCLUDE_PATTERN), )
$1_ALL_CLEANS := $$(filter $$($1_INCLUDE_PATTERN),$$($1_ALL_CLEANS)) $1_ALL_CLEANS := $$(filter $$($1_INCLUDE_PATTERN), $$($1_ALL_CLEANS))
endif endif
ifneq (,$$($1_EXCLUDE_PATTERN)) ifneq ($$($1_EXCLUDE_PATTERN), )
$1_ALL_CLEANS := $$(filter-out $$($1_EXCLUDE_PATTERN),$$($1_ALL_CLEANS)) $1_ALL_CLEANS := $$(filter-out $$($1_EXCLUDE_PATTERN), $$($1_ALL_CLEANS))
endif endif
# Filter out any excluded translations # Filter out any excluded translations
ifneq ($$($1_KEEP_ALL_TRANSLATIONS), true) ifneq ($$($1_KEEP_ALL_TRANSLATIONS), true)
$1_ALL_CLEANS := $$(call FilterExcludedTranslations, $$($1_ALL_CLEANS), .properties) $1_ALL_CLEANS := $$(call FilterExcludedTranslations, $$($1_ALL_CLEANS), .properties)
endif endif
ifneq (,$$($1_ALL_CLEANS)) ifneq ($$($1_ALL_CLEANS), )
# Yep, there are files to be copied and cleaned! # Yep, there are files to be copied and cleaned!
$1_ALL_COPY_CLEAN_TARGETS:= $1_ALL_COPY_CLEAN_TARGETS :=
$$(foreach i,$$($1_ALL_CLEANS),$$(eval $$(call add_file_to_clean,$1,$$i))) $$(foreach i, $$($1_ALL_CLEANS), $$(eval $$(call add_file_to_clean,$1,$$i)))
# Now we can depend on $$($1_ALL_COPY_CLEAN_TARGETS) to copy all files! # Now we can depend on $$($1_ALL_COPY_CLEAN_TARGETS) to copy all files!
endif endif
endif endif
# Create a sed expression to remove the source roots and to replace / with . # Create a sed expression to remove the source roots and to replace / with .
# and remove .java at the end. # and remove .java at the end.
$1_REWRITE_INTO_CLASSES:=$$(foreach i,$$($1_SRC),-e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g' $1_REWRITE_INTO_CLASSES := $$(foreach i, $$($1_SRC), -e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
$1_COMPILE_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch $1_COMPILE_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch
$1_FILELIST := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch.filelist $1_FILELIST := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch.filelist
@ -431,7 +431,7 @@ define SetupJavaCompilationBody
# Put headers in a temp dir to filter out those that actually # Put headers in a temp dir to filter out those that actually
# changed before copying them to the real header dir. # changed before copying them to the real header dir.
ifneq (,$$($1_HEADERS)) ifneq ($$($1_HEADERS), )
$1_HEADERS_ARG := -h $$($1_HEADERS).$1.tmp $1_HEADERS_ARG := -h $$($1_HEADERS).$1.tmp
$$($1_HEADERS)/_the.$1_headers: $$($1_COMPILE_TARGET) $$($1_HEADERS)/_the.$1_headers: $$($1_COMPILE_TARGET)
@ -503,27 +503,27 @@ define SetupJavaCompilationBody
$$($1_HEADER_TARGETS) $$($1_HEADER_TARGETS)
# Check if a jar file was specified, then setup the rules for the jar. # Check if a jar file was specified, then setup the rules for the jar.
ifneq (,$$($1_JAR)) ifneq ($$($1_JAR), )
# If no suffixes was explicitly set for this jar file. # If no suffixes was explicitly set for this jar file.
# Use class and the cleaned/copied properties file suffixes as the default # Use class and the cleaned/copied properties file suffixes as the default
# for the types of files to be put into the jar. # for the types of files to be put into the jar.
ifeq (,$$($1_SUFFIXES)) ifeq ($$($1_SUFFIXES), )
$1_SUFFIXES:=.class $$($1_CLEAN) $$($1_COPY) $1_SUFFIXES := .class $$($1_CLEAN) $$($1_COPY)
endif endif
$$(eval $$(call SetupJarArchive, ARCHIVE_$1, \ $$(eval $$(call SetupJarArchive, ARCHIVE_$1, \
DEPENDENCIES:=$$($1), \ DEPENDENCIES := $$($1), \
SRCS:=$$($1_BIN)$$($1_MODULE_SUBDIR), \ SRCS := $$($1_BIN)$$($1_MODULE_SUBDIR), \
SUFFIXES:=$$($1_SUFFIXES), \ SUFFIXES := $$($1_SUFFIXES), \
EXCLUDE:=$$($1_EXCLUDES), \ EXCLUDE := $$($1_EXCLUDES), \
INCLUDES:=$$($1_INCLUDES), \ INCLUDES := $$($1_INCLUDES), \
EXTRA_FILES:=$$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS), \ EXTRA_FILES := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS), \
JAR:=$$($1_JAR), \ JAR := $$($1_JAR), \
JARMAIN:=$$($1_JARMAIN), \ JARMAIN := $$($1_JARMAIN), \
MANIFEST:=$$($1_MANIFEST), \ MANIFEST := $$($1_MANIFEST), \
EXTRA_MANIFEST_ATTR:=$$($1_EXTRA_MANIFEST_ATTR), \ EXTRA_MANIFEST_ATTR := $$($1_EXTRA_MANIFEST_ATTR), \
JARINDEX:=$$($1_JARINDEX), \ JARINDEX := $$($1_JARINDEX), \
HEADERS:=$$($1_HEADERS), \ HEADERS := $$($1_HEADERS), \
)) ))
# Add jar to target list # Add jar to target list
@ -531,13 +531,13 @@ define SetupJavaCompilationBody
endif endif
# Check if a srczip was specified, then setup the rules for the srczip. # Check if a srczip was specified, then setup the rules for the srczip.
ifneq (,$$($1_SRCZIP)) ifneq ($$($1_SRCZIP), )
$$(eval $$(call SetupZipArchive, ZIP_ARCHIVE_$1, \ $$(eval $$(call SetupZipArchive, ZIP_ARCHIVE_$1, \
SRC:=$$($1_SRC), \ SRC := $$($1_SRC), \
ZIP:=$$($1_SRCZIP), \ ZIP := $$($1_SRCZIP), \
INCLUDES:=$$($1_INCLUDES), \ INCLUDES := $$($1_INCLUDES), \
EXCLUDES:=$$($1_EXCLUDES), \ EXCLUDES := $$($1_EXCLUDES), \
EXCLUDE_FILES:=$$($1_EXCLUDE_FILES))) EXCLUDE_FILES := $$($1_EXCLUDE_FILES)))
# Add zip to target list # Add zip to target list
$1 += $$($1_SRCZIP) $1 += $$($1_SRCZIP)

View File

@ -182,12 +182,12 @@ define AddJdkLibrary
$1_$2_NAME := $$(strip $$(lastword $$(subst :, , $3))) $1_$2_NAME := $$(strip $$(lastword $$(subst :, , $3)))
$1_$2_MODULE := $$(strip $$(patsubst %$$($1_$2_NAME), %, $3)) $1_$2_MODULE := $$(strip $$(patsubst %$$($1_$2_NAME), %, $3))
ifeq ($$(filter lib%, $$($1_$2_NAME)),) ifeq ($$(filter lib%, $$($1_$2_NAME)), )
$$(error Library name $$($1_$2_NAME) missing lib prefix in $1) $$(error Library name $$($1_$2_NAME) missing lib prefix in $1)
endif endif
$1_$2_NAME := $$(strip $$(patsubst lib%, %, $$($1_$2_NAME))) $1_$2_NAME := $$(strip $$(patsubst lib%, %, $$($1_$2_NAME)))
ifeq ($$($1_$2_MODULE),) ifeq ($$($1_$2_MODULE), )
$1_$2_MODULE := $$(MODULE) $1_$2_MODULE := $$(MODULE)
else else
$1_$2_MODULE := $$(strip $$(patsubst %:, %, $$($1_$2_MODULE))) $1_$2_MODULE := $$(strip $$(patsubst %:, %, $$($1_$2_MODULE)))

View File

@ -23,17 +23,17 @@
# questions. # questions.
# #
################################################################ ################################################################################
# MakeBase provides the core functionality needed and used by all makefiles. It # MakeBase provides the core functionality needed and used by all makefiles. It
# should be included by all makefiles. MakeBase provides essential # should be included by all makefiles. MakeBase provides essential
# functionality for named parameter functions, variable dependency, tool # functionality for named parameter functions, variable dependency, tool
# execution, logging and fixpath functionality. # execution, logging and fixpath functionality.
################################################################ ################################################################################
ifndef _MAKEBASE_GMK ifndef _MAKEBASE_GMK
_MAKEBASE_GMK := 1 _MAKEBASE_GMK := 1
ifeq ($(wildcard $(SPEC)),) ifeq ($(wildcard $(SPEC)), )
$(error MakeBase.gmk needs SPEC set to a proper spec.gmk) $(error MakeBase.gmk needs SPEC set to a proper spec.gmk)
endif endif
@ -49,16 +49,16 @@ endif
# When calling macros, the spaces between arguments are # When calling macros, the spaces between arguments are
# often semantically important! Sometimes we need to subst # often semantically important! Sometimes we need to subst
# spaces and commas, therefore we need the following macros. # spaces and commas, therefore we need the following macros.
X:= X :=
SPACE:=$(X) $(X) SPACE := $(X) $(X)
COMMA:=, COMMA := ,
DOLLAR:=$$ DOLLAR := $$
HASH:=\# HASH := \#
LEFT_PAREN:=( LEFT_PAREN := (
RIGHT_PAREN:=) RIGHT_PAREN := )
SQUOTE:=' SQUOTE := '
#' #'
DQUOTE:=" DQUOTE := "
#" #"
define NEWLINE define NEWLINE
@ -99,7 +99,7 @@ define SetupLogging
endif endif
endif endif
ifneq ($$(findstring $$(LOG_LEVEL), debug trace),) ifneq ($$(findstring $$(LOG_LEVEL), debug trace), )
SHELL := $$(SHELL) -x SHELL := $$(SHELL) -x
endif endif
@ -117,21 +117,21 @@ define SetupLogging
# The warn level can never be turned off # The warn level can never be turned off
LogWarn = $$(info $(LOG_PREFIX)$$(strip $$1)) LogWarn = $$(info $(LOG_PREFIX)$$(strip $$1))
LOG_WARN := LOG_WARN :=
ifneq ($$(findstring $$(LOG_LEVEL), info debug trace),) ifneq ($$(findstring $$(LOG_LEVEL), info debug trace), )
LogInfo = $$(info $(LOG_PREFIX)$$(strip $$1)) LogInfo = $$(info $(LOG_PREFIX)$$(strip $$1))
LOG_INFO := LOG_INFO :=
else else
LogInfo = LogInfo =
LOG_INFO := > /dev/null LOG_INFO := > /dev/null
endif endif
ifneq ($$(findstring $$(LOG_LEVEL), debug trace),) ifneq ($$(findstring $$(LOG_LEVEL), debug trace), )
LogDebug = $$(info $(LOG_PREFIX)$$(strip $$1)) LogDebug = $$(info $(LOG_PREFIX)$$(strip $$1))
LOG_DEBUG := LOG_DEBUG :=
else else
LogDebug = LogDebug =
LOG_DEBUG := > /dev/null LOG_DEBUG := > /dev/null
endif endif
ifneq ($$(findstring $$(LOG_LEVEL), trace),) ifneq ($$(findstring $$(LOG_LEVEL), trace), )
LogTrace = $$(info $(LOG_PREFIX)$$(strip $$1)) LogTrace = $$(info $(LOG_PREFIX)$$(strip $$1))
LOG_TRACE := LOG_TRACE :=
else else
@ -164,14 +164,14 @@ PARAM_SEQUENCE := $(call sequence, 2, $(MAX_PARAMS))
# BAR := some parameter value, \ # BAR := some parameter value, \
# )) # ))
define NamedParamsMacroTemplate define NamedParamsMacroTemplate
$(if $($(MAX_PARAMS)),$(error Internal makefile error: \ $(if $($(MAX_PARAMS)), $(error Internal makefile error: \
Too many named arguments to macro, please update MAX_PARAMS in MakeBase.gmk)) Too many named arguments to macro, please update MAX_PARAMS in MakeBase.gmk))
# Iterate over 2 3 4... and evaluate the named parameters with $1_ as prefix # Iterate over 2 3 4... and evaluate the named parameters with $1_ as prefix
$(foreach i,$(PARAM_SEQUENCE), $(if $(strip $($i)),\ $(foreach i, $(PARAM_SEQUENCE), $(if $(strip $($i)), \
$(strip $1)_$(strip $(call EscapeHash, $(call DoubleDollar, $($i))))$(NEWLINE))) $(strip $1)_$(strip $(call EscapeHash, $(call DoubleDollar, $($i))))$(NEWLINE)))
# Debug print all named parameter names and values # Debug print all named parameter names and values
$(if $(findstring $(LOG_LEVEL), trace), \ $(if $(findstring $(LOG_LEVEL), trace), \
$(info $0 $(strip $1) $(foreach i,$(PARAM_SEQUENCE), \ $(info $0 $(strip $1) $(foreach i, $(PARAM_SEQUENCE), \
$(if $(strip $($i)),$(NEWLINE) $(strip [$i] $(if $(filter $(LOG_LEVEL), trace), \ $(if $(strip $($i)),$(NEWLINE) $(strip [$i] $(if $(filter $(LOG_LEVEL), trace), \
$($i), $(wordlist 1, 20, $($(i))) $(if $(word 21, $($(i))), ...))))))) $($i), $(wordlist 1, 20, $($(i))) $(if $(word 21, $($(i))), ...)))))))
@ -246,7 +246,7 @@ DependOnVariableFileName = \
# Param 1 - Name of variable # Param 1 - Name of variable
DependOnVariableWriteFile = \ DependOnVariableWriteFile = \
$(call MakeDir, $(dir $($1_filename))) \ $(call MakeDir, $(dir $($1_filename))) \
$(call WriteFile, $1_old:=$(call DoubleDollar,$(call EscapeHash,$($1))), \ $(call WriteFile, $1_old := $(call DoubleDollar,$(call EscapeHash,$($1))), \
$($1_filename)) \ $($1_filename)) \
# Does the actual work with parameters stripped. # Does the actual work with parameters stripped.
@ -260,7 +260,7 @@ DependOnVariableHelper = \
$(eval $1_filename := $(call DependOnVariableFileName, $1, $2)) \ $(eval $1_filename := $(call DependOnVariableFileName, $1, $2)) \
$(if $(wildcard $($1_filename)), \ $(if $(wildcard $($1_filename)), \
$(eval include $($1_filename)) \ $(eval include $($1_filename)) \
$(if $(call equals, $(strip $($1)), $(strip $($1_old))),,\ $(if $(call equals, $(strip $($1)), $(strip $($1_old))),, \
$(if $(findstring $(LOG_LEVEL), trace), \ $(if $(findstring $(LOG_LEVEL), trace), \
$(info NewVariable $1: >$(strip $($1))<) \ $(info NewVariable $1: >$(strip $($1))<) \
$(info OldVariable $1: >$(strip $($1_old))<) \ $(info OldVariable $1: >$(strip $($1_old))<) \

View File

@ -23,7 +23,7 @@
# questions. # questions.
# #
ifeq (,$(_MAKEBASE_GMK)) ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including MakeIO.gmk) $(error You must include MakeBase.gmk prior to including MakeIO.gmk)
endif endif
@ -67,22 +67,22 @@ else # HAS_FILE_FUNCTION = false
$(eval compress_paths += \ $(eval compress_paths += \
$(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-post-compress.incl))) $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-post-compress.incl)))
decompress_paths=$(SED) -f $(TOPDIR)/make/common/support/ListPathsSafely-uncompress.sed \ decompress_paths = $(SED) -f $(TOPDIR)/make/common/support/ListPathsSafely-uncompress.sed \
-e 's|X99|\\n|g' \ -e 's|X99|\\n|g' \
-e 's|X98|$(OUTPUTDIR)|g' -e 's|X97|$(TOPDIR)|g' \ -e 's|X98|$(OUTPUTDIR)|g' -e 's|X97|$(TOPDIR)|g' \
-e 's|X00|X|g' -e 's|X00|X|g'
ListPathsSafely_IfPrintf = \ ListPathsSafely_IfPrintf = \
$(if $(word $3,$($(strip $1))), \ $(if $(word $3, $($(strip $1))), \
$(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \ $(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \
$(call compress_paths, $(wordlist $3,$4,$($(strip $1))))))\n" \ $(call compress_paths, $(wordlist $3, $4, $($(strip $1))))))\n" \
| $(decompress_paths) >> $2)) | $(decompress_paths) >> $2))
# Param 1 - Name of variable containing paths/arguments to output # Param 1 - Name of variable containing paths/arguments to output
# Param 2 - File to print to # Param 2 - File to print to
# Param 3 - Set to true to append to file instead of overwriting # Param 3 - Set to true to append to file instead of overwriting
define ListPathsSafely define ListPathsSafely
ifneq (,$$(word 30001,$$($$(strip $1)))) ifneq ($$(word 30001, $$($$(strip $1))), )
$$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!) $$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!)
endif endif
$$(call MakeDir, $$(dir $2)) $$(call MakeDir, $$(dir $2))

View File

@ -177,8 +177,8 @@ $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
$(call MakeTargetDir) $(call MakeTargetDir)
$(RM) $@ $(RM) $@
$(foreach m, $(MODULE_INFOS), \ $(foreach m, $(MODULE_INFOS), \
( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) :=" && \ ( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) := " && \
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\ $(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) ' \
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \ BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
/^ *requires/ { sub(/;/, ""); \ /^ *requires/ { sub(/;/, ""); \
sub(/requires /, " "); \ sub(/requires /, " "); \
@ -191,8 +191,8 @@ $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
gsub(/\r/, ""); \ gsub(/\r/, ""); \
printf(" %s", $$0) } \ printf(" %s", $$0) } \
END { printf("\n") }' $m && \ END { printf("\n") }' $m && \
$(PRINTF) "TRANSITIVE_MODULES_$(call GetModuleNameFromModuleInfo, $m) :=" && \ $(PRINTF) "TRANSITIVE_MODULES_$(call GetModuleNameFromModuleInfo, $m) := " && \
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\ $(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) ' \
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \ BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
/^ *requires *transitive/ { \ /^ *requires *transitive/ { \
sub(/;/, ""); \ sub(/;/, ""); \

View File

@ -182,7 +182,7 @@ define SetupNativeCompilationBody
# Now call CreateCompiledNativeFile for each source file we are going to compile. # Now call CreateCompiledNativeFile for each source file we are going to compile.
$$(foreach file, $$($1_SRCS), \ $$(foreach file, $$($1_SRCS), \
$$(eval $$(call CreateCompiledNativeFile,$1_$$(notdir $$(file)),\ $$(eval $$(call CreateCompiledNativeFile,$1_$$(notdir $$(file)), \
FILE := $$(file), \ FILE := $$(file), \
BASE := $1, \ BASE := $1, \
)) \ )) \

View File

@ -22,7 +22,7 @@
# questions. # questions.
# #
ifeq (,$(_MAKEBASE_GMK)) ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including ProcessMarkdown.gmk) $(error You must include MakeBase.gmk prior to including ProcessMarkdown.gmk)
endif endif
@ -92,7 +92,7 @@ define ProcessMarkdown
-t $$($1_FORMAT) --eol=lf --standalone \ -t $$($1_FORMAT) --eol=lf --standalone \
$$($1_$2_CSS_OPTION) $$($1_$2_OPTIONS_FROM_SRC) $$($1_$2_OPTIONS) \ $$($1_$2_CSS_OPTION) $$($1_$2_OPTIONS_FROM_SRC) $$($1_$2_OPTIONS) \
'$$($1_$2_PANDOC_INPUT)' -o '$$($1_$2_PANDOC_OUTPUT)') '$$($1_$2_PANDOC_INPUT)' -o '$$($1_$2_PANDOC_OUTPUT)')
ifneq ($$(findstring $$(LOG_LEVEL), debug trace),) ifneq ($$(findstring $$(LOG_LEVEL), debug trace), )
TOO_LONG_LINES=`$$(GREP) -E -e '^.{80}.+$$$$' $$<` || true ; \ TOO_LONG_LINES=`$$(GREP) -E -e '^.{80}.+$$$$' $$<` || true ; \
if [ "x$$$$TOO_LONG_LINES" != x ]; then \ if [ "x$$$$TOO_LONG_LINES" != x ]; then \
$$(ECHO) "Warning: Unsuitable markdown in $$<:" ; \ $$(ECHO) "Warning: Unsuitable markdown in $$<:" ; \

View File

@ -26,7 +26,7 @@
ifndef _TEST_FILES_COMPILATION_GMK ifndef _TEST_FILES_COMPILATION_GMK
_TEST_FILES_COMPILATION_GMK := 1 _TEST_FILES_COMPILATION_GMK := 1
ifeq (,$(_MAKEBASE_GMK)) ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including TestFilesCompilation.gmk) $(error You must include MakeBase.gmk prior to including TestFilesCompilation.gmk)
endif endif
@ -95,7 +95,7 @@ define SetupTestFilesCompilationBody
TEST_CFLAGS := -I$(TOPDIR)/test/lib/native TEST_CFLAGS := -I$(TOPDIR)/test/lib/native
# Setup a compilation for each and every one of them # Setup a compilation for each and every one of them
$$(foreach file, $$($1_FILTERED_FILE_LIST),\ $$(foreach file, $$($1_FILTERED_FILE_LIST), \
$$(eval name := $$(strip $$(basename $$(notdir $$(file))))) \ $$(eval name := $$(strip $$(basename $$(notdir $$(file))))) \
$$(eval unprefixed_name := $$(patsubst $$($1_PREFIX)%, %, $$(name))) \ $$(eval unprefixed_name := $$(patsubst $$($1_PREFIX)%, %, $$(name))) \
$$(eval $$(call SetupJdkNativeCompilation, BUILD_TEST_$$(name), \ $$(eval $$(call SetupJdkNativeCompilation, BUILD_TEST_$$(name), \
@ -122,9 +122,9 @@ define SetupTestFilesCompilationBody
JDK_LIBS := $$($1_JDK_LIBS_$$(name)), \ JDK_LIBS := $$($1_JDK_LIBS_$$(name)), \
LIBS := $$($1_LIBS_$$(name)), \ LIBS := $$($1_LIBS_$$(name)), \
DEFAULT_VERSIONINFO_RESOURCE := false, \ DEFAULT_VERSIONINFO_RESOURCE := false, \
OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)),$$($1_OPTIMIZATION_$$(name)),LOW), \ OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)), $$($1_OPTIMIZATION_$$(name)), LOW), \
COPY_DEBUG_SYMBOLS := $$($1_COPY_DEBUG_SYMBOLS), \ COPY_DEBUG_SYMBOLS := $$($1_COPY_DEBUG_SYMBOLS), \
STRIP_SYMBOLS := $$(if $$($1_STRIP_SYMBOLS_$$(name)),$$($1_STRIP_SYMBOLS_$$(name)),false), \ STRIP_SYMBOLS := $$(if $$($1_STRIP_SYMBOLS_$$(name)), $$($1_STRIP_SYMBOLS_$$(name)), false), \
BUILD_INFO_LOG_MACRO := LogInfo, \ BUILD_INFO_LOG_MACRO := LogInfo, \
)) \ )) \
$$(eval $1 += $$(BUILD_TEST_$$(name)) ) \ $$(eval $1 += $$(BUILD_TEST_$$(name)) ) \

View File

@ -23,7 +23,7 @@
# questions. # questions.
# #
ifeq (,$(_MAKEBASE_GMK)) ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including TextFileProcessing.gmk) $(error You must include MakeBase.gmk prior to including TextFileProcessing.gmk)
endif endif
@ -80,47 +80,47 @@ endef
SetupTextFileProcessing = $(NamedParamsMacroTemplate) SetupTextFileProcessing = $(NamedParamsMacroTemplate)
define SetupTextFileProcessingBody define SetupTextFileProcessingBody
ifneq ($$($1_SOURCE_FILES),) ifneq ($$($1_SOURCE_FILES), )
ifneq ($$($1_SOURCE_DIRS),) ifneq ($$($1_SOURCE_DIRS), )
$$(error Cannot use both SOURCE_FILES and SOURCE_DIRS (in $1)) $$(error Cannot use both SOURCE_FILES and SOURCE_DIRS (in $1))
endif endif
ifneq ($$($1_EXCLUDE_FILES)$$($1_INCLUDE_FILES),) ifneq ($$($1_EXCLUDE_FILES)$$($1_INCLUDE_FILES), )
$$(error Cannot INCLUDE/EXCLUDE_FILES with SOURCE_FILES (in $1)) $$(error Cannot INCLUDE/EXCLUDE_FILES with SOURCE_FILES (in $1))
endif endif
else else
ifeq ($$($1_SOURCE_DIRS),) ifeq ($$($1_SOURCE_DIRS), )
$$(error Must specify either SOURCE_FILES or SOURCE_DIRS (in $1)) $$(error Must specify either SOURCE_FILES or SOURCE_DIRS (in $1))
endif endif
# Find all files in the source trees. Sort to remove duplicates. # Find all files in the source trees. Sort to remove duplicates.
$$(foreach src, $$($1_SOURCE_DIRS), $$(if $$(wildcard $$(src)), , \ $$(foreach src, $$($1_SOURCE_DIRS), $$(if $$(wildcard $$(src)), , \
$$(error SOURCE_DIRS contains missing directory $$(src) (in $1)))) $$(error SOURCE_DIRS contains missing directory $$(src) (in $1))))
ifneq ($$($1_SOURCE_BASE_DIR),) ifneq ($$($1_SOURCE_BASE_DIR), )
$$(foreach src, $$($1_SOURCE_DIRS), \ $$(foreach src, $$($1_SOURCE_DIRS), \
$$(if $$(findstring $$($1_SOURCE_BASE_DIR), $$(src)), , \ $$(if $$(findstring $$($1_SOURCE_BASE_DIR), $$(src)), , \
$$(error SOURCE_DIRS contains directory $$(src) outside \ $$(error SOURCE_DIRS contains directory $$(src) outside \
SOURCE_BASE_DIR $$($1_SOURCE_BASE_DIR) (in $1)))) SOURCE_BASE_DIR $$($1_SOURCE_BASE_DIR) (in $1))))
endif endif
$1_SOURCE_FILES := $$(sort $$(call FindFiles,$$($1_SOURCE_DIRS))) $1_SOURCE_FILES := $$(sort $$(call FindFiles,$$($1_SOURCE_DIRS)))
$1_EXCLUDE_FILES:=$$(foreach i,$$($1_SOURCE_DIRS),$$(addprefix $$i/,$$($1_EXCLUDE_FILES))) $1_EXCLUDE_FILES := $$(foreach i, $$($1_SOURCE_DIRS), $$(addprefix $$i/, $$($1_EXCLUDE_FILES)))
$1_INCLUDE_FILES:=$$(foreach i,$$($1_SOURCE_DIRS),$$(addprefix $$i/,$$($1_INCLUDE_FILES))) $1_INCLUDE_FILES := $$(foreach i, $$($1_SOURCE_DIRS), $$(addprefix $$i/, $$($1_INCLUDE_FILES)))
$1_SOURCE_FILES := $$(filter-out $$($1_EXCLUDE_FILES),$$($1_SOURCE_FILES)) $1_SOURCE_FILES := $$(filter-out $$($1_EXCLUDE_FILES), $$($1_SOURCE_FILES))
ifneq (,$$(strip $$($1_INCLUDE_FILES))) ifneq ($$(strip $$($1_INCLUDE_FILES)), )
$1_SOURCE_FILES := $$(filter $$($1_INCLUDE_FILES),$$($1_SOURCE_FILES)) $1_SOURCE_FILES := $$(filter $$($1_INCLUDE_FILES), $$($1_SOURCE_FILES))
endif endif
ifeq (,$$($1_SOURCE_FILES)) ifeq ($$($1_SOURCE_FILES), )
$$(info No sources found for $1 when looking inside the dirs $$($1_SRC)) $$(info No sources found for $1 when looking inside the dirs $$($1_SRC))
endif endif
endif endif
ifneq ($$($1_REPLACEMENTS),) ifneq ($$($1_REPLACEMENTS), )
# We have a replacement request, prepare it for the recipe # We have a replacement request, prepare it for the recipe
ifneq ($$(findstring /,$$($1_REPLACEMENTS)),) ifneq ($$(findstring /, $$($1_REPLACEMENTS)), )
# Cannot use / as separator # Cannot use / as separator
ifneq ($$(findstring @,$$($1_REPLACEMENTS)),) ifneq ($$(findstring @, $$($1_REPLACEMENTS)), )
# Cannot use @ as separator # Cannot use @ as separator
ifneq ($$(findstring |,$$($1_REPLACEMENTS)),) ifneq ($$(findstring |, $$($1_REPLACEMENTS)), )
# Cannot use | as separator # Cannot use | as separator
ifneq ($$(findstring !,$$($1_REPLACEMENTS)),) ifneq ($$(findstring !, $$($1_REPLACEMENTS)), )
# Cannot use ! as separator. Give up. # Cannot use ! as separator. Give up.
$$(error No suitable sed separator can be found for $1. Tested /, @, | and !) $$(error No suitable sed separator can be found for $1. Tested /, @, | and !)
else else
@ -161,7 +161,7 @@ define SetupTextFileProcessingBody
$1_REPLACEMENTS_COMMAND_LINE := $(CAT) $1_REPLACEMENTS_COMMAND_LINE := $(CAT)
endif endif
ifneq ($$($1_INCLUDES),) ifneq ($$($1_INCLUDES), )
# We have a include request, prepare it for the recipe. # We have a include request, prepare it for the recipe.
# Convert an INCLUDE like this PATTERN_1 => file1 ; PATTERN_2 => file2 ; # Convert an INCLUDE like this PATTERN_1 => file1 ; PATTERN_2 => file2 ;
# into an awk script fragment like this: # into an awk script fragment like this:
@ -190,7 +190,7 @@ define SetupTextFileProcessingBody
# Reset target list before populating it # Reset target list before populating it
$1 := $1 :=
ifneq ($$($1_OUTPUT_FILE),) ifneq ($$($1_OUTPUT_FILE), )
ifneq ($$(words $$($1_SOURCE_FILES)), 1) ifneq ($$(words $$($1_SOURCE_FILES)), 1)
$$(error Cannot use OUTPUT_FILE for more than one source file (in $1)) $$(error Cannot use OUTPUT_FILE for more than one source file (in $1))
endif endif
@ -199,12 +199,12 @@ define SetupTextFileProcessingBody
$$(eval $$(call SetupSingleTextFileForProcessing,$1, $$($1_SOURCE_FILES), \ $$(eval $$(call SetupSingleTextFileForProcessing,$1, $$($1_SOURCE_FILES), \
$$(patsubst %/, %, $$(dir $$($1_OUTPUT_FILE))), $$(notdir $$($1_OUTPUT_FILE)))) $$(patsubst %/, %, $$(dir $$($1_OUTPUT_FILE))), $$(notdir $$($1_OUTPUT_FILE))))
else else
ifeq ($$($1_OUTPUT_DIR),) ifeq ($$($1_OUTPUT_DIR), )
$$(error Neither OUTPUT_FILE nor OUTPUT_DIR was specified (in $1)) $$(error Neither OUTPUT_FILE nor OUTPUT_DIR was specified (in $1))
endif endif
# Now call add_native_source for each source file we are going to process. # Now call add_native_source for each source file we are going to process.
ifeq ($$($1_SOURCE_BASE_DIR),) ifeq ($$($1_SOURCE_BASE_DIR), )
# With no base dir specified, put all files in target dir, flattening any # With no base dir specified, put all files in target dir, flattening any
# hierarchies. Note that $1 is space sensitive and must disobey whitespace # hierarchies. Note that $1 is space sensitive and must disobey whitespace
# rules. # rules.

View File

@ -23,7 +23,7 @@
# questions. # questions.
# #
ifeq (,$(_MAKEBASE_GMK)) ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including Utils.gmk) $(error You must include MakeBase.gmk prior to including Utils.gmk)
endif endif
@ -36,7 +36,7 @@ endif
# String equals # String equals
equals = \ equals = \
$(if $(strip $1)$(strip $2),$(strip \ $(if $(strip $1)$(strip $2),$(strip \
$(and $(findstring $(strip $1),$(strip $2)),\ $(and $(findstring $(strip $1),$(strip $2)), \
$(findstring $(strip $2),$(strip $1)))), \ $(findstring $(strip $2),$(strip $1)))), \
true \ true \
) )
@ -64,7 +64,7 @@ uppercase = \
# Param 2 - ending number # Param 2 - ending number
sequence = \ sequence = \
$(wordlist $1, $2, $(strip \ $(wordlist $1, $2, $(strip \
$(eval SEQUENCE_COUNT :=) \ $(eval SEQUENCE_COUNT := ) \
$(call _sequence-do,$(strip $2)))) $(call _sequence-do,$(strip $2))))
_sequence-do = \ _sequence-do = \
@ -225,7 +225,7 @@ uniq = \
# whitespace-separated words in $1 is a substring. # whitespace-separated words in $1 is a substring.
containing = \ containing = \
$(strip \ $(strip \
$(foreach v,$(strip $2),\ $(foreach v,$(strip $2), \
$(call uniq,$(foreach p,$(strip $1),$(if $(findstring $p,$v),$v))))) $(call uniq,$(foreach p,$(strip $1),$(if $(findstring $p,$v),$v)))))
# Returns all whitespace-separated words in $2 where none of the # Returns all whitespace-separated words in $2 where none of the
@ -242,7 +242,7 @@ dups = \
# $1 - List of prefixes # $1 - List of prefixes
# $2 - List of elements to process # $2 - List of elements to process
remove-prefixes = \ remove-prefixes = \
$(strip $(if $1,$(patsubst $(firstword $1)%,%,\ $(strip $(if $1,$(patsubst $(firstword $1)%,%, \
$(call remove-prefixes,$(filter-out $(firstword $1),$1),$2)),$2)) $(call remove-prefixes,$(filter-out $(firstword $1),$1),$2)),$2))
################################################################################ ################################################################################

View File

@ -29,7 +29,7 @@ _ZIP_ARCHIVE_GMK := 1
# Depends on build tools for MakeZipReproducible # Depends on build tools for MakeZipReproducible
include ../ToolsJdk.gmk include ../ToolsJdk.gmk
ifeq (,$(_MAKEBASE_GMK)) ifeq ($(_MAKEBASE_GMK), )
$(error You must include MakeBase.gmk prior to including ZipArchive.gmk) $(error You must include MakeBase.gmk prior to including ZipArchive.gmk)
endif endif
@ -65,9 +65,9 @@ define SetupZipArchiveBody
# To avoid running find over too large sets of files, which causes make to crash # To avoid running find over too large sets of files, which causes make to crash
# on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set # on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set
# of directories to run find in, if available. # of directories to run find in, if available.
ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),) ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES), )
$1_FIND_LIST := $$(wildcard $$(foreach s,$$($1_SRC_SLASH), \ $1_FIND_LIST := $$(wildcard $$(foreach s, $$($1_SRC_SLASH), \
$$(addprefix $$s,$$($1_INCLUDES) $$($1_INCLUDE_FILES)))) $$(addprefix $$s, $$($1_INCLUDES) $$($1_INCLUDE_FILES))))
else else
$1_FIND_LIST := $$($1_SRC_SLASH) $1_FIND_LIST := $$($1_SRC_SLASH)
endif endif
@ -76,38 +76,38 @@ define SetupZipArchiveBody
# If asked to, follow symlinks in this find since that is what zip does. To do # If asked to, follow symlinks in this find since that is what zip does. To do
# this, we need to call ShellFindFiles directly. # this, we need to call ShellFindFiles directly.
ifeq ($$($1_FOLLOW_SYMLINKS), true) ifeq ($$($1_FOLLOW_SYMLINKS), true)
$1_ALL_SRCS := $$(call not-containing,_the.,$$(call ShellFindFiles,$$($1_FIND_LIST), , -L)) $1_ALL_SRCS := $$(call not-containing, _the., $$(call ShellFindFiles, $$($1_FIND_LIST), , -L))
else else
$1_ALL_SRCS := $$(call not-containing,_the.,$$(call FindFiles,$$($1_FIND_LIST))) $1_ALL_SRCS := $$(call not-containing, _the., $$(call FindFiles, $$($1_FIND_LIST)))
endif endif
# Filter on suffixes if set # Filter on suffixes if set
ifneq ($$($1_SUFFIXES),) ifneq ($$($1_SUFFIXES), )
$1_ALL_SRCS := $$(filter $$(addprefix %, $$($1_SUFFIXES)), $$($1_ALL_SRCS)) $1_ALL_SRCS := $$(filter $$(addprefix %, $$($1_SUFFIXES)), $$($1_ALL_SRCS))
endif endif
ifneq ($$($1_INCLUDES),) ifneq ($$($1_INCLUDES), )
ifneq ($$($1_SUFFIXES),) ifneq ($$($1_SUFFIXES), )
$1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES), \ $1_ZIP_INCLUDES := $$(foreach s, $$($1_SUFFIXES), \
$$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES)))) $$(addprefix -i$(SPACE)$(DQUOTE), $$(addsuffix /*$$s$(DQUOTE), $$($1_INCLUDES))))
else else
$1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES))) $1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE), $$(addsuffix /*$(DQUOTE), $$($1_INCLUDES)))
endif endif
else else
ifneq ($$($1_SUFFIXES),) ifneq ($$($1_SUFFIXES), )
$1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES), \ $1_ZIP_INCLUDES := $$(foreach s, $$($1_SUFFIXES), \
$$(addprefix -i$(SPACE)$(DQUOTE),*$$s$(DQUOTE))) $$(addprefix -i$(SPACE)$(DQUOTE), *$$s$(DQUOTE)))
endif endif
endif endif
ifneq ($$($1_INCLUDE_FILES),) ifneq ($$($1_INCLUDE_FILES), )
$1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES)) $1_ZIP_INCLUDES += $$(addprefix -i$(SPACE), $$($1_INCLUDE_FILES))
endif endif
ifneq ($$($1_EXCLUDES),) ifneq ($$($1_EXCLUDES), )
$1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES))) $1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE), $$(addsuffix /*$(DQUOTE), $$($1_EXCLUDES)))
$1_SRC_EXCLUDES := $$(foreach s,$$($1_SRC_SLASH),$$(addprefix $$s,$$(addsuffix /%,$$($1_EXCLUDES)))) $1_SRC_EXCLUDES := $$(foreach s, $$($1_SRC_SLASH), $$(addprefix $$s, $$(addsuffix /%, $$($1_EXCLUDES))))
$1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_SRCS)) $1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDES), $$($1_ALL_SRCS))
endif endif
ifneq ($$($1_EXCLUDE_FILES),) ifneq ($$($1_EXCLUDE_FILES), )
$1_SRC_EXCLUDE_FILES := $$(addprefix %, $$($1_EXCLUDE_FILES)) $$($1_EXCLUDE_FILES) $1_SRC_EXCLUDE_FILES := $$(addprefix %, $$($1_EXCLUDE_FILES)) $$($1_EXCLUDE_FILES)
$1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDE_FILES), $$($1_ALL_SRCS)) $1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDE_FILES), $$($1_ALL_SRCS))
$$(foreach s, $$($1_SRC_SLASH), \ $$(foreach s, $$($1_SRC_SLASH), \
@ -134,7 +134,7 @@ define SetupZipArchiveBody
endif endif
# Use a slightly shorter name for logging, but with enough path to identify this zip. # Use a slightly shorter name for logging, but with enough path to identify this zip.
$1_NAME:=$$(subst $$(OUTPUTDIR)/,,$$($1_ZIP)) $1_NAME := $$(subst $$(OUTPUTDIR)/,,$$($1_ZIP))
# Now $1_ALL_SRCS should contain all sources that are going to be put into the zip. # Now $1_ALL_SRCS should contain all sources that are going to be put into the zip.
# I.e. the zip -i and -x options should match the filtering done in the makefile. # I.e. the zip -i and -x options should match the filtering done in the makefile.
@ -167,7 +167,7 @@ define SetupZipArchiveBody
) \ ) \
) \ ) \
) )
$$(foreach s,$$($1_SRC_SLASH), $$(call ExecuteWithLog, \ $$(foreach s, $$($1_SRC_SLASH), $$(call ExecuteWithLog, \
$$(SUPPORT_OUTPUTDIR)/zip/$$(patsubst $$(OUTPUTDIR)/%,%, $$@), \ $$(SUPPORT_OUTPUTDIR)/zip/$$(patsubst $$(OUTPUTDIR)/%,%, $$@), \
(cd $$s && $(ZIPEXE) -qru $$($1_ZIP_OPTIONS) $$@ . \ (cd $$s && $(ZIPEXE) -qru $$($1_ZIP_OPTIONS) $$@ . \
$$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* \ $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* \

View File

@ -41,10 +41,10 @@
define WriteCompileCommandsFragment define WriteCompileCommandsFragment
$(call LogInfo, Creating compile commands fragment for $(notdir $3)) $(call LogInfo, Creating compile commands fragment for $(notdir $3))
$(call MakeDir, $(dir $1)) $(call MakeDir, $(dir $1))
$(call WriteFile,{ \ $(call WriteFile, { \
"directory": "$(strip $(call FixPath, $2))"$(COMMA) \ "directory": "$(strip $(call FixPath, $2))"$(COMMA) \
"file": "$(strip $(call FixPath, $3))"$(COMMA) \ "file": "$(strip $(call FixPath, $3))"$(COMMA) \
"command": "$(strip $(subst $(DQUOTE),\$(DQUOTE),$(subst \,\\,\ "command": "$(strip $(subst $(DQUOTE),\$(DQUOTE),$(subst \,\\, \
$(subst $(FIXPATH),,$(call FixPath, $4)))))" \ $(subst $(FIXPATH),,$(call FixPath, $4)))))" \
}$(COMMA), \ }$(COMMA), \
$1) $1)
@ -344,7 +344,7 @@ define CreateWindowsResourceFile
$(ECHO) $$($1_RES): \\ > $$($1_RES_DEPS_FILE) ; \ $(ECHO) $$($1_RES): \\ > $$($1_RES_DEPS_FILE) ; \
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX).log \ $(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX).log \
>> $$($1_RES_DEPS_FILE) ; \ >> $$($1_RES_DEPS_FILE) ; \
$(ECHO) >> $$($1_RES_DEPS_FILE) ;\ $(ECHO) >> $$($1_RES_DEPS_FILE) ; \
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_RES_DEPS_FILE) \ $(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_RES_DEPS_FILE) \
> $$($1_RES_DEPS_TARGETS_FILE) > $$($1_RES_DEPS_TARGETS_FILE)
endif endif

View File

@ -81,7 +81,7 @@ $(info target_platforms $(target_platforms))
all compile : $(platforms) all compile : $(platforms)
ifeq (,$(SKIP_ME)) ifeq ($(SKIP_ME), )
$(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me))) $(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me)))
endif endif

View File

@ -23,7 +23,7 @@
# questions. # questions.
# #
########################################################################################## ################################################################################
# #
# Workhorse makefile for creating ONE cross compiler # Workhorse makefile for creating ONE cross compiler
# Needs either to be from BUILD -> BUILD OR have # Needs either to be from BUILD -> BUILD OR have
@ -92,7 +92,7 @@ else
$(error Unknown base OS $(BASE_OS)) $(error Unknown base OS $(BASE_OS))
endif endif
########################################################################################## ################################################################################
# Define external dependencies # Define external dependencies
# Latest that could be made to work. # Latest that could be made to work.
@ -223,7 +223,7 @@ RPM_LIST := \
systemtap-sdt-devel \ systemtap-sdt-devel \
# #
########################################################################################## ################################################################################
# Define common directories and files # Define common directories and files
# Ensure we have 32-bit libs also for x64. We enable mixed-mode. # Ensure we have 32-bit libs also for x64. We enable mixed-mode.
@ -258,7 +258,7 @@ download-rpms:
wget -r -np -nd $(patsubst %, -A "*%*.rpm", $(RPM_LIST)) $(BASE_URL) wget -r -np -nd $(patsubst %, -A "*%*.rpm", $(RPM_LIST)) $(BASE_URL)
endif endif
########################################################################################## ################################################################################
# Unpack source packages # Unpack source packages
# Generate downloading + unpacking of sources. # Generate downloading + unpacking of sources.
@ -285,7 +285,7 @@ endef
# Download and unpack all source packages # Download and unpack all source packages
$(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC GDB,$(eval $(call Download,$(p)))) $(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC GDB,$(eval $(call Download,$(p))))
########################################################################################## ################################################################################
# Unpack RPMS # Unpack RPMS
RPM_ARCHS := $(ARCH) noarch RPM_ARCHS := $(ARCH) noarch
@ -324,7 +324,7 @@ endef
$(foreach p,$(RPM_FILE_LIST),$(eval $(call unrpm,$(p)))) $(foreach p,$(RPM_FILE_LIST),$(eval $(call unrpm,$(p))))
########################################################################################## ################################################################################
# Note: MUST create a <sysroot>/usr/lib even if not really needed. # Note: MUST create a <sysroot>/usr/lib even if not really needed.
# gcc will use a path relative to it to resolve lib64. (x86_64). # gcc will use a path relative to it to resolve lib64. (x86_64).
@ -344,7 +344,7 @@ $(libs) : $(rpms)
@mkdir -p $(SYSROOT)/usr/lib @mkdir -p $(SYSROOT)/usr/lib
@touch $@ @touch $@
########################################################################################## ################################################################################
# Create links for ffi header files so that they become visible by default when using the # Create links for ffi header files so that they become visible by default when using the
# devkit. # devkit.
ifeq ($(ARCH), x86_64) ifeq ($(ARCH), x86_64)
@ -357,12 +357,12 @@ ifeq ($(ARCH), x86_64)
SYSROOT_LINKS += $(SYSROOT)/usr/include/ffi.h $(SYSROOT)/usr/include/ffitarget.h SYSROOT_LINKS += $(SYSROOT)/usr/include/ffi.h $(SYSROOT)/usr/include/ffitarget.h
endif endif
########################################################################################## ################################################################################
# Define marker files for each source package to be compiled # Define marker files for each source package to be compiled
$(foreach t,binutils mpfr gmp mpc gcc ccache gdb,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done)) $(foreach t,binutils mpfr gmp mpc gcc ccache gdb,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done))
########################################################################################## ################################################################################
# Default base config # Default base config
CONFIG = --target=$(TARGET) \ CONFIG = --target=$(TARGET) \
@ -390,7 +390,7 @@ endif
TOOLS ?= $(call declare_tools,_FOR_TARGET,$(TARGET)-) TOOLS ?= $(call declare_tools,_FOR_TARGET,$(TARGET)-)
########################################################################################## ################################################################################
# Create a TARGET bfd + libiberty only. # Create a TARGET bfd + libiberty only.
# Configure one or two times depending on mulitlib arch. # Configure one or two times depending on mulitlib arch.
@ -424,7 +424,7 @@ $(bfdmakes) : CONFIG = --target=$(TARGET) \
$(bfdmakes) : TOOLS = $(call declare_tools,_FOR_TARGET,$(TARGET)-) $(call declare_tools,,$(TARGET)-) $(bfdmakes) : TOOLS = $(call declare_tools,_FOR_TARGET,$(TARGET)-) $(call declare_tools,,$(TARGET)-)
########################################################################################## ################################################################################
$(gcc) \ $(gcc) \
$(binutils) \ $(binutils) \
@ -591,7 +591,7 @@ else
@echo 'done' @echo 'done'
endif endif
########################################################################################## ################################################################################
# very straightforward. just build a ccache. it is only for host. # very straightforward. just build a ccache. it is only for host.
$(BUILDDIR)/$(ccache_ver)/Makefile \ $(BUILDDIR)/$(ccache_ver)/Makefile \
: $(CCACHE_CFG) : $(CCACHE_CFG)
@ -606,7 +606,7 @@ $(BUILDDIR)/$(ccache_ver)/Makefile \
gccpatch = $(TARGETDIR)/gcc-patched gccpatch = $(TARGETDIR)/gcc-patched
########################################################################################## ################################################################################
# For some reason cpp is not created as a target-compiler # For some reason cpp is not created as a target-compiler
ifeq ($(HOST),$(TARGET)) ifeq ($(HOST),$(TARGET))
$(gccpatch) : $(gcc) link_libs $(gccpatch) : $(gcc) link_libs
@ -621,7 +621,7 @@ ifeq ($(HOST),$(TARGET))
@touch $@ @touch $@
@echo 'done' @echo 'done'
########################################################################################## ##############################################################################
# Ugly at best. Seems that when we compile host->host compiler, that are NOT # Ugly at best. Seems that when we compile host->host compiler, that are NOT
# the BUILD compiler, the result will not try searching for libs in package root. # the BUILD compiler, the result will not try searching for libs in package root.
# "Solve" this by create links from the target libdirs to where they are. # "Solve" this by create links from the target libdirs to where they are.
@ -641,7 +641,7 @@ else
@echo 'done' @echo 'done'
endif endif
########################################################################################## ################################################################################
# Build in two steps. # Build in two steps.
# make <default> # make <default>
# make install. # make install.
@ -656,7 +656,7 @@ $(TARGETDIR)/%.done : $(BUILDDIR)/%/Makefile
@touch $@ @touch $@
@echo 'done' @echo 'done'
########################################################################################## ################################################################################
$(PREFIX)/devkit.info: $(PREFIX)/devkit.info:
@echo 'Creating devkit.info in the root of the kit' @echo 'Creating devkit.info in the root of the kit'
@ -670,7 +670,7 @@ $(PREFIX)/devkit.info:
echo 'DEVKIT_SYSROOT="$$DEVKIT_ROOT/$(TARGET)/sysroot"' >> $@ echo 'DEVKIT_SYSROOT="$$DEVKIT_ROOT/$(TARGET)/sysroot"' >> $@
echo 'DEVKIT_EXTRA_PATH="$$DEVKIT_ROOT/bin"' >> $@ echo 'DEVKIT_EXTRA_PATH="$$DEVKIT_ROOT/bin"' >> $@
########################################################################################## ################################################################################
# Copy these makefiles into the root of the kit # Copy these makefiles into the root of the kit
$(PREFIX)/Makefile: ./Makefile $(PREFIX)/Makefile: ./Makefile
rm -rf $@ rm -rf $@
@ -686,7 +686,7 @@ $(PREFIX)/Tars.gmk: ./Tars.gmk
THESE_MAKEFILES := $(PREFIX)/Makefile $(PREFIX)/Tools.gmk $(PREFIX)/Tars.gmk THESE_MAKEFILES := $(PREFIX)/Makefile $(PREFIX)/Tools.gmk $(PREFIX)/Tars.gmk
########################################################################################## ################################################################################
ifeq ($(TARGET), $(HOST)) ifeq ($(TARGET), $(HOST))
# To build with dtrace support, the build needs access to the dtrace executable from the # To build with dtrace support, the build needs access to the dtrace executable from the
@ -706,7 +706,7 @@ ifeq ($(TARGET), $(HOST))
ld.gold nm objcopy objdump ranlib readelf size strings strip) ld.gold nm objcopy objdump ranlib readelf size strings strip)
endif endif
########################################################################################## ################################################################################
bfdlib : $(bfdlib) bfdlib : $(bfdlib)
binutils : $(binutils) binutils : $(binutils)

View File

@ -37,7 +37,8 @@ ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupCopyFiles, COPY_LIBS_LIB, \ $(eval $(call SetupCopyFiles, COPY_LIBS_LIB, \
SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \ SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
DEST := $(JDK_OUTPUTDIR)/lib, \ DEST := $(JDK_OUTPUTDIR)/lib, \
FILES := $(filter %.lib, $(LIB_TARGETS)))) FILES := $(filter %.lib, $(LIB_TARGETS)), \
))
TARGETS += $(COPY_LIBS_BIN) $(COPY_LIBS_LIB) TARGETS += $(COPY_LIBS_BIN) $(COPY_LIBS_LIB)
else else

View File

@ -95,7 +95,7 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
CFLAGS := $(JVM_CFLAGS) \ CFLAGS := $(JVM_CFLAGS) \
-I$(GTEST_FRAMEWORK_SRC)/googletest/include \ -I$(GTEST_FRAMEWORK_SRC)/googletest/include \
-I$(GTEST_FRAMEWORK_SRC)/googlemock/include \ -I$(GTEST_FRAMEWORK_SRC)/googlemock/include \
$(addprefix -I,$(GTEST_TEST_SRC)), \ $(addprefix -I, $(GTEST_TEST_SRC)), \
CFLAGS_windows := -EHsc, \ CFLAGS_windows := -EHsc, \
CFLAGS_macosx := -DGTEST_OS_MAC=1, \ CFLAGS_macosx := -DGTEST_OS_MAC=1, \
DISABLED_WARNINGS_gcc := $(DISABLED_WARNINGS_gcc) \ DISABLED_WARNINGS_gcc := $(DISABLED_WARNINGS_gcc) \

View File

@ -282,7 +282,7 @@ ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
ifeq ($(JVM_VARIANT), $(JVM_VARIANT_MAIN)) ifeq ($(JVM_VARIANT), $(JVM_VARIANT_MAIN))
$(eval $(call SetupCopyFiles, COPY_JVM_LIB, \ $(eval $(call SetupCopyFiles, COPY_JVM_LIB, \
DEST := $(LIB_OUTPUTDIR), \ DEST := $(LIB_OUTPUTDIR), \
FILES :=$(BUILD_LIBJVM_IMPORT_LIBRARY), \ FILES := $(BUILD_LIBJVM_IMPORT_LIBRARY), \
)) ))
TARGETS += $(COPY_JVM_LIB) TARGETS += $(COPY_JVM_LIB)
endif endif

View File

@ -124,7 +124,7 @@ else ifeq ($(call isTargetOs, aix), true)
# mode, so don't optimize sharedRuntimeTrig.cpp at all. # mode, so don't optimize sharedRuntimeTrig.cpp at all.
BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE) BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
ifneq ($(DEBUG_LEVEL),slowdebug) ifneq ($(DEBUG_LEVEL), slowdebug)
# Compiling jvmtiEnterTrace.cpp with full optimization needs more than 30min # Compiling jvmtiEnterTrace.cpp with full optimization needs more than 30min
# (mostly because of '-qhot=level=1' and the more than 1300 'log_trace' calls # (mostly because of '-qhot=level=1' and the more than 1300 'log_trace' calls
# which cause a lot of template expansion). # which cause a lot of template expansion).

View File

@ -55,7 +55,7 @@ FindModuleNativeDirs = \
# Taken from JdkNativeCompilation.gmk # Taken from JdkNativeCompilation.gmk
FindJavaHeaderDir = \ FindJavaHeaderDir = \
$(if $(strip $1),$(wildcard $(SUPPORT_OUTPUTDIR)/headers/$(strip $1))) $(if $(strip $1), $(wildcard $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)))
JAVA_DIRS := $(strip $(foreach module, $(call FindAllModules), \ JAVA_DIRS := $(strip $(foreach module, $(call FindAllModules), \
$(patsubst $(TOPDIR)/%,%,$(filter-out $(OUTPUTDIR)%, \ $(patsubst $(TOPDIR)/%,%,$(filter-out $(OUTPUTDIR)%, \
@ -112,7 +112,7 @@ define SetupEclipseWorkspaceBody
# Eclipse crashes when processing multiple module-info.java files # Eclipse crashes when processing multiple module-info.java files
# This is an annoying bug that has not been fixed for some time now # This is an annoying bug that has not been fixed for some time now
$1_CLASSPATH += $$(foreach src,$(JAVA_DIRS), \ $1_CLASSPATH += $$(foreach src, $(JAVA_DIRS), \
<classpathentry excluding="module-info.java|module-info.java.extra" kind="src" path="$$(src)"/>$$(NEWLINE)) <classpathentry excluding="module-info.java|module-info.java.extra" kind="src" path="$$(src)"/>$$(NEWLINE))
$$(eval $$(call SetupTextFileProcessing, $1_CREATE_CLASSPATH_FILE, \ $$(eval $$(call SetupTextFileProcessing, $1_CREATE_CLASSPATH_FILE, \
@ -157,7 +157,7 @@ define SetupEclipseWorkspaceBody
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/hotspot"/>$$(NEWLINE) <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/hotspot"/>$$(NEWLINE)
ifneq ($$(findstring $$($1_NATURE), NATIVE MIXED), ) ifneq ($$(findstring $$($1_NATURE), NATIVE MIXED), )
$1_NATIVE_SRCS += $$(foreach src,$(NATIVE_DIRS), \ $1_NATIVE_SRCS += $$(foreach src, $(NATIVE_DIRS), \
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="$$(strip $$(src))"/>$$(NEWLINE)) <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="$$(strip $$(src))"/>$$(NEWLINE))
endif endif
@ -188,7 +188,7 @@ define SetupEclipseWorkspaceBody
$1_PLAIN_MAKE_TARGETS := update-build-docs docs gensrc gendata copy java \ $1_PLAIN_MAKE_TARGETS := update-build-docs docs gensrc gendata copy java \
launchers libs hotspot jdk product-images product-bundles all-images test-image clean launchers libs hotspot jdk product-images product-bundles all-images test-image clean
$1_MATCHING_MAKE_TARGETS += $$(foreach name,$$($1_PLAIN_MAKE_TARGETS), \ $1_MATCHING_MAKE_TARGETS += $$(foreach name, $$($1_PLAIN_MAKE_TARGETS), \
<target name="$$(strip $$(name))" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> \ <target name="$$(strip $$(name))" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> \
<buildCommand>$$($1_MAKE)</buildCommand> \ <buildCommand>$$($1_MAKE)</buildCommand> \
<buildArguments>-C $$(call FixPath, $(TOPDIR))</buildArguments> \ <buildArguments>-C $$(call FixPath, $(TOPDIR))</buildArguments> \
@ -292,7 +292,7 @@ define SetupEclipseWorkspaceBody
endif endif
ifneq ($$(findstring $$($1_NATURE), JAVA MIXED), ) ifneq ($$(findstring $$($1_NATURE), JAVA MIXED), )
$1_LINKED_RESOURCES += $$(foreach src,$(JAVA_DIRS), \ $1_LINKED_RESOURCES += $$(foreach src, $(JAVA_DIRS), \
<link> \ <link> \
<name>$$(strip $$(src))</name> \ <name>$$(strip $$(src))</name> \
<type>2</type> \ <type>2</type> \
@ -317,7 +317,7 @@ define SetupEclipseWorkspaceBody
endif endif
ifneq ($$(findstring $$($1_NATURE), NATIVE MIXED), ) ifneq ($$(findstring $$($1_NATURE), NATIVE MIXED), )
$1_LINKED_RESOURCES += $$(foreach src,$(NATIVE_DIRS), \ $1_LINKED_RESOURCES += $$(foreach src, $(NATIVE_DIRS), \
<link> \ <link> \
<name>$$(strip $$(src))</name> \ <name>$$(strip $$(src))</name> \
<type>2</type> \ <type>2</type> \

View File

@ -28,8 +28,8 @@ include make/MainSupport.gmk
.PHONY: idea .PHONY: idea
ifeq ($(SPEC),) ifeq ($(SPEC), )
ifneq ($(words $(SPECS)),1) ifneq ($(words $(SPECS)), 1)
@echo "Error: Multiple build specification files found. Please select one explicitly." @echo "Error: Multiple build specification files found. Please select one explicitly."
@exit 2 @exit 2
endif endif
@ -39,7 +39,7 @@ ifeq ($(SPEC),)
else #with SPEC else #with SPEC
include make/common/Modules.gmk include make/common/Modules.gmk
ifeq ($(MODULES),) ifeq ($(MODULES), )
SEL_MODULES := $(call FindAllModules) SEL_MODULES := $(call FindAllModules)
else else
SEL_MODULES := $(MODULES) SEL_MODULES := $(MODULES)
@ -47,7 +47,7 @@ else #with SPEC
idea: idea:
$(ECHO) "SUPPORT=$(SUPPORT_OUTPUTDIR)" >> $(OUT) $(ECHO) "SUPPORT=$(SUPPORT_OUTPUTDIR)" >> $(OUT)
$(ECHO) "MODULE_ROOTS=\"$(foreach mod, $(SEL_MODULES), $(call FindModuleSrcDirs,$(mod)))\"" >> $(OUT) $(ECHO) "MODULE_ROOTS=\"$(foreach mod, $(SEL_MODULES), $(call FindModuleSrcDirs, $(mod)))\"" >> $(OUT)
$(ECHO) "MODULE_NAMES=\"$(strip $(foreach mod, $(SEL_MODULES), $(mod)))\"" >> $(OUT) $(ECHO) "MODULE_NAMES=\"$(strip $(foreach mod, $(SEL_MODULES), $(mod)))\"" >> $(OUT)
$(ECHO) "SEL_MODULES=\"$(SEL_MODULES)\"" >> $(OUT) $(ECHO) "SEL_MODULES=\"$(SEL_MODULES)\"" >> $(OUT)
$(ECHO) "BOOT_JDK=\"$(BOOT_JDK)\"" >> $(OUT) $(ECHO) "BOOT_JDK=\"$(BOOT_JDK)\"" >> $(OUT)

View File

@ -80,7 +80,7 @@ ifeq ($(call isTargetOs, windows), true)
-ignorePath zero \ -ignorePath zero \
# #
################################################################################ ##############################################################################
# Build the ProjectCreator java tool. # Build the ProjectCreator java tool.
TOOLS_OUTPUTDIR := $(MAKESUPPORT_OUTPUTDIR)/ide/visualstudio TOOLS_OUTPUTDIR := $(MAKESUPPORT_OUTPUTDIR)/ide/visualstudio

View File

@ -47,7 +47,7 @@ GetIndexerFragment = \
################################################################################ ################################################################################
# Show indexer-specific notes if they exist, otherwise do nothing # Show indexer-specific notes if they exist, otherwise do nothing
################################################################################ ################################################################################
ifneq (,$(wildcard $(call GetIndexerFragment,notes))) ifneq ($(wildcard $(call GetIndexerFragment,notes)), )
ShowIndexerNotes = $(CAT) $(call GetIndexerFragment,notes) ShowIndexerNotes = $(CAT) $(call GetIndexerFragment,notes)
else else
ShowIndexerNotes = ShowIndexerNotes =
@ -66,7 +66,7 @@ endif
# Return an additional configuration fragment if the WORKSPACE_ROOT is different # Return an additional configuration fragment if the WORKSPACE_ROOT is different
# from TOPDIR. # from TOPDIR.
################################################################################ ################################################################################
ifneq ($(WORKSPACE_ROOT),$(TOPDIR)) ifneq ($(WORKSPACE_ROOT), $(TOPDIR))
GetExtraWorkspaceRoot = $(TOPDIR)/make/ide/vscode/hotspot/template-workspace-folder.txt GetExtraWorkspaceRoot = $(TOPDIR)/make/ide/vscode/hotspot/template-workspace-folder.txt
else else
GetExtraWorkspaceRoot = /dev/null GetExtraWorkspaceRoot = /dev/null

View File

@ -131,7 +131,7 @@ POLICY_SRC_LIST := $(POLICY_SRC)
$(POLICY_DST): $(POLICY_SRC_LIST) $(POLICY_DST): $(POLICY_SRC_LIST)
$(call MakeTargetDir) $(call MakeTargetDir)
$(RM) $@ $@.tmp $(RM) $@ $@.tmp
$(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;) $(foreach f, $(POLICY_SRC_LIST), $(CAT) $(f) >> $@.tmp;)
$(MV) $@.tmp $@ $(MV) $@.tmp $@
TARGETS += $(POLICY_DST) TARGETS += $(POLICY_DST)
@ -156,7 +156,7 @@ endif
$(DEF_POLICY_DST): $(DEF_POLICY_SRC_LIST) $(DEF_POLICY_DST): $(DEF_POLICY_SRC_LIST)
$(call MakeTargetDir) $(call MakeTargetDir)
$(RM) $@ $@.tmp $(RM) $@ $@.tmp
$(foreach f,$(DEF_POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;) $(foreach f, $(DEF_POLICY_SRC_LIST), $(CAT) $(f) >> $@.tmp;)
$(MV) $@.tmp $@ $(MV) $@.tmp $@
TARGETS += $(DEF_POLICY_DST) TARGETS += $(DEF_POLICY_DST)

View File

@ -58,7 +58,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNET, \
-delayload:winhttp.dll, \ -delayload:winhttp.dll, \
JDK_LIBS := libjava libjvm, \ JDK_LIBS := libjava libjvm, \
LIBS_linux := $(LIBDL), \ LIBS_linux := $(LIBDL), \
LIBS_aix := $(LIBDL),\ LIBS_aix := $(LIBDL), \
LIBS_windows := advapi32.lib delayimp.lib iphlpapi.lib secur32.lib \ LIBS_windows := advapi32.lib delayimp.lib iphlpapi.lib secur32.lib \
winhttp.lib ws2_32.lib, \ winhttp.lib ws2_32.lib, \
LIBS_macosx := \ LIBS_macosx := \

View File

@ -279,101 +279,101 @@ endef
X_BUF := X-Buffer X_BUF := X-Buffer
$(eval $(call SetupGenBuffer,ByteBuffer, $(X_BUF), type:=byte, BIN:=1)) $(eval $(call SetupGenBuffer,ByteBuffer, $(X_BUF), type := byte, BIN := 1))
$(eval $(call SetupGenBuffer,CharBuffer, $(X_BUF), type:=char)) $(eval $(call SetupGenBuffer,CharBuffer, $(X_BUF), type := char))
$(eval $(call SetupGenBuffer,ShortBuffer, $(X_BUF), type:=short)) $(eval $(call SetupGenBuffer,ShortBuffer, $(X_BUF), type := short))
$(eval $(call SetupGenBuffer,IntBuffer, $(X_BUF), type:=int)) $(eval $(call SetupGenBuffer,IntBuffer, $(X_BUF), type := int))
$(eval $(call SetupGenBuffer,LongBuffer, $(X_BUF), type:=long)) $(eval $(call SetupGenBuffer,LongBuffer, $(X_BUF), type := long))
$(eval $(call SetupGenBuffer,FloatBuffer, $(X_BUF), type:=float)) $(eval $(call SetupGenBuffer,FloatBuffer, $(X_BUF), type := float))
$(eval $(call SetupGenBuffer,DoubleBuffer,$(X_BUF), type:=double)) $(eval $(call SetupGenBuffer,DoubleBuffer,$(X_BUF), type := double))
# Buffers whose contents are heap-allocated # Buffers whose contents are heap-allocated
# #
HEAP_X_BUF := Heap-X-Buffer HEAP_X_BUF := Heap-X-Buffer
$(eval $(call SetupGenBuffer,HeapByteBuffer, $(HEAP_X_BUF), type:=byte)) $(eval $(call SetupGenBuffer,HeapByteBuffer, $(HEAP_X_BUF), type := byte))
$(eval $(call SetupGenBuffer,HeapByteBufferR, $(HEAP_X_BUF), type:=byte, RW:=R)) $(eval $(call SetupGenBuffer,HeapByteBufferR, $(HEAP_X_BUF), type := byte, RW := R))
$(eval $(call SetupGenBuffer,HeapCharBuffer, $(HEAP_X_BUF), type:=char)) $(eval $(call SetupGenBuffer,HeapCharBuffer, $(HEAP_X_BUF), type := char))
$(eval $(call SetupGenBuffer,HeapCharBufferR, $(HEAP_X_BUF), type:=char, RW:=R)) $(eval $(call SetupGenBuffer,HeapCharBufferR, $(HEAP_X_BUF), type := char, RW := R))
$(eval $(call SetupGenBuffer,HeapShortBuffer, $(HEAP_X_BUF), type:=short)) $(eval $(call SetupGenBuffer,HeapShortBuffer, $(HEAP_X_BUF), type := short))
$(eval $(call SetupGenBuffer,HeapShortBufferR, $(HEAP_X_BUF), type:=short, RW:=R)) $(eval $(call SetupGenBuffer,HeapShortBufferR, $(HEAP_X_BUF), type := short, RW := R))
$(eval $(call SetupGenBuffer,HeapIntBuffer, $(HEAP_X_BUF), type:=int)) $(eval $(call SetupGenBuffer,HeapIntBuffer, $(HEAP_X_BUF), type := int))
$(eval $(call SetupGenBuffer,HeapIntBufferR, $(HEAP_X_BUF), type:=int, RW:=R)) $(eval $(call SetupGenBuffer,HeapIntBufferR, $(HEAP_X_BUF), type := int, RW := R))
$(eval $(call SetupGenBuffer,HeapLongBuffer, $(HEAP_X_BUF), type:=long)) $(eval $(call SetupGenBuffer,HeapLongBuffer, $(HEAP_X_BUF), type := long))
$(eval $(call SetupGenBuffer,HeapLongBufferR, $(HEAP_X_BUF), type:=long, RW:=R)) $(eval $(call SetupGenBuffer,HeapLongBufferR, $(HEAP_X_BUF), type := long, RW := R))
$(eval $(call SetupGenBuffer,HeapFloatBuffer, $(HEAP_X_BUF), type:=float)) $(eval $(call SetupGenBuffer,HeapFloatBuffer, $(HEAP_X_BUF), type := float))
$(eval $(call SetupGenBuffer,HeapFloatBufferR, $(HEAP_X_BUF), type:=float, RW:=R)) $(eval $(call SetupGenBuffer,HeapFloatBufferR, $(HEAP_X_BUF), type := float, RW := R))
$(eval $(call SetupGenBuffer,HeapDoubleBuffer, $(HEAP_X_BUF), type:=double)) $(eval $(call SetupGenBuffer,HeapDoubleBuffer, $(HEAP_X_BUF), type := double))
$(eval $(call SetupGenBuffer,HeapDoubleBufferR,$(HEAP_X_BUF), type:=double, RW:=R)) $(eval $(call SetupGenBuffer,HeapDoubleBufferR,$(HEAP_X_BUF), type := double, RW := R))
# Direct byte buffer # Direct byte buffer
# #
DIRECT_X_BUF := Direct-X-Buffer DIRECT_X_BUF := Direct-X-Buffer
$(eval $(call SetupGenBuffer,DirectByteBuffer, $(DIRECT_X_BUF), type:=byte, BIN:=1)) $(eval $(call SetupGenBuffer,DirectByteBuffer, $(DIRECT_X_BUF), type := byte, BIN := 1))
$(eval $(call SetupGenBuffer,DirectByteBufferR,$(DIRECT_X_BUF), type:=byte, BIN:=1, RW:=R)) $(eval $(call SetupGenBuffer,DirectByteBufferR,$(DIRECT_X_BUF), type := byte, BIN := 1, RW := R))
# Unswapped views of direct byte buffers # Unswapped views of direct byte buffers
# #
$(eval $(call SetupGenBuffer,DirectCharBufferU, $(DIRECT_X_BUF), type:=char, BO:=U)) $(eval $(call SetupGenBuffer,DirectCharBufferU, $(DIRECT_X_BUF), type := char, BO := U))
$(eval $(call SetupGenBuffer,DirectCharBufferRU, $(DIRECT_X_BUF), type:=char, RW:=R, BO:=U)) $(eval $(call SetupGenBuffer,DirectCharBufferRU, $(DIRECT_X_BUF), type := char, RW := R, BO := U))
$(eval $(call SetupGenBuffer,DirectShortBufferU, $(DIRECT_X_BUF), type:=short, BO:=U)) $(eval $(call SetupGenBuffer,DirectShortBufferU, $(DIRECT_X_BUF), type := short, BO := U))
$(eval $(call SetupGenBuffer,DirectShortBufferRU, $(DIRECT_X_BUF), type:=short, RW:=R, BO:=U)) $(eval $(call SetupGenBuffer,DirectShortBufferRU, $(DIRECT_X_BUF), type := short, RW := R, BO := U))
$(eval $(call SetupGenBuffer,DirectIntBufferU, $(DIRECT_X_BUF), type:=int, BO:=U)) $(eval $(call SetupGenBuffer,DirectIntBufferU, $(DIRECT_X_BUF), type := int, BO := U))
$(eval $(call SetupGenBuffer,DirectIntBufferRU, $(DIRECT_X_BUF), type:=int, RW:=R, BO:=U)) $(eval $(call SetupGenBuffer,DirectIntBufferRU, $(DIRECT_X_BUF), type := int, RW := R, BO := U))
$(eval $(call SetupGenBuffer,DirectLongBufferU, $(DIRECT_X_BUF), type:=long, BO:=U)) $(eval $(call SetupGenBuffer,DirectLongBufferU, $(DIRECT_X_BUF), type := long, BO := U))
$(eval $(call SetupGenBuffer,DirectLongBufferRU, $(DIRECT_X_BUF), type:=long, RW:=R, BO:=U)) $(eval $(call SetupGenBuffer,DirectLongBufferRU, $(DIRECT_X_BUF), type := long, RW := R, BO := U))
$(eval $(call SetupGenBuffer,DirectFloatBufferU, $(DIRECT_X_BUF), type:=float, BO:=U)) $(eval $(call SetupGenBuffer,DirectFloatBufferU, $(DIRECT_X_BUF), type := float, BO := U))
$(eval $(call SetupGenBuffer,DirectFloatBufferRU, $(DIRECT_X_BUF), type:=float, RW:=R, BO:=U)) $(eval $(call SetupGenBuffer,DirectFloatBufferRU, $(DIRECT_X_BUF), type := float, RW := R, BO := U))
$(eval $(call SetupGenBuffer,DirectDoubleBufferU, $(DIRECT_X_BUF), type:=double, BO:=U)) $(eval $(call SetupGenBuffer,DirectDoubleBufferU, $(DIRECT_X_BUF), type := double, BO := U))
$(eval $(call SetupGenBuffer,DirectDoubleBufferRU,$(DIRECT_X_BUF), type:=double, RW:=R, BO:=U)) $(eval $(call SetupGenBuffer,DirectDoubleBufferRU,$(DIRECT_X_BUF), type := double, RW := R, BO := U))
# Swapped views of direct byte buffers # Swapped views of direct byte buffers
# #
$(eval $(call SetupGenBuffer,DirectCharBufferS, $(DIRECT_X_BUF), type:=char, BO:=S)) $(eval $(call SetupGenBuffer,DirectCharBufferS, $(DIRECT_X_BUF), type := char, BO := S))
$(eval $(call SetupGenBuffer,DirectCharBufferRS, $(DIRECT_X_BUF), type:=char, RW:=R, BO:=S)) $(eval $(call SetupGenBuffer,DirectCharBufferRS, $(DIRECT_X_BUF), type := char, RW := R, BO := S))
$(eval $(call SetupGenBuffer,DirectShortBufferS, $(DIRECT_X_BUF), type:=short, BO:=S)) $(eval $(call SetupGenBuffer,DirectShortBufferS, $(DIRECT_X_BUF), type := short, BO := S))
$(eval $(call SetupGenBuffer,DirectShortBufferRS, $(DIRECT_X_BUF), type:=short, RW:=R, BO:=S)) $(eval $(call SetupGenBuffer,DirectShortBufferRS, $(DIRECT_X_BUF), type := short, RW := R, BO := S))
$(eval $(call SetupGenBuffer,DirectIntBufferS, $(DIRECT_X_BUF), type:=int, BO:=S)) $(eval $(call SetupGenBuffer,DirectIntBufferS, $(DIRECT_X_BUF), type := int, BO := S))
$(eval $(call SetupGenBuffer,DirectIntBufferRS, $(DIRECT_X_BUF), type:=int, RW:=R, BO:=S)) $(eval $(call SetupGenBuffer,DirectIntBufferRS, $(DIRECT_X_BUF), type := int, RW := R, BO := S))
$(eval $(call SetupGenBuffer,DirectLongBufferS, $(DIRECT_X_BUF), type:=long, BO:=S)) $(eval $(call SetupGenBuffer,DirectLongBufferS, $(DIRECT_X_BUF), type := long, BO := S))
$(eval $(call SetupGenBuffer,DirectLongBufferRS, $(DIRECT_X_BUF), type:=long, RW:=R, BO:=S)) $(eval $(call SetupGenBuffer,DirectLongBufferRS, $(DIRECT_X_BUF), type := long, RW := R, BO := S))
$(eval $(call SetupGenBuffer,DirectFloatBufferS, $(DIRECT_X_BUF), type:=float, BO:=S)) $(eval $(call SetupGenBuffer,DirectFloatBufferS, $(DIRECT_X_BUF), type := float, BO := S))
$(eval $(call SetupGenBuffer,DirectFloatBufferRS, $(DIRECT_X_BUF), type:=float, RW:=R, BO:=S)) $(eval $(call SetupGenBuffer,DirectFloatBufferRS, $(DIRECT_X_BUF), type := float, RW := R, BO := S))
$(eval $(call SetupGenBuffer,DirectDoubleBufferS, $(DIRECT_X_BUF), type:=double, BO:=S)) $(eval $(call SetupGenBuffer,DirectDoubleBufferS, $(DIRECT_X_BUF), type := double, BO := S))
$(eval $(call SetupGenBuffer,DirectDoubleBufferRS,$(DIRECT_X_BUF), type:=double, RW:=R, BO:=S)) $(eval $(call SetupGenBuffer,DirectDoubleBufferRS,$(DIRECT_X_BUF), type := double, RW := R, BO := S))
# Big-endian views of byte buffers # Big-endian views of byte buffers
# #
BYTE_X_BUF := ByteBufferAs-X-Buffer BYTE_X_BUF := ByteBufferAs-X-Buffer
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferB, $(BYTE_X_BUF), type:=char, BO:=B)) $(eval $(call SetupGenBuffer,ByteBufferAsCharBufferB, $(BYTE_X_BUF), type := char, BO := B))
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRB, $(BYTE_X_BUF), type:=char, RW:=R, BO:=B)) $(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRB, $(BYTE_X_BUF), type := char, RW := R, BO := B))
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferB, $(BYTE_X_BUF), type:=short, BO:=B)) $(eval $(call SetupGenBuffer,ByteBufferAsShortBufferB, $(BYTE_X_BUF), type := short, BO := B))
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRB, $(BYTE_X_BUF), type:=short, RW:=R, BO:=B)) $(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRB, $(BYTE_X_BUF), type := short, RW := R, BO := B))
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferB, $(BYTE_X_BUF), type:=int, BO:=B)) $(eval $(call SetupGenBuffer,ByteBufferAsIntBufferB, $(BYTE_X_BUF), type := int, BO := B))
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRB, $(BYTE_X_BUF), type:=int, RW:=R, BO:=B)) $(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRB, $(BYTE_X_BUF), type := int, RW := R, BO := B))
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferB, $(BYTE_X_BUF), type:=long, BO:=B)) $(eval $(call SetupGenBuffer,ByteBufferAsLongBufferB, $(BYTE_X_BUF), type := long, BO := B))
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRB, $(BYTE_X_BUF), type:=long, RW:=R, BO:=B)) $(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRB, $(BYTE_X_BUF), type := long, RW := R, BO := B))
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferB, $(BYTE_X_BUF), type:=float, BO:=B)) $(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferB, $(BYTE_X_BUF), type := float, BO := B))
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRB, $(BYTE_X_BUF), type:=float, RW:=R, BO:=B)) $(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRB, $(BYTE_X_BUF), type := float, RW := R, BO := B))
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferB, $(BYTE_X_BUF), type:=double, BO:=B)) $(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferB, $(BYTE_X_BUF), type := double, BO := B))
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRB,$(BYTE_X_BUF), type:=double, RW:=R, BO:=B)) $(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRB,$(BYTE_X_BUF), type := double, RW := R, BO := B))
# Little-endian views of byte buffers # Little-endian views of byte buffers
# #
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferL, $(BYTE_X_BUF), type:=char, BO:=L)) $(eval $(call SetupGenBuffer,ByteBufferAsCharBufferL, $(BYTE_X_BUF), type := char, BO := L))
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRL, $(BYTE_X_BUF), type:=char, RW:=R, BO:=L)) $(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRL, $(BYTE_X_BUF), type := char, RW := R, BO := L))
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferL, $(BYTE_X_BUF), type:=short, BO:=L)) $(eval $(call SetupGenBuffer,ByteBufferAsShortBufferL, $(BYTE_X_BUF), type := short, BO := L))
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRL, $(BYTE_X_BUF), type:=short, RW:=R, BO:=L)) $(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRL, $(BYTE_X_BUF), type := short, RW := R, BO := L))
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferL, $(BYTE_X_BUF), type:=int, BO:=L)) $(eval $(call SetupGenBuffer,ByteBufferAsIntBufferL, $(BYTE_X_BUF), type := int, BO := L))
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRL, $(BYTE_X_BUF), type:=int, RW:=R, BO:=L)) $(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRL, $(BYTE_X_BUF), type := int, RW := R, BO := L))
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferL, $(BYTE_X_BUF), type:=long, BO:=L)) $(eval $(call SetupGenBuffer,ByteBufferAsLongBufferL, $(BYTE_X_BUF), type := long, BO := L))
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRL, $(BYTE_X_BUF), type:=long, RW:=R, BO:=L)) $(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRL, $(BYTE_X_BUF), type := long, RW := R, BO := L))
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferL, $(BYTE_X_BUF), type:=float, BO:=L)) $(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferL, $(BYTE_X_BUF), type := float, BO := L))
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRL, $(BYTE_X_BUF), type:=float, RW:=R, BO:=L)) $(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRL, $(BYTE_X_BUF), type := float, RW := R, BO := L))
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferL, $(BYTE_X_BUF), type:=double, BO:=L)) $(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferL, $(BYTE_X_BUF), type := double, BO := L))
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRL,$(BYTE_X_BUF), type:=double, RW:=R, BO:=L)) $(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRL,$(BYTE_X_BUF), type := double, RW := R, BO := L))
### ###

View File

@ -40,7 +40,7 @@ $(GENSRC_EXCEPTIONS_DST)/_the.%.marker: $(GENSRC_EXCEPTIONS_SRC)/%/exceptions \
$(GENSRC_EXCEPTIONS_CMD) $< $(@D)/$* $(LOG_DEBUG) $(GENSRC_EXCEPTIONS_CMD) $< $(@D)/$* $(LOG_DEBUG)
$(TOUCH) $@ $(TOUCH) $@
GENSRC_EXCEPTIONS += $(foreach D,$(GENSRC_EXCEPTIONS_SRC_DIRS),$(GENSRC_EXCEPTIONS_DST)/_the.$(D).marker) GENSRC_EXCEPTIONS += $(foreach D, $(GENSRC_EXCEPTIONS_SRC_DIRS), $(GENSRC_EXCEPTIONS_DST)/_the.$(D).marker)
$(GENSRC_EXCEPTIONS): $(BUILD_TOOLS_JDK) $(GENSRC_EXCEPTIONS): $(BUILD_TOOLS_JDK)

View File

@ -87,7 +87,7 @@ ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
else ifeq ($(TOOLCHAIN_TYPE), microsoft) else ifeq ($(TOOLCHAIN_TYPE), microsoft)
CPP_FLAGS += -nologo CPP_FLAGS += -nologo
ifeq ($(OPENJDK_TARGET_CPU),aarch64) ifeq ($(OPENJDK_TARGET_CPU), aarch64)
# cl.exe does only recognize few file extensions as valid (ex: .c, .h, .cpp), so # cl.exe does only recognize few file extensions as valid (ex: .c, .h, .cpp), so
# make sure *.java.template files are recognized as valid input files # make sure *.java.template files are recognized as valid input files
CPP_FILEPREFIX = -Tc CPP_FILEPREFIX = -Tc

View File

@ -42,7 +42,7 @@ NATIVE_ACCESS_MODULES_LIST := $(call SubstComma, $(NATIVE_ACCESS_MODULES))
VARDEPS_VALUE := $(BOOT_MODULES_LIST) $(PLATFORM_MODULES_LIST) $(NATIVE_ACCESS_MODULES_LIST) VARDEPS_VALUE := $(BOOT_MODULES_LIST) $(PLATFORM_MODULES_LIST) $(NATIVE_ACCESS_MODULES_LIST)
VARDEPS_FILE := $(call DependOnVariable, VARDEPS_VALUE) VARDEPS_FILE := $(call DependOnVariable, VARDEPS_VALUE)
############################################################################ ################################################################################
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/module/ModuleLoaderMap.java: \ $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/module/ModuleLoaderMap.java: \
$(TOPDIR)/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java \ $(TOPDIR)/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java \

View File

@ -63,7 +63,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \
DISABLED_WARNINGS_clang_TimeZone_md.c := unused-variable, \ DISABLED_WARNINGS_clang_TimeZone_md.c := unused-variable, \
JDK_LIBS := libjvm, \ JDK_LIBS := libjvm, \
LIBS_linux := $(LIBDL), \ LIBS_linux := $(LIBDL), \
LIBS_aix := $(LIBDL) $(LIBM),\ LIBS_aix := $(LIBDL) $(LIBM), \
LIBS_macosx := \ LIBS_macosx := \
-framework CoreFoundation \ -framework CoreFoundation \
-framework Foundation \ -framework Foundation \

View File

@ -127,7 +127,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
JDK_LIBS := java.base:libjava java.base:libjvm, \ JDK_LIBS := java.base:libjava java.base:libjvm, \
LIBS_unix := $(LIBM), \ LIBS_unix := $(LIBM), \
LIBS_linux := $(LIBDL), \ LIBS_linux := $(LIBDL), \
LIBS_aix := $(LIBDL),\ LIBS_aix := $(LIBDL), \
LIBS_macosx := \ LIBS_macosx := \
-framework ApplicationServices \ -framework ApplicationServices \
-framework AudioToolbox \ -framework AudioToolbox \

View File

@ -101,7 +101,8 @@ TARGETS += $(BUILD_LIBLCMS)
ifeq ($(USE_EXTERNAL_LIBJPEG), true) ifeq ($(USE_EXTERNAL_LIBJPEG), true)
LIBJAVAJPEG_INCLUDE_FILES := \ LIBJAVAJPEG_INCLUDE_FILES := \
imageioJPEG.c \ imageioJPEG.c \
jpegdecoder.c jpegdecoder.c \
#
# If we're using an external library, we can't include our own SRC path # If we're using an external library, we can't include our own SRC path
# as includes, instead the system headers should be used. # as includes, instead the system headers should be used.
LIBJAVAJPEG_HEADERS_FROM_SRC := false LIBJAVAJPEG_HEADERS_FROM_SRC := false
@ -391,7 +392,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
DISABLED_WARNINGS_clang := $(HARFBUZZ_DISABLED_WARNINGS_clang), \ DISABLED_WARNINGS_clang := $(HARFBUZZ_DISABLED_WARNINGS_clang), \
DISABLED_WARNINGS_microsoft := $(HARFBUZZ_DISABLED_WARNINGS_microsoft), \ DISABLED_WARNINGS_microsoft := $(HARFBUZZ_DISABLED_WARNINGS_microsoft), \
LDFLAGS := $(LDFLAGS_CXX_JDK), \ LDFLAGS := $(LDFLAGS_CXX_JDK), \
LDFLAGS_FILTER_OUT :=-Wl$(COMMA)-z$(COMMA)defs, \ LDFLAGS_FILTER_OUT := -Wl$(COMMA)-z$(COMMA)defs, \
LDFLAGS_aix := -Wl$(COMMA)-berok, \ LDFLAGS_aix := -Wl$(COMMA)-berok, \
JDK_LIBS := libawt java.base:libjava $(LIBFONTMANAGER_JDK_LIBS), \ JDK_LIBS := libawt java.base:libjava $(LIBFONTMANAGER_JDK_LIBS), \
JDK_LIBS_macosx := libawt_lwawt, \ JDK_LIBS_macosx := libawt_lwawt, \

View File

@ -40,7 +40,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT, \
DISABLED_WARNINGS_gcc_VMManagementImpl.c := unused-variable, \ DISABLED_WARNINGS_gcc_VMManagementImpl.c := unused-variable, \
DISABLED_WARNINGS_clang_VMManagementImpl.c := unused-variable, \ DISABLED_WARNINGS_clang_VMManagementImpl.c := unused-variable, \
JDK_LIBS := java.base:libjava java.base:libjvm, \ JDK_LIBS := java.base:libjava java.base:libjvm, \
LIBS_aix := -lperfstat,\ LIBS_aix := -lperfstat, \
LIBS_windows := advapi32.lib psapi.lib, \ LIBS_windows := advapi32.lib psapi.lib, \
)) ))

View File

@ -26,7 +26,7 @@
include GensrcCommon.gmk include GensrcCommon.gmk
include GensrcProperties.gmk include GensrcProperties.gmk
$(eval $(call SetupVersionProperties, JAVADOC_VERSION,\ $(eval $(call SetupVersionProperties, JAVADOC_VERSION, \
jdk/javadoc/internal/tool/resources/version.properties)) jdk/javadoc/internal/tool/resources/version.properties))
$(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \

View File

@ -29,7 +29,7 @@ include GensrcProperties.gmk
$(eval $(call SetupVersionProperties, JAVAP_VERSION, \ $(eval $(call SetupVersionProperties, JAVAP_VERSION, \
com/sun/tools/javap/resources/version.properties)) com/sun/tools/javap/resources/version.properties))
$(eval $(call SetupVersionProperties, JDEPS_VERSION,\ $(eval $(call SetupVersionProperties, JDEPS_VERSION, \
com/sun/tools/jdeps/resources/version.properties)) com/sun/tools/jdeps/resources/version.properties))
$(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \

View File

@ -29,7 +29,7 @@ include LauncherCommon.gmk
## Build jimage ## Build jimage
################################################################################ ################################################################################
$(eval $(call SetupBuildLauncher, jimage,\ $(eval $(call SetupBuildLauncher, jimage, \
MAIN_CLASS := jdk.tools.jimage.Main, \ MAIN_CLASS := jdk.tools.jimage.Main, \
CFLAGS := -DENABLE_ARG_FILES, \ CFLAGS := -DENABLE_ARG_FILES, \
)) ))
@ -38,7 +38,7 @@ $(eval $(call SetupBuildLauncher, jimage,\
## Build jlink ## Build jlink
################################################################################ ################################################################################
$(eval $(call SetupBuildLauncher, jlink,\ $(eval $(call SetupBuildLauncher, jlink, \
MAIN_CLASS := jdk.tools.jlink.internal.Main, \ MAIN_CLASS := jdk.tools.jlink.internal.Main, \
JAVA_ARGS := --add-modules ALL-DEFAULT, \ JAVA_ARGS := --add-modules ALL-DEFAULT, \
CFLAGS := -DENABLE_ARG_FILES -DEXPAND_CLASSPATH_WILDCARDS, \ CFLAGS := -DENABLE_ARG_FILES -DEXPAND_CLASSPATH_WILDCARDS, \
@ -48,7 +48,7 @@ $(eval $(call SetupBuildLauncher, jlink,\
## Build jmod ## Build jmod
################################################################################ ################################################################################
$(eval $(call SetupBuildLauncher, jmod,\ $(eval $(call SetupBuildLauncher, jmod, \
MAIN_CLASS := jdk.tools.jmod.Main, \ MAIN_CLASS := jdk.tools.jmod.Main, \
CFLAGS := -DENABLE_ARG_FILES -DEXPAND_CLASSPATH_WILDCARDS, \ CFLAGS := -DENABLE_ARG_FILES -DEXPAND_CLASSPATH_WILDCARDS, \
)) ))

View File

@ -49,7 +49,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_EXT, \
DISABLED_WARNINGS_clang_UnixOperatingSystem.c := format-nonliteral, \ DISABLED_WARNINGS_clang_UnixOperatingSystem.c := format-nonliteral, \
CFLAGS := $(LIBMANAGEMENT_EXT_CFLAGS), \ CFLAGS := $(LIBMANAGEMENT_EXT_CFLAGS), \
JDK_LIBS := java.base:libjava java.base:libjvm, \ JDK_LIBS := java.base:libjava java.base:libjvm, \
LIBS_aix := -lperfstat,\ LIBS_aix := -lperfstat, \
LIBS_windows := advapi32.lib psapi.lib, \ LIBS_windows := advapi32.lib psapi.lib, \
)) ))

View File

@ -149,7 +149,7 @@ $(eval $(call SetupJarArchive, BUILD_JDK_JAR, \
SRCS := $(MICROBENCHMARK_CLASSES) $(JMH_UNPACKED_DIR), \ SRCS := $(MICROBENCHMARK_CLASSES) $(JMH_UNPACKED_DIR), \
BIN := $(MICROBENCHMARK_JAR_BIN), \ BIN := $(MICROBENCHMARK_JAR_BIN), \
SUFFIXES := .*, \ SUFFIXES := .*, \
EXCLUDE_FILES:= _the.BUILD_JDK_MICROBENCHMARK_batch \ EXCLUDE_FILES := _the.BUILD_JDK_MICROBENCHMARK_batch \
_the.BUILD_JDK_MICROBENCHMARK.vardeps _unpacked.marker, \ _the.BUILD_JDK_MICROBENCHMARK.vardeps _unpacked.marker, \
EXTRA_MANIFEST_ATTR := $(MICROBENCHMARK_MANIFEST), \ EXTRA_MANIFEST_ATTR := $(MICROBENCHMARK_MANIFEST), \
JARMAIN := org.openjdk.jmh.Main, \ JARMAIN := org.openjdk.jmh.Main, \

View File

@ -59,77 +59,93 @@ VM_TESTBASE_DIR := $(TOPDIR)/test/hotspot/jtreg/vmTestbase
VM_SHARE_INCLUDES := \ VM_SHARE_INCLUDES := \
-I$(VM_TESTBASE_DIR)/vm/share \ -I$(VM_TESTBASE_DIR)/vm/share \
-I$(VM_TESTBASE_DIR)/nsk/share/native \ -I$(VM_TESTBASE_DIR)/nsk/share/native \
-I$(VM_TESTBASE_DIR)/nsk/share/jni -I$(VM_TESTBASE_DIR)/nsk/share/jni \
#
NSK_MONITORING_INCLUDES := \ NSK_MONITORING_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/share/native \ -I$(VM_TESTBASE_DIR)/nsk/share/native \
-I$(VM_TESTBASE_DIR)/nsk/share/jni -I$(VM_TESTBASE_DIR)/nsk/share/jni \
#
NSK_JDI_INCLUDES := \ NSK_JDI_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/share/native -I$(VM_TESTBASE_DIR)/nsk/share/native \
#
NSK_SHARE_JDI_INCLUDES := \ NSK_SHARE_JDI_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/share/native \ -I$(VM_TESTBASE_DIR)/nsk/share/native \
-I$(VM_TESTBASE_DIR)/nsk/share/jdi -I$(VM_TESTBASE_DIR)/nsk/share/jdi \
#
NSK_SHARE_JNI_INCLUDES := \ NSK_SHARE_JNI_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/share/native \ -I$(VM_TESTBASE_DIR)/nsk/share/native \
-I$(VM_TESTBASE_DIR)/nsk/share/jni -I$(VM_TESTBASE_DIR)/nsk/share/jni \
#
RUNTIME_DEFMETH_INCLUDES := \ RUNTIME_DEFMETH_INCLUDES := \
-I$(TOPDIR)/test/hotspot/jtreg/vmTestbase/nsk/share/jni \ -I$(TOPDIR)/test/hotspot/jtreg/vmTestbase/nsk/share/jni \
-I$(TOPDIR)/test/hotspot/jtreg/vmTestbase/nsk/share/native \ -I$(TOPDIR)/test/hotspot/jtreg/vmTestbase/nsk/share/native \
-I$(TOPDIR)/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti -I$(TOPDIR)/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti \
#
NSK_SHARE_LOCKS_INCLUDES := \ NSK_SHARE_LOCKS_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/share/native \ -I$(VM_TESTBASE_DIR)/nsk/share/native \
-I$(VM_TESTBASE_DIR)/nsk/share/locks -I$(VM_TESTBASE_DIR)/nsk/share/locks \
#
MLVM_JVMTI_INCLUDES := \ MLVM_JVMTI_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/share/native \ -I$(VM_TESTBASE_DIR)/nsk/share/native \
-I$(VM_TESTBASE_DIR)/nsk/share/jni \ -I$(VM_TESTBASE_DIR)/nsk/share/jni \
-I$(VM_TESTBASE_DIR)/nsk/share/jvmti \ -I$(VM_TESTBASE_DIR)/nsk/share/jvmti \
-I$(VM_TESTBASE_DIR)/nsk/share/jvmti/agent_common \ -I$(VM_TESTBASE_DIR)/nsk/share/jvmti/agent_common \
-I$(VM_TESTBASE_DIR)/vm/mlvm/share -I$(VM_TESTBASE_DIR)/vm/mlvm/share \
#
MLVM_STRESS_INCLUDES := \ MLVM_STRESS_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/share/native \ -I$(VM_TESTBASE_DIR)/nsk/share/native \
-I$(VM_TESTBASE_DIR)/nsk/share/jni -I$(VM_TESTBASE_DIR)/nsk/share/jni \
#
NSK_GC_LOCK_JNI_INCLUDES := \ NSK_GC_LOCK_JNI_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/jni \ -I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/jni \
-I$(VM_TESTBASE_DIR)/nsk/share/native \ -I$(VM_TESTBASE_DIR)/nsk/share/native \
-I$(VM_TESTBASE_DIR)/nsk/share/jni -I$(VM_TESTBASE_DIR)/nsk/share/jni \
#
NSK_GC_LOCK_REF_INCLUDES := \ NSK_GC_LOCK_REF_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/jniref \ -I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/jniref \
-I$(VM_TESTBASE_DIR)/nsk/share/native \ -I$(VM_TESTBASE_DIR)/nsk/share/native \
-I$(VM_TESTBASE_DIR)/nsk/share/jni -I$(VM_TESTBASE_DIR)/nsk/share/jni \
#
NSK_STRACE_INCLUDES := \ NSK_STRACE_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/share/native \ -I$(VM_TESTBASE_DIR)/nsk/share/native \
-I$(VM_TESTBASE_DIR)/nsk/share/jni -I$(VM_TESTBASE_DIR)/nsk/share/jni \
#
NSK_STRESS_JNI_INCLUDES := \ NSK_STRESS_JNI_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/stress/jni -I$(VM_TESTBASE_DIR)/nsk/stress/jni \
#
NSK_JVMTI_AGENT_INCLUDES := \ NSK_JVMTI_AGENT_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/share/jni \ -I$(VM_TESTBASE_DIR)/nsk/share/jni \
-I$(VM_TESTBASE_DIR)/nsk/share/native \ -I$(VM_TESTBASE_DIR)/nsk/share/native \
-I$(VM_TESTBASE_DIR)/nsk/share/jvmti \ -I$(VM_TESTBASE_DIR)/nsk/share/jvmti \
-I$(VM_TESTBASE_DIR)/nsk/share/jvmti/agent_common -I$(VM_TESTBASE_DIR)/nsk/share/jvmti/agent_common \
#
NSK_JVMTI_AOD_INCLUDES := \ NSK_JVMTI_AOD_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/share/jni \ -I$(VM_TESTBASE_DIR)/nsk/share/jni \
-I$(VM_TESTBASE_DIR)/nsk/share/native \ -I$(VM_TESTBASE_DIR)/nsk/share/native \
-I$(VM_TESTBASE_DIR)/nsk/share/aod \ -I$(VM_TESTBASE_DIR)/nsk/share/aod \
-I$(VM_TESTBASE_DIR)/nsk/share/jvmti \ -I$(VM_TESTBASE_DIR)/nsk/share/jvmti \
-I$(VM_TESTBASE_DIR)/nsk/share/jvmti/aod -I$(VM_TESTBASE_DIR)/nsk/share/jvmti/aod \
#
NSK_AOD_INCLUDES := \ NSK_AOD_INCLUDES := \
-I$(VM_TESTBASE_DIR)/nsk/share/aod \ -I$(VM_TESTBASE_DIR)/nsk/share/aod \
-I$(VM_TESTBASE_DIR)/nsk/share/native \ -I$(VM_TESTBASE_DIR)/nsk/share/native \
-I$(VM_TESTBASE_DIR)/nsk/share/jni -I$(VM_TESTBASE_DIR)/nsk/share/jni \
#
NO_FRAMEPOINTER_CFLAGS := NO_FRAMEPOINTER_CFLAGS :=
ifeq ($(call isTargetOs, linux), true) ifeq ($(call isTargetOs, linux), true)
@ -140,7 +156,7 @@ BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libNoFramePointer := $(NO_FRAMEPOINTER_CFLA
# Optimization -O3 needed, HIGH == -O3 # Optimization -O3 needed, HIGH == -O3
BUILD_HOTSPOT_JTREG_LIBRARIES_OPTIMIZATION_libNoFramePointer := HIGH BUILD_HOTSPOT_JTREG_LIBRARIES_OPTIMIZATION_libNoFramePointer := HIGH
JVMTI_COMMON_INCLUDES=-I$(TOPDIR)/test/lib/jdk/test/lib/jvmti JVMTI_COMMON_INCLUDES = -I$(TOPDIR)/test/lib/jdk/test/lib/jvmti
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libProcessUtils := $(VM_SHARE_INCLUDES) BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libProcessUtils := $(VM_SHARE_INCLUDES)
@ -762,7 +778,7 @@ BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libretransform002 := $(NSK_JVMTI_AGENT_INCL
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libretransform004 := $(NSK_JVMTI_AGENT_INCLUDES) BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libretransform004 := $(NSK_JVMTI_AGENT_INCLUDES)
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libretransform003 := $(NSK_JVMTI_AGENT_INCLUDES) BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libretransform003 := $(NSK_JVMTI_AGENT_INCLUDES)
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmdf007 := $(NSK_JVMTI_AGENT_INCLUDES) BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmdf007 := $(NSK_JVMTI_AGENT_INCLUDES)
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmdf006 :=$(NSK_JVMTI_AGENT_INCLUDES) BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmdf006 := $(NSK_JVMTI_AGENT_INCLUDES)
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmdf004 := $(NSK_JVMTI_AGENT_INCLUDES) BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmdf004 := $(NSK_JVMTI_AGENT_INCLUDES)
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmdf005 := $(NSK_JVMTI_AGENT_INCLUDES) BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libgetclmdf005 := $(NSK_JVMTI_AGENT_INCLUDES)
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetlocal001 := $(NSK_JVMTI_AGENT_INCLUDES) BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libsetlocal001 := $(NSK_JVMTI_AGENT_INCLUDES)
@ -1559,7 +1575,7 @@ build-test-hotspot-jtreg-native: $(BUILD_HOTSPOT_JTREG_LIBRARIES) $(BUILD_HOTSPO
################################################################################ ################################################################################
# Copy to hotspot jtreg test image # Copy to hotspot jtreg test image
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_JTREG_NATIVE, \ $(eval $(call SetupCopyFiles, COPY_HOTSPOT_JTREG_NATIVE, \
SRC := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \ SRC := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
DEST := $(TEST_IMAGE_DIR)/hotspot/jtreg/native, \ DEST := $(TEST_IMAGE_DIR)/hotspot/jtreg/native, \
FILES := $(wildcard $(addprefix $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), /bin/* /lib/*)), \ FILES := $(wildcard $(addprefix $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), /bin/* /lib/*)), \

View File

@ -53,7 +53,8 @@ BUILD_JDK_JTREG_IMAGE_DIR := $(TEST_IMAGE_DIR)/jdk/jtreg
BUILD_JDK_JTREG_EXECUTABLES_CFLAGS_exeJliLaunchTest := \ BUILD_JDK_JTREG_EXECUTABLES_CFLAGS_exeJliLaunchTest := \
-I$(TOPDIR)/src/java.base/share/native/libjli \ -I$(TOPDIR)/src/java.base/share/native/libjli \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \ -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli \
#
BUILD_JDK_JTREG_EXECUTABLES_JDK_LIBS_exeJliLaunchTest := java.base:libjli BUILD_JDK_JTREG_EXECUTABLES_JDK_LIBS_exeJliLaunchTest := java.base:libjli
BUILD_JDK_JTREG_EXECUTABLES_JDK_LIBS_exeCallerAccessTest := java.base:libjvm BUILD_JDK_JTREG_EXECUTABLES_JDK_LIBS_exeCallerAccessTest := java.base:libjvm
@ -154,7 +155,7 @@ build-test-jdk-jtreg-native: $(BUILD_JDK_JTREG_LIBRARIES) $(BUILD_JDK_JTREG_EXEC
################################################################################ ################################################################################
# Copy to jdk jtreg test image # Copy to jdk jtreg test image
$(eval $(call SetupCopyFiles,COPY_JDK_JTREG_NATIVE, \ $(eval $(call SetupCopyFiles, COPY_JDK_JTREG_NATIVE, \
SRC := $(BUILD_JDK_JTREG_OUTPUT_DIR), \ SRC := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
DEST := $(TEST_IMAGE_DIR)/jdk/jtreg/native, \ DEST := $(TEST_IMAGE_DIR)/jdk/jtreg/native, \
FILES := $(wildcard $(addprefix $(BUILD_JDK_JTREG_OUTPUT_DIR), /bin/* /lib/*)), \ FILES := $(wildcard $(addprefix $(BUILD_JDK_JTREG_OUTPUT_DIR), /bin/* /lib/*)), \