3 # This script generates the required file for supporting the debug
4 # channels used throught the code.
5 # The generated file is
7 # The script must be run in the root directory of the project.
9 # Dimitrie O. Paun <dimi@cs.toronto.edu>
10 # Patrik Stridvall <ps@leissner.se>
13 DEBUG_CHANNELS
=`tools/find_debug_channels`
15 exec > include
/debugdefs.h
18 /* Do not modify this file -- it is automatically generated! */
20 #include "debugtools.h"
22 #define DEBUG_CLASS_COUNT __DBCL_COUNT
26 const char * const debug_cl_name[] = { "fixme", "err", "warn", "trace" };
31 for ch
in $DEBUG_CHANNELS
33 echo "const int dbch_$ch = $chno;"
37 echo "#define DEBUG_CHANNEL_COUNT $chno"
41 echo 'char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {'
42 for ch
in $DEBUG_CHANNELS
44 if [ "${count}" != "${chno}" ]; then
49 count
=`expr $count + 1`
55 echo 'const char * const debug_ch_name[DEBUG_CHANNEL_COUNT] = {'
56 for ch
in $DEBUG_CHANNELS
58 if [ "${count}" != "${chno}" ]; then
63 count
=`expr $count + 1`
69 #endif /*DEBUG_RUNTIME*/
71 /* end of automatically generated debug.h */