Project

General

Profile

« Previous | Next » 

Revision fa090c4e

Added by Xavier Thirioux over 10 years ago

corrected bug in arrow macros names, added storage attribute for static alloc macros, option -d now creates the destination directory if needed, with current dir as file permissions

git-svn-id: https://cavale.enseeiht.fr/svn/lustrec/lustre_compiler/trunk@181 041b043f-8d7c-46b2-b46e-ef0dd855326e

View differences:

src/main_lustre_compiler.ml
228 228
  report ~level:2 (fun fmt -> fprintf fmt "@[<v 2>@ %a@]@,@?"
229 229
    (Utils.fprintf_list ~sep:"@ " Machine_code.pp_machine)
230 230
    machine_code);
231

  
231
  
232
  (* Creating destination directory if needed *)
233
  if not (Sys.file_exists !Options.dest_dir) then (
234
    report ~level:1 (fun fmt -> fprintf fmt ".. creating destination directory@,@?");
235
    Unix.mkdir !Options.dest_dir (Unix.stat ".").Unix.st_perm
236
  );
237
  if (Unix.stat !Options.dest_dir).Unix.st_kind <> Unix.S_DIR then (
238
    Format.eprintf "Failure: destination %s is not a directory.@.@." !Options.dest_dir;
239
    exit 1
240
  );
232 241
  (* Printing code *)
233 242
  let basename    =  Filename.basename basename in
234 243
  let destname = !Options.dest_dir ^ "/" ^ basename in

Also available in: Unified diff