new makefile section in airframe.xml

This commit is contained in:
Pascal Brisset
2005-11-09 15:54:09 +00:00
parent 47565e2b72
commit 8bc3e8cae1
6 changed files with 31 additions and 7 deletions
+14
View File
@@ -0,0 +1,14 @@
open Printf
let _ =
let f = Sys.argv.(1) in
let xml = Xml.parse_file f in
printf "# This file has been generated from %s\n" f;
printf "# Please DO NOT EDIT\n";
try
match Xml.children (ExtXml.child xml "makefile") with
[Xml.PCData s] ->
printf "%s\n" s
| _ -> ()
with
_ -> ()
+4
View File
@@ -102,6 +102,7 @@ let parse_command = fun command ->
printf " int16_t _var_%s = %s;\\\n" var v
| _ -> xml_error "set|let"
let parse_section = fun s ->
match Xml.tag s with
"section" ->
@@ -140,6 +141,9 @@ let parse_section = fun s ->
printf " uint16_t servo_value;\\\n";
List.iter parse_command (Xml.children s);
printf "}\n"
| "makefile" ->
()
(** Ignoring this section *)
| _ -> xml_error "param|servos|command"