From: <zw...@ma...> - 2009-05-12 09:12:15
|
Author: zwelch Date: 2009-05-12 09:12:10 +0200 (Tue, 12 May 2009) New Revision: 1754 Modified: trunk/tools/rlink_make_speed_table/rlink_make_speed_table.pl Log: Update rlink_make_speed_table.pl script to add config.h to its output. Modified: trunk/tools/rlink_make_speed_table/rlink_make_speed_table.pl =================================================================== --- trunk/tools/rlink_make_speed_table/rlink_make_speed_table.pl 2009-05-12 07:03:50 UTC (rev 1753) +++ trunk/tools/rlink_make_speed_table/rlink_make_speed_table.pl 2009-05-12 07:12:10 UTC (rev 1754) @@ -21,14 +21,21 @@ # A simple utility to read a list of files (names composed by numeric prescaler arguments) and compose a C source file defining data structures which hold the binary data read from those files. -@speed_table = (); +my @speed_table = (); -printf("/* This file was created automatically by %s. */\n\n", $0); -for $i ('rlink', 'st7') { - printf("#include \"$i.h\"\n"); -} -printf("\n"); +print <<HEADER; +/* This file was created automatically by the following script: + * $0 + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "rlink.h" +#include "st7.h" + +HEADER + for $prescaler (sort {$b <=> $a} @ARGV) { my(@ary) = ( byte_array_from_file(${prescaler} . "_init.dtc"), |