8143141: Bring in minor build changes from the jigsaw/jake forest
Reviewed-by: ihse, mchung
This commit is contained in:
parent
49c8a97fbc
commit
086e3e9a94
@ -980,6 +980,19 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC],
|
||||
DISABLE_WARNING_PREFIX=
|
||||
fi
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
|
||||
# Repeate the check for the BUILD_CC
|
||||
CC_OLD="$CC"
|
||||
CC="$BUILD_CC"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS([-Wno-this-is-a-warning-that-do-not-exist],
|
||||
[BUILD_CC_CAN_DISABLE_WARNINGS=true],
|
||||
[BUILD_CC_CAN_DISABLE_WARNINGS=false]
|
||||
)
|
||||
if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
|
||||
BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
|
||||
else
|
||||
BUILD_CC_DISABLE_WARNING_PREFIX=
|
||||
fi
|
||||
CC="$CC_OLD"
|
||||
;;
|
||||
clang)
|
||||
DISABLE_WARNING_PREFIX="-Wno-"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -361,7 +361,11 @@ LDFLAGS_TESTEXE:=@LDFLAGS_TESTEXE@
|
||||
# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
|
||||
# build platform.
|
||||
BUILD_CC:=@FIXPATH@ @BUILD_CC@
|
||||
BUILD_CXX:=@FIXPATH@ @BUILD_CXX@
|
||||
BUILD_LD:=@FIXPATH@ @BUILD_LD@
|
||||
BUILD_AS:=@FIXPATH@ @BUILD_AS@
|
||||
BUILD_AR:=@FIXPATH@ @BUILD_AR@
|
||||
BUILD_NM:=@FIXPATH@ @BUILD_NM@
|
||||
BUILD_SYSROOT_CFLAGS:=@BUILD_SYSROOT_CFLAGS@
|
||||
BUILD_SYSROOT_LDFLAGS:=@BUILD_SYSROOT_LDFLAGS@
|
||||
|
||||
|
@ -539,6 +539,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# The corresponding ar tool is lib.exe (used to create static libraries)
|
||||
AC_CHECK_PROG([AR], [lib],[lib],,,)
|
||||
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
BASIC_CHECK_TOOLS(AR, ar gcc-ar)
|
||||
else
|
||||
BASIC_CHECK_TOOLS(AR, ar)
|
||||
fi
|
||||
@ -584,7 +586,11 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
# FIXME: we should unify this with the solaris case above.
|
||||
BASIC_CHECK_TOOLS(STRIP, strip)
|
||||
BASIC_FIXUP_EXECUTABLE(STRIP)
|
||||
BASIC_CHECK_TOOLS(NM, nm)
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
BASIC_CHECK_TOOLS(NM, nm gcc-nm)
|
||||
else
|
||||
BASIC_CHECK_TOOLS(NM, nm)
|
||||
fi
|
||||
BASIC_FIXUP_EXECUTABLE(NM)
|
||||
GNM="$NM"
|
||||
AC_SUBST(GNM)
|
||||
@ -717,6 +723,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_CC)
|
||||
BASIC_REQUIRE_PROGS(BUILD_CXX, [cl CC g++])
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
|
||||
BASIC_PATH_PROGS(BUILD_NM, nm gcc-nm)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_NM)
|
||||
BASIC_PATH_PROGS(BUILD_AR, ar gcc-ar)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_AR)
|
||||
# Assume the C compiler is the assembler
|
||||
BUILD_AS="$BUILD_CC -c"
|
||||
# Just like for the target compiler, use the compiler as linker
|
||||
BUILD_LD="$BUILD_CC"
|
||||
|
||||
PATH="$OLDPATH"
|
||||
@ -726,15 +739,21 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
BUILD_CC="$CC"
|
||||
BUILD_CXX="$CXX"
|
||||
BUILD_LD="$LD"
|
||||
BUILD_NM="$NM"
|
||||
BUILD_AS="$AS"
|
||||
BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
|
||||
BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
|
||||
BUILD_AR="$AR"
|
||||
fi
|
||||
|
||||
AC_SUBST(BUILD_CC)
|
||||
AC_SUBST(BUILD_CXX)
|
||||
AC_SUBST(BUILD_LD)
|
||||
AC_SUBST(BUILD_NM)
|
||||
AC_SUBST(BUILD_AS)
|
||||
AC_SUBST(BUILD_SYSROOT_CFLAGS)
|
||||
AC_SUBST(BUILD_SYSROOT_LDFLAGS)
|
||||
AC_SUBST(BUILD_AR)
|
||||
])
|
||||
|
||||
# Setup legacy variables that are still needed as alternative ways to refer to
|
||||
|
@ -475,33 +475,29 @@ jdk.localedata_COPY := _dict _th
|
||||
jdk.localedata_EXCLUDE_FILES += sun/text/resources/th/BreakIteratorRules_th.java
|
||||
|
||||
################################################################################
|
||||
# Setup the compilation of each module
|
||||
#
|
||||
# Do not include nashorn src here since it needs to be compiled separately due
|
||||
# to nasgen.
|
||||
# Setup the compilation for the module
|
||||
#
|
||||
# Order src dirs in order of override with the most important first. Generated
|
||||
# source before static source and platform specific source before shared.
|
||||
#
|
||||
# To use this variable, use $(call ALL_SRC_DIRS,module) with no space.
|
||||
GENERATED_SRC_DIRS += \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/$1 \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc_no_docs/$1 \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE) \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc_no_docs/$(MODULE) \
|
||||
#
|
||||
|
||||
OS_SRC_DIRS += $(JDK_TOPDIR)/src/$1/$(OPENJDK_TARGET_OS)/classes
|
||||
OS_SRC_DIRS += $(JDK_TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS)/classes
|
||||
ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
|
||||
OS_TYPE_SRC_DIRS += $(JDK_TOPDIR)/src/$1/$(OPENJDK_TARGET_OS_TYPE)/classes
|
||||
OS_TYPE_SRC_DIRS += $(JDK_TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/classes
|
||||
endif
|
||||
|
||||
SHARE_SRC_DIRS += \
|
||||
$(HOTSPOT_TOPDIR)/src/$1/share/classes \
|
||||
$(JDK_TOPDIR)/src/$1/share/classes \
|
||||
$(LANGTOOLS_TOPDIR)/src/$1/share/classes \
|
||||
$(CORBA_TOPDIR)/src/$1/share/classes \
|
||||
$(JAXP_TOPDIR)/src/$1/share/classes \
|
||||
$(JAXWS_TOPDIR)/src/$1/share/classes \
|
||||
$(NASHORN_TOPDIR)/src/$1/share/classes \
|
||||
$(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
$(JDK_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
$(LANGTOOLS_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
$(CORBA_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
$(JAXP_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
$(JAXWS_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
$(NASHORN_TOPDIR)/src/$(MODULE)/share/classes \
|
||||
#
|
||||
|
||||
ALL_SRC_DIRS = \
|
||||
@ -511,11 +507,6 @@ ALL_SRC_DIRS = \
|
||||
$(SHARE_SRC_DIRS) \
|
||||
#
|
||||
|
||||
# Find all modules with java sources. Filter out nashorn since it needs to be
|
||||
# compiled separately.
|
||||
ALL_JAVA_MODULES := $(filter-out jdk.scripting.nashorn, $(call FindJavaModules))
|
||||
JAVA_MODULES := $(ALL_JAVA_MODULES)
|
||||
|
||||
# The JDK_USER_DEFINED_FILTER is a poor man's incremental build: by specifying
|
||||
# JDK_FILTER at the make command line, only a subset of the JDK java files will
|
||||
# be recompiled. If multiple paths are separated by comma, convert that into a
|
||||
@ -526,50 +517,39 @@ JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER)))
|
||||
EMPTY_DIR := $(SUPPORT_OUTPUTDIR)/empty-dir
|
||||
$(call MakeDir, $(EMPTY_DIR))
|
||||
|
||||
# This macro sets up compilation of a module and declares dependencies for it.
|
||||
# Param 1 - module name
|
||||
define SetupModuleCompilation
|
||||
# Find the module dependencies by parsing modules.list file
|
||||
$1_DEPS := $$(call FindDepsForModule, $1)
|
||||
# Find the module dependencies by parsing modules.list file
|
||||
DEPS := $(call FindDepsForModule, $(MODULE))
|
||||
|
||||
$1_CLASSPATH := $$(foreach d,$$($1_DEPS), $$(if $$($$d_BIN), $$($$d_BIN), \
|
||||
$(JDK_OUTPUTDIR)/modules/$$d))
|
||||
# When crypto classes are prebuilt, need to look for classes already in
|
||||
# output dir.
|
||||
ifneq ($(BUILD_CRYPTO), true)
|
||||
$1_CLASSPATH += $(JDK_OUTPUTDIR)/modules/$1
|
||||
endif
|
||||
ifeq ($1, jdk.hotspot.agent)
|
||||
## The source of this module is compiled elsewhere, hotspot, and imported.
|
||||
## Service types are required in the classpath when compiing module-info
|
||||
$1_CLASSPATH := $$($1_CLASSPATH) $$(addprefix $(JDK_OUTPUTDIR)/modules/,jdk.hotspot.agent)
|
||||
endif
|
||||
$1_JAVAC_FLAGS := -bootclasspath $(EMPTY_DIR) -extdirs $(EMPTY_DIR) -endorseddirs $(EMPTY_DIR) $$($1_ADD_JAVAC_FLAGS)
|
||||
CLASSPATH := $(foreach d, $(DEPS), $(if $($d_BIN), $($d_BIN), \
|
||||
$(JDK_OUTPUTDIR)/modules/$d))
|
||||
# When crypto classes are prebuilt, need to look for classes already in
|
||||
# output dir.
|
||||
ifneq ($(BUILD_CRYPTO), true)
|
||||
CLASSPATH += $(JDK_OUTPUTDIR)/modules/$(MODULE)
|
||||
endif
|
||||
JAVAC_FLAGS := -bootclasspath $(EMPTY_DIR) -extdirs $(EMPTY_DIR) \
|
||||
-endorseddirs $(EMPTY_DIR) $($(MODULE)_ADD_JAVAC_FLAGS)
|
||||
|
||||
$$(eval $$(call SetupJavaCompilation,$1, \
|
||||
SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \
|
||||
SRC := $$(if $$($1_SRC), $$($1_SRC), $$(wildcard $$(call ALL_SRC_DIRS,$1))), \
|
||||
INCLUDES := $(JDK_USER_DEFINED_FILTER),\
|
||||
BIN := $$(if $$($1_BIN), $$($1_BIN), $(JDK_OUTPUTDIR)/modules/$1), \
|
||||
HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$1, \
|
||||
CLASSPATH := $$($1_CLASSPATH), \
|
||||
ADD_JAVAC_FLAGS := $$($1_ADD_JAVAC_FLAGS) $$($1_JAVAC_FLAGS)))
|
||||
$(eval $(call SetupJavaCompilation, $(MODULE), \
|
||||
SETUP := $(if $($(MODULE)_SETUP), $($(MODULE)_SETUP), GENERATE_JDKBYTECODE), \
|
||||
SRC := $(if $($(MODULE)_SRC), $($(MODULE)_SRC), $(wildcard $(ALL_SRC_DIRS))), \
|
||||
INCLUDES := $(JDK_USER_DEFINED_FILTER),\
|
||||
BIN := $(if $($(MODULE)_BIN), $($(MODULE)_BIN), $(JDK_OUTPUTDIR)/modules/$(MODULE)), \
|
||||
HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$(MODULE), \
|
||||
CLASSPATH := $(CLASSPATH), \
|
||||
ADD_JAVAC_FLAGS := $($(MODULE)_ADD_JAVAC_FLAGS) $(JAVAC_FLAGS) \
|
||||
))
|
||||
|
||||
$1: $$($1) $$($1_COPY_EXTRA)
|
||||
TARGETS += $($(MODULE)) $($(MODULE)_COPY_EXTRA)
|
||||
|
||||
# Declare dependencies between java compilation of different modules.
|
||||
# Since not all modules have been declared yet, or might be declared
|
||||
# in different invocations of this file, use the macro to find the
|
||||
# correct target file to depend on.
|
||||
# Only the javac compilation actually depends on other modules so limit
|
||||
# dependency declaration to that by using the *_COMPILE_TARGET variable.
|
||||
$$($1_COMPILE_TARGETS): $$(foreach d,$$($1_DEPS), \
|
||||
$$(call SetupJavaCompilationCompileTarget, $$d, \
|
||||
$$(if $$($$d_BIN), $$($$d_BIN), $(JDK_OUTPUTDIR)/modules/$$d)))
|
||||
endef
|
||||
|
||||
# Setup compilation for each module
|
||||
$(foreach m,$(JAVA_MODULES),$(eval $(call SetupModuleCompilation,$m)))
|
||||
# Declare dependencies between java compilations of different modules.
|
||||
# Since the other modules are declared in different invocations of this file,
|
||||
# use the macro to find the correct target file to depend on.
|
||||
# Only the javac compilation actually depends on other modules so limit
|
||||
# dependency declaration to that by using the *_COMPILE_TARGET variable.
|
||||
$($(MODULE)_COMPILE_TARGET): $(foreach d, $($(MODULE)_DEPS), \
|
||||
$(call SetupJavaCompilationCompileTarget, $d, \
|
||||
$(if $($d_BIN), $($d_BIN), $(JDK_OUTPUTDIR)/modules/$d)))
|
||||
|
||||
################################################################################
|
||||
# Copy zh_HK properties files from zh_TW
|
||||
@ -577,15 +557,21 @@ $(foreach m,$(JAVA_MODULES),$(eval $(call SetupModuleCompilation,$m)))
|
||||
$(JDK_OUTPUTDIR)/modules/%_zh_HK.properties: $(JDK_OUTPUTDIR)/modules/%_zh_TW.properties
|
||||
$(install-file)
|
||||
|
||||
define CreateHkTargets
|
||||
$(patsubst $(JDK_TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
|
||||
$(subst /share/classes,, \
|
||||
$(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1))))
|
||||
endef
|
||||
CreateHkTargets = \
|
||||
$(patsubst $(JDK_TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
|
||||
$(subst /share/classes,, \
|
||||
$(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1))))
|
||||
|
||||
java.sql.rowset: $(call CreateHkTargets, $(java.sql.rowset_CLEAN_FILES))
|
||||
java.rmi: $(call CreateHkTargets, $(java.rmi_CLEAN_FILES))
|
||||
ifeq ($(MODULE), java.sql.rowset)
|
||||
TARGETS += $(call CreateHkTargets, $(java.sql.rowset_CLEAN_FILES))
|
||||
endif
|
||||
|
||||
all: $(JAVA_MODULES)
|
||||
ifeq ($(MODULE), java.rmi)
|
||||
TARGETS += $(call CreateHkTargets, $(java.rmi_CLEAN_FILES))
|
||||
endif
|
||||
|
||||
.PHONY: all $(JAVA_MODULES)
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
||||
|
@ -65,8 +65,8 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
MAIN_MODULES += jdk.deploy.osx
|
||||
endif
|
||||
|
||||
JRE_MODULES := $(MAIN_MODULES) $(PROVIDER_MODULES)
|
||||
JDK_MODULES := $(JRE_MODULES) $(TOOLS_MODULES)
|
||||
JRE_MODULES := $(filter-out $(MODULES_FILTER), $(MAIN_MODULES) $(PROVIDER_MODULES))
|
||||
JDK_MODULES := $(filter-out $(MODULES_FILTER), $(JRE_MODULES) $(TOOLS_MODULES))
|
||||
|
||||
# compact3 builds have additional modules
|
||||
JDK_COMPACT3_MODULES := java.compact3 java.smartcardio jdk.httpserver jdk.naming.dns \
|
||||
@ -510,7 +510,6 @@ $(JDK_TARGETS): $(TOOL_JDK_TARGETS)
|
||||
jimages: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS) \
|
||||
$(SYMBOLS_TARGETS)
|
||||
|
||||
|
||||
$(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS)
|
||||
$(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS)
|
||||
$(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS)
|
||||
|
@ -49,7 +49,7 @@ endif
|
||||
# When running in JPRT these will be provided. Need defaults so that this makefile
|
||||
# is valid anyway.
|
||||
ifndef JPRT_ARCHIVE_BUNDLE
|
||||
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
|
||||
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/jdk-image.zip
|
||||
endif
|
||||
ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
|
||||
JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
|
||||
|
@ -144,8 +144,8 @@ JAVA_TARGETS := $(addsuffix -java, $(JAVA_MODULES))
|
||||
|
||||
define DeclareCompileJavaRecipe
|
||||
$1-java:
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CompileJavaModules.gmk \
|
||||
$1 JAVA_MODULES=$1 MODULE=$1)
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \
|
||||
-f CompileJavaModules.gmk MODULE=$1)
|
||||
endef
|
||||
|
||||
$(foreach m, $(filter-out jdk.scripting.nashorn, $(JAVA_MODULES)), \
|
||||
@ -154,7 +154,8 @@ $(foreach m, $(filter-out jdk.scripting.nashorn, $(JAVA_MODULES)), \
|
||||
# Build nashorn. Needs to be compiled separately from the rest of the modules
|
||||
# due to nasgen.
|
||||
jdk.scripting.nashorn-java:
|
||||
+($(CD) $(NASHORN_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildNashorn.gmk compile)
|
||||
+($(CD) $(NASHORN_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
|
||||
-f BuildNashorn.gmk compile)
|
||||
|
||||
ALL_TARGETS += $(JAVA_TARGETS)
|
||||
|
||||
@ -195,7 +196,7 @@ ALL_TARGETS += $(LAUNCHER_TARGETS)
|
||||
|
||||
ifeq ($(BUILD_HOTSPOT),true)
|
||||
hotspot:
|
||||
($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
|
||||
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
|
||||
endif
|
||||
|
||||
ALL_TARGETS += hotspot
|
||||
@ -511,7 +512,7 @@ launchers: $(LAUNCHER_TARGETS)
|
||||
jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
|
||||
|
||||
# Declare dependencies from <module> to all the individual targets specific
|
||||
# to that module <module>-*.
|
||||
# to that module <module>-*, that are needed for the exploded image.
|
||||
$(foreach m, $(GENSRC_MODULES), $(eval $m: $m-gensrc))
|
||||
$(foreach m, $(JAVA_MODULES), $(eval $m: $m-java))
|
||||
$(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
|
||||
@ -520,15 +521,12 @@ $(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
|
||||
$(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
|
||||
$(foreach m, $(COPY_MODULES), $(eval $m: $m-copy))
|
||||
|
||||
ALL_MODULE_TARGETS := $(sort $(GENSRC_MODULES) $(JAVA_MODULES) \
|
||||
$(GENDATA_MODULES) $(LIBS_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES))
|
||||
|
||||
demos: demos-jdk
|
||||
|
||||
samples: samples-jdk
|
||||
|
||||
# The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk.
|
||||
exploded-image: $(ALL_MODULE_TARGETS)
|
||||
exploded-image: $(ALL_MODULES)
|
||||
|
||||
mac-bundles: mac-bundles-jdk
|
||||
|
||||
@ -554,7 +552,7 @@ test-image: prepare-test-image test-image-hotspot-jtreg-native \
|
||||
all-images: product-images test-image docs-image
|
||||
|
||||
ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \
|
||||
jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) demos samples exploded-image \
|
||||
jdk.jdwp.agent-gensrc $(ALL_MODULES) demos samples exploded-image \
|
||||
mac-bundles product-images docs-image test-image all-images
|
||||
|
||||
################################################################################
|
||||
|
@ -74,7 +74,7 @@ define add_file_to_copy
|
||||
# already has one
|
||||
ifneq ($$($1_COPY_$$($2_TARGET)), 1)
|
||||
$1_COPY_$$($2_TARGET) := 1
|
||||
# Now we can setup the depency that will trigger the copying.
|
||||
# Now we can setup the dependency that will trigger the copying.
|
||||
$$($1_BIN)$$($2_TARGET) : $2
|
||||
$(MKDIR) -p $$(@D)
|
||||
$(CP) $$< $$@
|
||||
@ -311,22 +311,23 @@ define SetupJavaCompilationBody
|
||||
$1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst \
|
||||
$$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
|
||||
|
||||
$1_COMPILE_TARGET := $$($1_BIN)/_the.$1_batch
|
||||
|
||||
ifeq ($$($1_DISABLE_SJAVAC)x$$(ENABLE_SJAVAC),xyes)
|
||||
# Using sjavac to compile.
|
||||
|
||||
ifneq (,$$($1_HEADERS))
|
||||
$1_HEADERS_ARG := -h $$($1_HEADERS)
|
||||
endif
|
||||
|
||||
# Using sjavac to compile.
|
||||
$1_COMPILE_TARGETS := $$($1_BIN)/_the.$1_batch
|
||||
|
||||
$1_VARDEPS := $$($1_JVM) $$($1_SJAVAC) $$($1_SJAVAC_ARGS) $$($1_FLAGS) \
|
||||
$$($1_HEADERS_ARG) $$($1_BIN) $$($1_EXCLUDES) $$($1_INCLUDES) \
|
||||
$$($1_EXCLUDE_FILES) $$($1_INCLUDE_FILES)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_BIN)/_the.$1.vardeps)
|
||||
|
||||
$$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
|
||||
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
|
||||
$(MKDIR) -p $$(@D) $$(dir $$($1_SJAVAC_PORTFILE))
|
||||
$$(eval $$(call ListPathsSafely,$1_SRCS, $$($1_BIN)/_the.$1_batch.tmp))
|
||||
$$(eval $$(call ListPathsSafely,$1_SRCS, $$@.tmp))
|
||||
$(ECHO) Compiling $1
|
||||
$(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch.log, $$($1_SAFE_NAME), \
|
||||
$$($1_JVM) $$($1_SJAVAC) \
|
||||
@ -334,14 +335,14 @@ define SetupJavaCompilationBody
|
||||
-j 1 \
|
||||
--permit-unidentified-artifacts \
|
||||
--permit-sources-without-package \
|
||||
--compare-found-sources $$($1_BIN)/_the.$1_batch.tmp \
|
||||
--compare-found-sources $$@.tmp \
|
||||
--log=$(LOG_LEVEL) \
|
||||
--state-dir=$$($1_BIN) \
|
||||
$$($1_SJAVAC_ARGS) \
|
||||
$$($1_FLAGS) \
|
||||
$$($1_HEADERS_ARG) \
|
||||
-d $$($1_BIN)) && \
|
||||
$(MV) $$($1_BIN)/_the.$1_batch.tmp $$($1_BIN)/_the.$1_batch
|
||||
$(MV) $$@.tmp $$@
|
||||
# Create a pubapi file that only changes when the pubapi changes. Dependent
|
||||
# compilations can use this file to only get recompiled when pubapi has changed.
|
||||
# Grep returns 1 if no matching lines are found. Do not fail for this.
|
||||
@ -354,14 +355,13 @@ define SetupJavaCompilationBody
|
||||
|
||||
else
|
||||
# Using plain javac to batch compile everything.
|
||||
$1_COMPILE_TARGETS := $$($1_BIN)/_the.$1_batch
|
||||
|
||||
# When building in batch, put headers in a temp dir to filter out those that actually
|
||||
# changed before copying them to the real header dir.
|
||||
ifneq (,$$($1_HEADERS))
|
||||
$1_HEADERS_ARG := -h $$($1_HEADERS).$1.tmp
|
||||
|
||||
$$($1_HEADERS)/_the.$1_headers: $$($1_BIN)/_the.$1_batch
|
||||
$$($1_HEADERS)/_the.$1_headers: $$($1_COMPILE_TARGET)
|
||||
$(MKDIR) -p $$(@D)
|
||||
if [ -d "$$($1_HEADERS).$1.tmp" ]; then \
|
||||
for f in `ls $$($1_HEADERS).$1.tmp`; do \
|
||||
@ -389,19 +389,19 @@ define SetupJavaCompilationBody
|
||||
endif
|
||||
|
||||
# When not using sjavac, pass along all sources to javac using an @file.
|
||||
$$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
|
||||
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
|
||||
$(MKDIR) -p $$(@D)
|
||||
$$(eval $$(call ListPathsSafely,$1_SRCS, $$($1_BIN)/_the.$1_batch.tmp))
|
||||
$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.$1_batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
|
||||
$$(eval $$(call ListPathsSafely,$1_SRCS, $$@.tmp))
|
||||
$(ECHO) Compiling `$(WC) $$@.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
|
||||
$(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch.log, $$($1_SAFE_NAME), \
|
||||
$$($1_JVM) $$($1_JAVAC_CMD) $$($1_FLAGS) \
|
||||
-implicit:none \
|
||||
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.$1_batch.tmp) && \
|
||||
$(MV) $$($1_BIN)/_the.$1_batch.tmp $$($1_BIN)/_the.$1_batch
|
||||
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$@.tmp) && \
|
||||
$(MV) $$@.tmp $$@
|
||||
endif
|
||||
|
||||
# Add all targets to main variable
|
||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_COMPILE_TARGETS) \
|
||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_COMPILE_TARGET) \
|
||||
$$($1_HEADER_TARGETS)
|
||||
|
||||
# Check if a jar file was specified, then setup the rules for the jar.
|
||||
|
@ -120,9 +120,11 @@ $(eval $(call DefineNativeToolchain, TOOLCHAIN_LINK_CXX, \
|
||||
# are to be run during the build.
|
||||
# The BUILD_SYSROOT_*FLAGS variables are empty for now.
|
||||
$(eval $(call DefineNativeToolchain, TOOLCHAIN_BUILD, \
|
||||
EXTENDS := TOOLCHAIN_DEFAULT, \
|
||||
CC := $(BUILD_CC), \
|
||||
CXX := $(BUILD_CXX), \
|
||||
LD := $(BUILD_LD), \
|
||||
AR := $(BUILD_AR), \
|
||||
AS := $(BUILD_AS), \
|
||||
SYSROOT_CFLAGS := $(BUILD_SYSROOT_CFLAGS), \
|
||||
SYSROOT_LDFLAGS := $(BUILD_SYSROOT_LDFLAGS), \
|
||||
))
|
||||
|
Loading…
Reference in New Issue
Block a user