fix bug for airframe file in subdirectory

This commit is contained in:
Pascal Brisset
2009-09-23 19:15:40 +00:00
parent cfe226828a
commit f0b11f7e2d
2 changed files with 6 additions and 3 deletions
+6 -2
View File
@@ -34,8 +34,7 @@ let conf_xml = paparazzi_conf // "conf.xml"
let modules_dir = paparazzi_conf // "modules"
let mkdir = fun d ->
if not (Sys.file_exists d) then
U.mkdir d 0o755
assert (Sys.command (sprintf "mkdir -p %s" d) = 0)
(** Raises a Failure if an ID or a NAME appears twice in the conf *)
let check_unique_id_and_name = fun conf ->
@@ -236,6 +235,11 @@ let () =
close_out f end;
let airframe_file = value "airframe" in
let airframe_dir = Filename.dirname airframe_file in
let var_airframe_dir = aircraft_conf_dir // airframe_dir in
mkdir var_airframe_dir;
assert (Sys.command (sprintf "cp %s %s" (paparazzi_conf // airframe_file) var_airframe_dir) = 0);
(** Calls the Makefile with target and options *)
let make = fun target options ->