diff options
| author | Robert Norton | 2018-04-26 15:12:24 +0100 |
|---|---|---|
| committer | Robert Norton | 2018-04-26 15:12:24 +0100 |
| commit | 0ee8e4d2dd1958d9a1aa45fbe8f67861d18e548c (patch) | |
| tree | 63d51b0a53508c7a79a32e1f667a28a4250ec4bb /src/process_file.ml | |
| parent | ae12f0feb0978eb1f511482293b1d1a20fb04ee4 (diff) | |
Add a new SHARE_DIR argument to use when doing opam build. For non-opam builds this defaults to git root.
Diffstat (limited to 'src/process_file.ml')
| -rw-r--r-- | src/process_file.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/process_file.ml b/src/process_file.ml index dd34f49c..a576c16e 100644 --- a/src/process_file.ml +++ b/src/process_file.ml @@ -150,11 +150,11 @@ let rec preprocess = function let sail_dir = try Sys.getenv "SAIL_DIR" with | Not_found -> - let lib_dir = Filename.concat Install_directory.d "lib" in - if Sys.is_directory lib_dir then - Install_directory.d + let share_dir = Share_directory.d in + if Sys.file_exists share_dir then + share_dir else - (failwith ("Library directory " ^ lib_dir ^ " does not exist. Make sure sail is installed or try setting environment variable SAIL_DIR so that I can find $include " ^ file)) + (failwith ("Library directory " ^ share_dir ^ " does not exist. Make sure sail is installed or try setting environment variable SAIL_DIR so that I can find $include " ^ file)) in let file = Filename.concat sail_dir ("lib/" ^ file) in let (Parse_ast.Defs include_defs) = parse_file file in |
