make/common/MakeBase.gmk
changeset 23169 fdc2570ccbf4
parent 23168 d20a4165e3d2
child 23170 51e606ecede5
--- a/make/common/MakeBase.gmk	Tue Mar 11 12:04:50 2014 +0100
+++ b/make/common/MakeBase.gmk	Thu Mar 13 17:18:11 2014 +0100
@@ -436,7 +436,8 @@
 # Param 1 - Dir to find in
 ifeq ($(OPENJDK_BUILD_OS),windows)
   define FillCacheFind
-    FIND_CACHE_DIR += $1
+    # Remove any trailing slash from dirs in the cache dir list
+    FIND_CACHE_DIR += $$(patsubst %/,%, $1)
     FIND_CACHE := $$(sort $$(FIND_CACHE) $$(shell $(FIND) $1 -type f -o -type l))
   endef
 else
@@ -451,7 +452,7 @@
 # The extra - is needed when FIND_CACHE_DIR is empty but should be harmless.
 # Param 1 - Dirs to find in
 define CacheFind
-  $(if $(filter-out $(addsuffix %,- $(FIND_CACHE_DIR)),$1), \
+  $(if $(filter-out $(addsuffix /%,- $(FIND_CACHE_DIR)) $(FIND_CACHE_DIR),$1), \
     $(shell $(FIND) $1 -type f -o -type l), \
     $(filter $(addsuffix %,$1),$(FIND_CACHE)))
 endef