Fix jdk.accessibility.
--- a/make/common/JdkNativeCompilation.gmk Thu Apr 19 15:42:22 2018 +0200
+++ b/make/common/JdkNativeCompilation.gmk Thu Apr 19 21:11:32 2018 +0200
@@ -92,8 +92,15 @@
ifneq ($$($1_HEADERS_FROM_SRC), false)
$1_SRC_HEADER_FLAGS := $$(foreach dir, $$($1_SRC), -I$$(dir))
endif
- $1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_HEADER_FLAGS)
- $1_CXXFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_HEADER_FLAGS)
+ ifneq ($$($1_CFLAGS), )
+ $1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_HEADER_FLAGS)
+ endif
+ ifneq ($$($1_CXXFLAGS), )
+ $1_CXXFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_HEADER_FLAGS)
+ endif
+ ifeq ($$($1_CFLAGS)$$($1_CXXFLAGS), )
+ $1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_HEADER_FLAGS)
+ endif
$1_RC_FLAGS += $$($1_EXTRA_RC_FLAGS)
# Since we reuse the rule name ($1), all our arguments will pass through.
--- a/make/lib/Lib-jdk.accessibility.gmk Thu Apr 19 15:42:22 2018 +0200
+++ b/make/lib/Lib-jdk.accessibility.gmk Thu Apr 19 21:11:32 2018 +0200
@@ -46,10 +46,10 @@
CFLAGS := $(CFLAGS_JDKLIB) \
-DACCESSBRIDGE_ARCH_$2, \
HEADER_FLAGS := \
- -I$(SUPPORT_OUTPUTDIR)/headers/jdk.accessibility \
- -I$(TOPDIR)/src/java.desktop/windows/native/include \
- -I$(TOPDIR)/src/java.desktop/share/native/include
- -I$(ROOT_SRCDIR)/include/bridge, \
+ -I$(call FindHeaderDirForModule, $(MODULE)) \
+ $(addprefix -I, $(call FindSrcDirsForComponent, jdk.accessibility, include/bridge)) \
+ $(addprefix -I, $(call FindSrcDirsForComponent, java.base, include)) \
+ $(addprefix -I, $(call FindSrcDirsForComponent, java.desktop, include)), \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LIBS := kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
@@ -74,10 +74,8 @@
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT \
-DACCESSBRIDGE_ARCH_$2, \
HEADER_FLAGS := \
- -I$(SUPPORT_OUTPUTDIR)/headers/jdk.accessibility \
- -I$(TOPDIR)/src/java.desktop/windows/native/include \
- -I$(TOPDIR)/src/java.desktop/share/native/include
- -I$(ROOT_SRCDIR)/include/bridge, \
+ $(addprefix -I, $(call FindSrcDirsForComponent, jdk.accessibility, include/bridge)) \
+ $(addprefix -I, $(call FindSrcDirsForComponent, java.base, include)), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
-def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
LIBS := kernel32.lib user32.lib gdi32.lib \
@@ -97,10 +95,6 @@
SRC := $(SYSINFO_SRCDIR), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
- HEADER_FLAGS := \
- -I$(SUPPORT_OUTPUTDIR)/headers/jdk.accessibility \
- -I$(TOPDIR)/src/java.desktop/windows/native/include \
- -I$(TOPDIR)/src/java.desktop/share/native/include, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
)