fixes generation of Makefile.ac, previously failed if processor attribute was set for target. fixes issue #90

This commit is contained in:
Felix Ruess
2011-11-19 13:56:02 +01:00
parent f8f68db40c
commit fd2a6ffc55
+6 -1
View File
@@ -232,7 +232,12 @@ let parse_firmware = fun makefile_ac firmware ->
(* print makefile for this target *)
fprintf makefile_ac "\n###########\n# -target: '%s'\n" (Xml.attrib target "name");
fprintf makefile_ac "ifeq ($(TARGET), %s)\n" (Xml.attrib target "name");
try fprintf makefile_ac "BOARD_PROCESSOR = %s\n" (Xml.attrib target "processor") with _ -> ();
let has_processor =
try
not (String.compare (Xml.attrib target "processor") "" = 0)
with _ -> false in
if has_processor then
fprintf makefile_ac "BOARD_PROCESSOR = %s\n" (Xml.attrib target "processor");
List.iter (print_firmware_configure makefile_ac) config;
List.iter (print_firmware_configure makefile_ac) t_config;
List.iter (print_firmware_define makefile_ac) defines;