8225140: Build fails if directory contains 'unix'
authorerikj
Mon, 03 Jun 2019 10:52:18 -0700
changeset 55157 1cccaaf46c7b
parent 55156 1c291d1c272c
child 55158 d3e404cc3972
8225140: Build fails if directory contains 'unix' Reviewed-by: tbell
make/common/JdkNativeCompilation.gmk
make/lib/Awt2dLibraries.gmk
--- a/make/common/JdkNativeCompilation.gmk	Mon Jun 03 08:21:04 2019 -0700
+++ b/make/common/JdkNativeCompilation.gmk	Mon Jun 03 10:52:18 2019 -0700
@@ -122,7 +122,9 @@
   endif
 
   ifneq ($$($1_EXCLUDE_SRC_PATTERNS), )
-    $1_EXCLUDE_SRC := $$(call containing, $$($1_EXCLUDE_SRC_PATTERNS), $$($1_SRC))
+    $1_SRC_WITHOUT_WORKSPACE_ROOT := $$(patsubst $$(WORKSPACE_ROOT)/%, %, $$($1_SRC))
+    $1_EXCLUDE_SRC := $$(addprefix %, $$(call containing, $$($1_EXCLUDE_SRC_PATTERNS), \
+        $$($1_SRC_WITHOUT_WORKSPACE_ROOT)))
     $1_SRC := $$(filter-out $$($1_EXCLUDE_SRC), $$($1_SRC))
   endif
 
--- a/make/lib/Awt2dLibraries.gmk	Mon Jun 03 08:21:04 2019 -0700
+++ b/make/lib/Awt2dLibraries.gmk	Mon Jun 03 10:52:18 2019 -0700
@@ -39,7 +39,7 @@
 
 # We must not include java.desktop/unix/native/libmlib_image, which is only
 # for usage by solaris-sparc in libmlib_image_v.
-BUILD_LIBMLIB_EXCLUDE_SRC_PATTERNS := unix
+BUILD_LIBMLIB_EXCLUDE_SRC_PATTERNS := /unix/
 
 BUILD_LIBMLIB_CFLAGS := -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES -DMLIB_NO_LIBSUNMATH
 
@@ -698,7 +698,7 @@
 
   ifeq ($(call isTargetOs, macosx), true)
     # libjawt on macosx do not use the unix code
-    LIBJAWT_EXCLUDE_SRC_PATTERNS := unix
+    LIBJAWT_EXCLUDE_SRC_PATTERNS := /unix/
   endif
 
   ifeq ($(call isTargetOs, macosx), true)
@@ -788,7 +788,7 @@
 
   ifeq ($(call isTargetOs, macosx), true)
     # libsplashscreen on macosx do not use the unix code
-    LIBSPLASHSCREEN_EXCLUDE_SRC_PATTERNS := unix
+    LIBSPLASHSCREEN_EXCLUDE_SRC_PATTERNS := /unix/
   endif
 
   LIBSPLASHSCREEN_CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE -DPNG_ARM_NEON_OPT=0