8139657: Incremental build of jdk.vm.ci-gensrc creates repeated entries in services file
authorerikj
Tue, 20 Oct 2015 10:24:40 +0200
changeset 33448 666c82f3bd5a
parent 33447 fa16119dcde7
child 33450 08222df07d0d
8139657: Incremental build of jdk.vm.ci-gensrc creates repeated entries in services file Reviewed-by: twisti
hotspot/make/gensrc/Gensrc-jdk.vm.ci.gmk
--- 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) $@