From: Krisztian Litkey Date: Mon, 13 Aug 2012 07:12:59 +0000 (+0300) Subject: build-sys: debug table generation fixes/cleanup. X-Git-Tag: accepted/2.0alpha/20121203.182640~327 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a253f9e9cfb7a80238c75d39872864cac417728;p=profile%2Fivi%2Fmurphy.git build-sys: debug table generation fixes/cleanup. --- diff --git a/build-aux/gen-debug-table b/build-aux/gen-debug-table index e507813..e97620f 100755 --- a/build-aux/gen-debug-table +++ b/build-aux/gen-debug-table @@ -45,7 +45,6 @@ emit_preamble() { } emit_postamble() { - emit emit "#include " } @@ -70,13 +69,15 @@ emit_function_info() { fi emit " { .line = $line, .func = \"$func\" }," done - emit " { .line = 0, .func = NULL }" - emit "};" - emit "static mrp_debug_file_t file_$(($cnt - 1)) = {" - emit " .file = \"$prev\"," - emit " .info = info_$(($cnt - 1))" - emit "};" - emit "" + if [ $cnt -gt 0 ]; then + emit " { .line = 0, .func = NULL }" + emit "};" + emit "static mrp_debug_file_t file_$(($cnt - 1)) = {" + emit " .file = \"$prev\"," + emit " .info = info_$(($cnt - 1))" + emit "};" + emit "" + fi emit "/* table of all files */" emit "static mrp_debug_file_t *debug_files[] = {" i=0 @@ -152,4 +153,4 @@ emit_preamble ctags -x --c-kinds=f $SOURCE | tr -s '\t' ' ' | \ cut -d ' ' -f 1,3,4 | sort -k 3,3 -k 2,2n | emit_function_info -emit_postamble \ No newline at end of file +emit_postamble