From 26ca5d70f61f659b88a776c3253533dfbadccaee Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Fri, 29 Jun 2018 14:23:52 +0200 Subject: [build] Remove target binary before copy. Fixes #7666. Due to shared mapping of executables Linux doesn't allow to overwrite binaries that are running; we do as `ocamlopt` and delete the target file before copy. --- Makefile.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile.build') diff --git a/Makefile.build b/Makefile.build index b85418243..ed251af77 100644 --- a/Makefile.build +++ b/Makefile.build @@ -390,9 +390,10 @@ grammar/%.cmi: grammar/%.mli coqbinaries: $(TOPBIN) $(CHICKEN) $(CSDPCERT) $(FAKEIDE) coqbyte: $(TOPBYTE) $(CHICKENBYTE) -# Special rule for coqtop +# Special rule for coqtop, we imitate `ocamlopt` can delete the target +# to avoid #7666 $(COQTOPEXE): $(TOPBIN:.opt=.$(BEST)) - cp $< $@ + rm -f $@ && cp $< $@ bin/%.opt$(EXE): topbin/%_bin.ml $(LINKCMX) $(LIBCOQRUN) $(SHOW)'COQMKTOP -o $@' -- cgit v1.2.3