HExtlib.input_file BuildTimeConf.matitamake_makefile_template
in
let ext = Lazy.force am_i_opt in
- let cc = BuildTimeConf.runtime_base_dir ^ "/matitac" ^ ext in
- let rm = BuildTimeConf.runtime_base_dir ^ "/matitaclean" ^ ext in
- let mm = BuildTimeConf.runtime_base_dir ^ "/matitadep" ^ ext in
+ let binpath =
+ if HExtlib.is_executable
+ (BuildTimeConf.runtime_base_dir ^ "/matitac" ^ ext)
+ then BuildTimeConf.runtime_base_dir ^ "/" else ""
+ in
+ let cc = binpath ^ "matitac" ^ ext in
+ let rm = binpath ^ "matitaclean" ^ ext in
+ let mm = binpath ^ "matitadep" ^ ext in
let df = pool () ^ development.name ^ "/depend" in
let template = Pcre.replace ~pat:"@ROOT@" ~templ:development.root template in
let template = Pcre.replace ~pat:"@CC@" ~templ:cc template in
| None -> (try Sys.getenv "MATITA_FLAGS" with Not_found -> "")
| Some s -> s
in
- already_defined ^
- if Helm_registry.get_bool "matita.bench" then "-bench" else ""
+ let bench =
+ if Helm_registry.get_bool "matita.bench" then " -bench" else ""
+ in
+ let system =
+ if Helm_registry.get_bool "matita.system" then " -system" else ""
+ in
+ already_defined ^ bench ^ system
in
let csc = try ["SRC=" ^ Sys.getenv "SRC"] with Not_found -> [] in
rebuild_makefile development;
let flags = [] in
let flags =
try
- flags @ [ sprintf "MATITA_FLAGS=\"%s\"" matita_flags ]
+ flags @ [ sprintf "MATITA_FLAGS=%s" matita_flags ]
with Not_found -> flags in
let flags = flags @ csc in
let args =
let orig_matita_flags =
try Sys.getenv "MATITA_FLAGS" with Not_found -> ""
in
- "\"" ^ orig_matita_flags ^ "\"", "\"" ^ orig_matita_flags ^ " -system\""
+ orig_matita_flags, orig_matita_flags ^ " -system"
in
HLog.message "cleaning the development before publishing";
if clean ~matita_flags devel then