8139657: Incremental build of jdk.vm.ci-gensrc creates repeated entries in services file
Reviewed-by: twisti
--- a/hotspot/make/gensrc/Gensrc-jdk.vm.ci.gmk Sun Sep 06 10:13:18 2015 +0300
+++ b/hotspot/make/gensrc/Gensrc-jdk.vm.ci.gmk Tue Oct 20 10:24:40 2015 +0200
@@ -108,7 +108,11 @@
($(CD) $(GENSRC_DIR)/META-INF/jvmci.providers && \
for i in $$($(LS)); do \
c=$$($(CAT) $$i | $(TR) -d '\n\r'); \
- $(ECHO) $$i >> $(GENSRC_DIR)/META-INF/services/$$c; \
+ $(ECHO) $$i >> $(GENSRC_DIR)/META-INF/services/$$c.tmp; \
+ done)
+ ($(CD) $(GENSRC_DIR)/META-INF/services && \
+ for i in $$($(LS) *.tmp); do \
+ $(MV) $$i $${i%.tmp}; \
done)
$(TOUCH) $@