From 2423f9e58e74dcb2fe9f3ddbbd417e5e1bf1ef24 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Mon, 15 May 2017 11:06:57 +0200 Subject: coq_makefile: avoid spurious ./ in generated .conf file --- lib/coqProject_file.ml4 | 2 ++ tools/CoqMakefile.in | 5 ++--- 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)))) -- cgit v1.2.3