aboutsummaryrefslogtreecommitdiff
path: root/Makefile.ide
diff options
context:
space:
mode:
authorGaëtan Gilbert2019-10-30 16:10:40 +0100
committerGaëtan Gilbert2019-10-30 16:11:12 +0100
commitfe61f673dfdba1598842b9d56a761c5229aaf4e9 (patch)
tree7f8944287a502bde0df44c81f188cfe4f59cd32c /Makefile.ide
parentdbcdc4e53758339d2a7eb96d19fbcffeb143154d (diff)
make: guard cp calls with rm -f on executables
Fix #10728
Diffstat (limited to 'Makefile.ide')
-rw-r--r--Makefile.ide8
1 files changed, 3 insertions, 5 deletions
diff --git a/Makefile.ide b/Makefile.ide
index 39c6c8ad1e..bd72494289 100644
--- a/Makefile.ide
+++ b/Makefile.ide
@@ -110,7 +110,7 @@ $(COQIDE): $(LINKIDEOPT)
$(STRIP_HIDE) $@
else
$(COQIDE): $(COQIDEBYTE)
- cp $< $@
+ rm -f $@ && cp $< $@
endif
$(COQIDEBYTE): $(LINKIDE)
@@ -119,9 +119,7 @@ $(COQIDEBYTE): $(LINKIDE)
-linkpkg -package str,unix,dynlink,threads,lablgtk3-sourceview3 $(IDEFLAGS) $(IDECDEPSFLAGS) $^
ide/coqide_os_specific.ml: ide/coqide_$(IDEINT).ml.in config/Makefile
- @rm -f $@
- cp $< $@
- @chmod a-w $@
+ rm -f $@ && cp $< $@ && chmod a-w $@
ide/%.cmi: ide/%.mli
$(SHOW)'OCAMLC $<'
@@ -150,7 +148,7 @@ IDETOPCMX:=$(IDETOPCMA:.cma=.cmxa)
# Special rule for coqidetop
$(IDETOPEXE): $(IDETOP:.opt=.$(BEST))
- cp $< $@
+ rm -f $@ && cp $< $@
$(IDETOP): ide/idetop.ml $(LINKCMX) $(LIBCOQRUN) $(IDETOPCMX)
$(SHOW)'COQMKTOP -o $@'