8154430: Imported modules rebuilt on second run when nothing has changed
Reviewed-by: alanb, tbell
--- a/make/CompileJavaModules.gmk Mon Apr 18 09:12:44 2016 +0200
+++ b/make/CompileJavaModules.gmk Mon Apr 18 17:18:41 2016 +0200
@@ -542,8 +542,9 @@
ifneq ($(wildcard $(IMPORT_MODULES_CLASSES)/$(MODULE)), )
$(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker: \
$(call CacheFind, $(IMPORT_MODULES_CLASSES)/$(MODULE))
- $(RM) -r $(@D)
- $(MKDIR) -p $(@D)
+ $(call MakeDir, $(@D))
+ # Do not delete marker and build meta data files
+ $(RM) -r $(filter-out $(@D)/_%, $(wildcard $(@D)/*))
$(CP) -R $(IMPORT_MODULES_CLASSES)/$(MODULE)/* $(@D)/
$(TOUCH) $@