aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Tassi2017-05-15 11:06:57 +0200
committerEnrico Tassi2017-05-23 10:48:28 +0200
commit2423f9e58e74dcb2fe9f3ddbbd417e5e1bf1ef24 (patch)
tree96f8f3d92a6121704512791a3ccfedf3f6c7c3ba
parent3759772965ba91a56f0a6614c192347fd0283edc (diff)
coq_makefile: avoid spurious ./ in generated .conf file
-rw-r--r--lib/coqProject_file.ml42
-rw-r--r--tools/CoqMakefile.in5
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/coqProject_file.ml4 b/lib/coqProject_file.ml4
index 64076d6049..7a16605695 100644
--- a/lib/coqProject_file.ml4
+++ b/lib/coqProject_file.ml4
@@ -105,6 +105,8 @@ let parse f =
;;
let process_cmd_line orig_dir proj args =
+ let orig_dir = (* avoids turning foo.v in ./foo.v *)
+ if orig_dir = "." then "" else orig_dir in
let error s = Feedback.msg_error (Pp.str (s^".")); exit 1 in
let mk_path d =
let p = CUnix.correct_path d orig_dir in
diff --git a/tools/CoqMakefile.in b/tools/CoqMakefile.in
index 11d9438fe2..1de7a5c243 100644
--- a/tools/CoqMakefile.in
+++ b/tools/CoqMakefile.in
@@ -168,7 +168,6 @@ vo_to_obj = $(addsuffix .o,\
$(filter-out Warning: Error:,\
$(shell $(COQBIN)coqtop -q -noinit -batch -quiet -print-mod-uid $(1))))
strip_dotslash = $(patsubst ./%,%,$(1))
-uniform_dotslash = $(addprefix ./,$(call strip_dotslash,$(1)))
VO = vo
VOFILES = $(VFILES:.v=.$(VO))
@@ -200,13 +199,13 @@ CMXSFILES = \
# files that are packed into a plugin (no extension)
PACKEDFILES = \
- $(call uniform_dotslash, \
+ $(call strip_dotslash, \
$(foreach lib, \
$(call strip_dotslash, \
$(MLPACKFILES:.mlpack=_MLPACK_DEPENDENCIES)),$($(lib))))
# files that are archived into a .cma (mllib)
LIBEDFILES = \
- $(call uniform_dotslash, \
+ $(call strip_dotslash, \
$(foreach lib, \
$(call strip_dotslash, \
$(MLLIBFILES:.mllib=_MLLIB_DEPENDENCIES)),$($(lib))))