mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 19:47:50 +08:00
fix bug for airframe file in subdirectory
This commit is contained in:
@@ -80,7 +80,6 @@ $(AIRFRAME_H) : $(CONF)/$(AIRFRAME_XML) $(CONF_XML) $(AIRCRAFT_MD5)
|
|||||||
@echo BUILD $@
|
@echo BUILD $@
|
||||||
$(Q)$(TOOLS)/gen_airframe.out $(AC_ID) $(AIRCRAFT) $(MD5SUM) $< > /tmp/airframe.h
|
$(Q)$(TOOLS)/gen_airframe.out $(AC_ID) $(AIRCRAFT) $(MD5SUM) $< > /tmp/airframe.h
|
||||||
$(Q)mv /tmp/airframe.h $@
|
$(Q)mv /tmp/airframe.h $@
|
||||||
$(Q)cp $< $(AIRCRAFT_CONF_DIR)/airframes
|
|
||||||
$(Q)cp $(CONF)/airframes/airframe.dtd $(AIRCRAFT_CONF_DIR)/airframes
|
$(Q)cp $(CONF)/airframes/airframe.dtd $(AIRCRAFT_CONF_DIR)/airframes
|
||||||
|
|
||||||
$(RADIO_H) : $(CONF)/$(RADIO) $(CONF_XML) $(TOOLS)/gen_radio.out
|
$(RADIO_H) : $(CONF)/$(RADIO) $(CONF_XML) $(TOOLS)/gen_radio.out
|
||||||
|
|||||||
@@ -34,8 +34,7 @@ let conf_xml = paparazzi_conf // "conf.xml"
|
|||||||
let modules_dir = paparazzi_conf // "modules"
|
let modules_dir = paparazzi_conf // "modules"
|
||||||
|
|
||||||
let mkdir = fun d ->
|
let mkdir = fun d ->
|
||||||
if not (Sys.file_exists d) then
|
assert (Sys.command (sprintf "mkdir -p %s" d) = 0)
|
||||||
U.mkdir d 0o755
|
|
||||||
|
|
||||||
(** Raises a Failure if an ID or a NAME appears twice in the conf *)
|
(** Raises a Failure if an ID or a NAME appears twice in the conf *)
|
||||||
let check_unique_id_and_name = fun conf ->
|
let check_unique_id_and_name = fun conf ->
|
||||||
@@ -236,6 +235,11 @@ let () =
|
|||||||
close_out f end;
|
close_out f end;
|
||||||
|
|
||||||
let airframe_file = value "airframe" in
|
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 *)
|
(** Calls the Makefile with target and options *)
|
||||||
let make = fun target options ->
|
let make = fun target options ->
|
||||||
|
|||||||
Reference in New Issue
Block a user