parser now parses "subsystems"

This commit is contained in:
Antoine Drouin
2010-08-17 20:06:47 +00:00
parent 6c1776bc4f
commit 60e3d8c814
3 changed files with 7 additions and 12 deletions
-6
View File
@@ -163,11 +163,6 @@
<subsystem name="radio_control" type="ppm"/>
</target>
<!--
include $(PAPARAZZI_SRC)/conf/autopilot/fixed_wing.makefile
include $(PAPARAZZI_SRC)/conf/boards/tiny_2.11.makefile
include $(CFG_FIXED_WINGS)/radio_control_ppm.makefile
-->
<makefile>
BOARD_CFG = \"tiny_1_1.h\"
@@ -183,7 +178,6 @@ include $(CFG_FIXEDWING)/fixedwing_autopilot.makefile
include $(CFG_FIXEDWING)/subsystems/fixedwing_navigation.makefile
# IO Options
include $(CFG_FIXEDWING)/subsystems/fixedwing_radio_control_ppm.makefile
include $(CFG_FIXEDWING)/subsystems/fixedwing_actuators_4015.makefile
# Sensors
@@ -0,0 +1,2 @@
ap.CFLAGS += -DRADIO_CONTROL
ap.srcs += $(SRC_FIXEDWING)/radio_control.c $(SRC_ARCH)/ppm_hw.c
+5 -6
View File
@@ -101,13 +101,12 @@ let extract_makefile = fun airframe_file makefile_ac ->
fprintf f "\n# makefile target '%s' board '%s'\n\n" (Xml.attrib x "name") (Xml.attrib x "board");
fprintf f "include $(PAPARAZZI_SRC)/conf/autopilot/%s.makefile\n" (Xml.attrib x "name");
fprintf f "include $(PAPARAZZI_SRC)/conf/boards/%s.makefile\n" (Xml.attrib x "board");
let print_if_subsystem = (fun c ->
if ExtXml.tag_is c "subsystem" then begin
fprintf f "include $(CFG_%s)/%s_%s.makefile\n" (String.uppercase(Xml.attrib x "name")) (Xml.attrib c "name") (Xml.attrib c "type");
end) in
List.iter print_if_subsystem (Xml.children x)
with _ -> () end;
(**
match Xml.children x with
[Xml.PCData s] -> fprintf f "%s\n" s
| _ -> failwith (sprintf "Warning: wrong makefile section in '%s': %s\n" airframe_file (Xml.to_string_fmt x))
**)
end)
(Xml.children xml);