aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile.build5
1 files changed, 3 insertions, 2 deletions
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 $@'