Process extra header dirs syntax.
--- a/make/common/JdkNativeCompilation.gmk Fri May 04 00:23:32 2018 +0200
+++ b/make/common/JdkNativeCompilation.gmk Fri May 04 00:50:29 2018 +0200
@@ -50,6 +50,17 @@
FindHeaderDirForModule = \
$(wildcard $(SUPPORT_OUTPUTDIR)/headers/$(strip $1))
+ProcessDir = \
+ $(if $(findstring :, $1), \
+ $(call FindSrcDirsForComponent, $(firstword $(subst :, , $1)), $(lastword $(subst :, , $1))) \
+ , \
+ $(if $(filter /%, $1), \
+ $1 \
+ , \
+ $(call FindSrcDirsForComponent, $(MODULE), $1) \
+ ) \
+ )
+
# Setup make rules for creating a native shared library with suitable defaults
# for the OpenJDK project.
#
@@ -104,7 +115,8 @@
$$(call FindHeaderDirForModule, $$(MODULE))), -I$$(dir))
endif
ifneq ($$($1_EXTRA_HEADER_DIRS), )
- $1_EXTRA_HEADER_FLAGS := $$(foreach dir, $$($1_EXTRA_HEADER_DIRS), -I$$(dir))
+ $1_PROCESSED_EXTRA_HEADER_DIRS := $$(foreach dir, $$($1_EXTRA_HEADER_DIRS), $$(call ProcessDir, $$(dir)))
+ $1_EXTRA_HEADER_FLAGS := $$(foreach dir, $$($1_PROCESSED_EXTRA_HEADER_DIRS), -I$$(dir))
endif
ifneq ($$($1_CFLAGS), )
--- a/make/lib/Awt2dLibraries.gmk Fri May 04 00:23:32 2018 +0200
+++ b/make/lib/Awt2dLibraries.gmk Fri May 04 00:50:29 2018 +0200
@@ -28,11 +28,11 @@
WIN_AWT_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt/awt.lib
LIBAWT_DEFAULT_HEADER_DIRS := \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/awt/image) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/awt/image/cvutils) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/java2d) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/java2d/loops) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/java2d/pipe) \
+ libawt/awt/image \
+ libawt/awt/image/cvutils \
+ libawt/java2d \
+ libawt/java2d/loops \
+ libawt/java2d/pipe \
#
################################################################################
@@ -203,16 +203,16 @@
LIBAWT_EXTRA_HEADER_DIRS := \
$(LIBAWT_DEFAULT_HEADER_DIRS) \
$(call FindHeaderDirForModule, java.base) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/awt/medialib) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/java2d/d3d) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/java2d/opengl) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/java2d/windows) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/windows) \
- $(call FindSrcDirsForComponent, $(MODULE), common/awt/medialib) \
- $(call FindSrcDirsForComponent, $(MODULE), libmlib_image) \
- $(call FindSrcDirsForComponent, $(MODULE), include) \
- $(call FindSrcDirsForComponent, java.base, libjava) \
- $(call FindSrcDirsForComponent, java.base, include) \
+ libawt/awt/medialib \
+ libawt/java2d/d3d \
+ libawt/java2d/opengl \
+ libawt/java2d/windows \
+ libawt/windows \
+ common/awt/medialib \
+ libmlib_image \
+ include \
+ java.base:libjava \
+ java.base:include \
#
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
@@ -313,13 +313,13 @@
LIBAWT_XAWT_EXTRA_HEADER_DIRS := \
$(LIBAWT_DEFAULT_HEADER_DIRS) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt_xawt/awt) \
- $(call FindSrcDirsForComponent, $(MODULE), include) \
- $(call FindSrcDirsForComponent, $(MODULE), common/awt/debug) \
- $(call FindSrcDirsForComponent, $(MODULE), common/awt/systemscale) \
- $(call FindSrcDirsForComponent, $(MODULE), common/font) \
- $(call FindSrcDirsForComponent, $(MODULE), common/java2d/opengl) \
- $(call FindSrcDirsForComponent, $(MODULE), common/java2d/x11) \
+ libawt_xawt/awt \
+ include \
+ common/awt/debug \
+ common/awt/systemscale \
+ common/font \
+ common/java2d/opengl \
+ common/java2d/x11 \
#
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_XAWT, \
@@ -379,8 +379,8 @@
CFLAGS_solaris := -xc99=no_lib, \
CFLAGS_windows := -DCMS_IS_WINDOWS_, \
EXTRA_HEADER_DIRS := \
- $(call FindSrcDirsForComponent, $(MODULE), common/awt/debug) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/java2d), \
+ common/awt/debug \
+ libawt/java2d, \
HEADERS_FROM_SRC := $(LIBLCMS_HEADERS_FROM_SRC), \
DISABLED_WARNINGS_gcc := format-nonliteral type-limits misleading-indentation, \
DISABLED_WARNINGS_clang := tautological-compare, \
@@ -454,9 +454,9 @@
LIBAWT_HEADLESS_EXTRA_HEADER_DIRS := \
$(LIBAWT_DEFAULT_HEADER_DIRS) \
- $(call FindSrcDirsForComponent, $(MODULE), common/awt/debug) \
- $(call FindSrcDirsForComponent, $(MODULE), common/font) \
- $(call FindSrcDirsForComponent, $(MODULE), common/java2d/opengl) \
+ common/awt/debug \
+ common/font \
+ common/java2d/opengl \
#
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_HEADLESS, \
@@ -581,13 +581,13 @@
endif
LIBFONTMANAGER_EXTRA_HEADER_DIRS := \
- $(call FindSrcDirsForComponent, $(MODULE), libfontmanager/harfbuzz) \
- $(call FindSrcDirsForComponent, $(MODULE), libfontmanager/harfbuzz/hb-ucdn) \
- $(call FindSrcDirsForComponent, $(MODULE), common/awt) \
- $(call FindSrcDirsForComponent, $(MODULE), common/font) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/java2d) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/java2d/pipe) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/java2d/loops) \
+ libfontmanager/harfbuzz \
+ libfontmanager/harfbuzz/hb-ucdn \
+ common/awt \
+ common/font \
+ libawt/java2d \
+ libawt/java2d/pipe \
+ libawt/java2d/loops \
#
#
@@ -660,14 +660,14 @@
endif
LIBJAWT_EXTRA_HEADER_DIRS := \
- $(call FindSrcDirsForComponent, $(MODULE), include) \
- $(call FindSrcDirsForComponent, $(MODULE), common/awt/debug) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/awt/image/cvutils) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/java2d) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/java2d/windows) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt/windows) \
- $(call FindSrcDirsForComponent, java.base, include) \
- $(call FindSrcDirsForComponent, java.base, libjava) \
+ include \
+ common/awt/debug \
+ libawt/awt/image/cvutils \
+ libawt/java2d \
+ libawt/java2d/windows \
+ libawt/windows \
+ java.base:include \
+ java.base:libjava \
#
$(eval $(call SetupJdkLibrary, BUILD_LIBJAWT, \
@@ -725,8 +725,8 @@
CFLAGS := $(CFLAGS_JDKLIB) \
$(JAWT_CFLAGS), \
EXTRA_HEADER_DIRS := \
- $(call FindSrcDirsForComponent, $(MODULE), include) \
- $(call FindSrcDirsForComponent, $(MODULE), common/awt), \
+ include \
+ common/awt, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
@@ -841,9 +841,9 @@
endif
LIBSPLASHSCREEN_HEADER_DIRS += \
- $(call FindSrcDirsForComponent, $(MODULE), libosxapp) \
- $(call FindSrcDirsForComponent, java.base, include) \
- $(call FindSrcDirsForComponent, java.base, libjava) \
+ libosxapp \
+ java.base:include \
+ java.base:libjava \
#
$(eval $(call SetupJdkLibrary, BUILD_LIBSPLASHSCREEN, \
@@ -897,13 +897,13 @@
LIBAWT_LWAWT_EXTRA_HEADER_DIRS := \
$(LIBAWT_DEFAULT_HEADER_DIRS) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt_lwawt/awt) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt_lwawt/font) \
- $(call FindSrcDirsForComponent, $(MODULE), libawt_lwawt/java2d/opengl) \
- $(call FindSrcDirsForComponent, $(MODULE), include) \
- $(call FindSrcDirsForComponent, $(MODULE), common/awt/debug) \
- $(call FindSrcDirsForComponent, $(MODULE), common/java2d/opengl) \
- $(call FindSrcDirsForComponent, $(MODULE), libosxapp) \
+ libawt_lwawt/awt \
+ libawt_lwawt/font \
+ libawt_lwawt/java2d/opengl \
+ include \
+ common/awt/debug \
+ common/java2d/opengl \
+ libosxapp \
#
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_LWAWT, \
@@ -957,8 +957,8 @@
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
EXTRA_HEADER_DIRS := \
- $(call FindSrcDirsForComponent, $(MODULE), libawt_lwawt/awt) \
- $(call FindSrcDirsForComponent, $(MODULE), libosxapp), \
+ libawt_lwawt/awt \
+ libosxapp, \
DISABLED_WARNINGS_clang := deprecated-declarations, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
--- a/make/lib/CoreLibraries.gmk Fri May 04 00:23:32 2018 +0200
+++ b/make/lib/CoreLibraries.gmk Fri May 04 00:50:29 2018 +0200
@@ -132,7 +132,7 @@
$(LIBJAVA_CFLAGS), \
System.c_CFLAGS := $(VERSION_CFLAGS), \
jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \
- EXTRA_HEADER_DIRS := $(call FindSrcDirsForComponent, java.base, libfdlibm), \
+ EXTRA_HEADER_DIRS := libfdlibm, \
WARNINGS_AS_ERRORS_xlc := false, \
DISABLED_WARNINGS_gcc := unused-result, \
DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
--- a/make/lib/Lib-java.base.gmk Fri May 04 00:23:32 2018 +0200
+++ b/make/lib/Lib-java.base.gmk Fri May 04 00:50:29 2018 +0200
@@ -72,9 +72,9 @@
WARNINGS_AS_ERRORS_xlc := false, \
CFLAGS := $(CFLAGS_JDKLIB), \
EXTRA_HEADER_DIRS := \
- $(call FindSrcDirsForComponent, java.base, libnio/ch) \
- $(call FindSrcDirsForComponent, java.base, libnio/fs) \
- $(call FindSrcDirsForComponent, java.base, libnet), \
+ libnio/ch \
+ libnio/fs \
+ libnet, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljava -lnet, \
--- a/make/lib/Lib-java.desktop.gmk Fri May 04 00:23:32 2018 +0200
+++ b/make/lib/Lib-java.desktop.gmk Fri May 04 00:50:29 2018 +0200
@@ -118,7 +118,7 @@
NAME := osx, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
- EXTRA_HEADER_DIRS := $(call FindSrcDirsForComponent, $MODULE, libosxapp), \
+ EXTRA_HEADER_DIRS := libosxapp, \
DISABLED_WARNINGS_clang := deprecated-declarations, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
-L$(SUPPORT_OUTPUTDIR)/modules_libs/java.desktop \
--- a/make/lib/Lib-java.instrument.gmk Fri May 04 00:23:32 2018 +0200
+++ b/make/lib/Lib-java.instrument.gmk Fri May 04 00:50:29 2018 +0200
@@ -47,7 +47,7 @@
CFLAGS := $(LIBINSTRUMENT_CFLAGS_JDKLIB) $(LIBINSTRUMENT_CFLAGS), \
CFLAGS_debug := -DJPLIS_LOGGING, \
CFLAGS_release := -DNO_JPLIS_LOGGING, \
- EXTRA_HEADER_DIRS := $(call FindSrcDirsForComponent, java.base, libjli), \
+ EXTRA_HEADER_DIRS := java.base:libjli, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(LIBINSTRUMENT_LDFLAGS), \
--- a/make/lib/Lib-java.smartcardio.gmk Fri May 04 00:23:32 2018 +0200
+++ b/make/lib/Lib-java.smartcardio.gmk Fri May 04 00:50:29 2018 +0200
@@ -31,7 +31,7 @@
NAME := j2pcsc, \
CFLAGS := $(CFLAGS_JDKLIB), \
CFLAGS_unix := -D__sun_jdk, \
- EXTRA_HEADER_DIRS := $(call FindSrcDirsForComponent, $(MODULE), libj2pcsc/MUSCLE), \
+ EXTRA_HEADER_DIRS := libj2pcsc/MUSCLE, \
OPTIMIZATION := LOW, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/make/lib/Lib-jdk.accessibility.gmk Fri May 04 00:23:32 2018 +0200
+++ b/make/lib/Lib-jdk.accessibility.gmk Fri May 04 00:50:29 2018 +0200
@@ -42,9 +42,9 @@
CFLAGS := $(CFLAGS_JDKLIB) \
-DACCESSBRIDGE_ARCH_$2, \
EXTRA_HEADER_DIRS := \
- $(call FindSrcDirsForComponent, jdk.accessibility, include/bridge) \
- $(call FindSrcDirsForComponent, java.base, include) \
- $(call FindSrcDirsForComponent, java.desktop, include), \
+ include/bridge) \
+ java.base:include \
+ java.desktop:include, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LIBS := kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
@@ -70,8 +70,8 @@
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT \
-DACCESSBRIDGE_ARCH_$2, \
EXTRA_HEADER_DIRS := \
- $(call FindSrcDirsForComponent, jdk.accessibility, include/bridge) \
- $(call FindSrcDirsForComponent, java.base, include), \
+ include/bridge \
+ java.base:include, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
-def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
LIBS := kernel32.lib user32.lib gdi32.lib \
--- a/make/lib/Lib-jdk.jdi.gmk Fri May 04 00:23:32 2018 +0200
+++ b/make/lib/Lib-jdk.jdi.gmk Fri May 04 00:50:29 2018 +0200
@@ -34,8 +34,8 @@
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP, \
EXTRA_HEADER_DIRS := \
- $(call FindSrcDirsForComponent, jdk.jdwp.agent, include) \
- $(call FindSrcDirsForComponent, jdk.jdwp.agent, libjdwp/export), \
+ jdk.jdwp.agent:include \
+ jdk.jdwp.agent:libjdwp/export, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LIBS := $(JDKLIB_LIBS), \
))
--- a/make/lib/Lib-jdk.jdwp.agent.gmk Fri May 04 00:23:32 2018 +0200
+++ b/make/lib/Lib-jdk.jdwp.agent.gmk Fri May 04 00:50:29 2018 +0200
@@ -33,8 +33,8 @@
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
$(LIBDT_SOCKET_CPPFLAGS), \
EXTRA_HEADER_DIRS := \
- $(call FindSrcDirsForComponent, $(MODULE), include) \
- $(call FindSrcDirsForComponent, $(MODULE), libjdwp/export), \
+ include \
+ libjdwp/export, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_linux := -lpthread, \
@@ -55,8 +55,8 @@
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -DJDWP_LOGGING, \
EXTRA_HEADER_DIRS := \
- $(call FindSrcDirsForComponent, $(MODULE), include) \
- $(call FindSrcDirsForComponent, $(MODULE), libjdwp/export), \
+ include \
+ libjdwp/export, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(JDKLIB_LIBS), \
--- a/make/lib/Lib-jdk.sctp.gmk Fri May 04 00:23:32 2018 +0200
+++ b/make/lib/Lib-jdk.sctp.gmk Fri May 04 00:50:29 2018 +0200
@@ -36,8 +36,8 @@
CFLAGS := $(CFLAGS_JDKLIB), \
EXTRA_HEADER_DIRS := \
$(call FindHeaderDirForModule, java.base) \
- $(call FindSrcDirsForComponent, java.base, libnet) \
- $(call FindSrcDirsForComponent, java.base, libnio/ch), \
+ java.base:libnet \
+ java.base:libnio/ch, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -lnio -lnet -ljava -ljvm, \