Skip to content

Commit f15ad43

Browse files
Avoid rebuilding native code headers for OpenJCEPlus
Some OpenJCEPlus headers are already compiled as part of a previous target, so there is no reason to recompile them. Instead an additional variable is passed as part of the make command to indicate that this step can be skipped. Signed-off-by: Kostas Tsiounis <[email protected]>
1 parent 0a1e190 commit f15ad43

File tree

1 file changed

+15
-9
lines changed
  • closed/make/modules/openjceplus

1 file changed

+15
-9
lines changed

closed/make/modules/openjceplus/Lib.gmk

+15-9
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ include LibCommon.gmk
2323
ifeq (true,$(BUILD_OPENJCEPLUS))
2424

2525
# Identify the desired JGSKIT target platform.
26-
OPENJCEPLUS_BOOT_JDK := $(BOOT_JDK)
26+
EXPORT_COMPILER_ENV_VARS :=
27+
OPENJCEPLUS_JDK := $(JDK_OUTPUTDIR)
2728
OPENJCEPLUS_GSKIT_HOME := $(OPENJCEPLUS_TOPDIR)/ock/jgsk_sdk
29+
OPENJCEPLUS_HEADER_FILES := $(SUPPORT_OUTPUTDIR)/headers/openjceplus
2830
OPENJCEPLUS_JCE_CLASSPATH := $(JDK_OUTPUTDIR)/modules/openjceplus:$(JDK_OUTPUTDIR)/modules/java.base
2931
OPENJCEPLUS_JGSKIT_MAKE := jgskit.mak
3032
OPENJCEPLUS_JGSKIT_MAKE_PATH := $(OPENJCEPLUS_TOPDIR)/src/main/native
3133
OPENJCEPLUS_JGSKIT_PLATFORM :=
32-
OPENJCEPLUS_VS_LIB :=
3334

3435
ifeq ($(call isTargetOs, aix), true)
3536
OPENJCEPLUS_JGSKIT_PLATFORM := ppc-aix64
@@ -43,12 +44,13 @@ else ifeq ($(call isTargetOs, linux), true)
4344
endif
4445
else ifeq ($(call isTargetOs, windows), true)
4546
ifeq ($(call isTargetCpu, x86_64), true)
46-
OPENJCEPLUS_BOOT_JDK := $(call MixedPath,$(OPENJCEPLUS_BOOT_JDK))
47+
EXPORT_COMPILER_ENV_VARS := LIB='$(OPENJ9_VS_LIB)'
48+
OPENJCEPLUS_JDK := $(call MixedPath,$(OPENJCEPLUS_JDK))
4749
OPENJCEPLUS_GSKIT_HOME := $(call MixedPath,$(OPENJCEPLUS_GSKIT_HOME))
48-
OPENJCEPLUS_JCE_CLASSPATH := "$(call MixedPath,$(JDK_OUTPUTDIR)/modules/openjceplus)\;$(call MixedPath,$(JDK_OUTPUTDIR)/modules/java.base)"
50+
OPENJCEPLUS_HEADER_FILES := $(call MixedPath,$(OPENJCEPLUS_HEADER_FILES))
51+
OPENJCEPLUS_JCE_CLASSPATH := "$(call MixedPath,$(JDK_OUTPUTDIR)/modules/openjceplus);$(call MixedPath,$(JDK_OUTPUTDIR)/modules/java.base)"
4952
OPENJCEPLUS_JGSKIT_MAKE := jgskit.win64.mak
5053
OPENJCEPLUS_JGSKIT_PLATFORM := win64
51-
OPENJCEPLUS_VS_LIB := LIB='$(OPENJ9_VS_LIB)'
5254
endif
5355
endif
5456

@@ -60,13 +62,17 @@ endif # OPENJCEPLUS_JGSKIT_PLATFORM
6062

6163
compile-libs :
6264
@$(ECHO) Compiling OpenJCEPlus native code
63-
export \
64-
$(OPENJCEPLUS_VS_LIB) \
65+
$(EXPORT_COMPILER_ENV_VARS) \
66+
$(MAKE) \
67+
-C $(OPENJCEPLUS_JGSKIT_MAKE_PATH) \
68+
-f $(OPENJCEPLUS_JGSKIT_MAKE) \
69+
EXTERNAL_HEADERS=true \
6570
GSKIT_HOME=$(OPENJCEPLUS_GSKIT_HOME) \
66-
JAVA_HOME=$(OPENJCEPLUS_BOOT_JDK) \
71+
JAVA_HOME=$(OPENJCEPLUS_JDK) \
6772
JCE_CLASSPATH=$(OPENJCEPLUS_JCE_CLASSPATH) \
73+
OPENJCEPLUS_HEADER_FILES=$(OPENJCEPLUS_HEADER_FILES) \
6874
PLATFORM=$(OPENJCEPLUS_JGSKIT_PLATFORM) \
69-
&& $(MAKE) -j1 -C $(OPENJCEPLUS_JGSKIT_MAKE_PATH) -f $(OPENJCEPLUS_JGSKIT_MAKE) all
75+
all
7076
@$(ECHO) OpenJCEplus compile complete
7177

7278
TARGETS += compile-libs

0 commit comments

Comments
 (0)