| # This script generates the required file for supporting the debug |
| # channels used throught the code. |
| # The script must be run in the root directory of the project. |
| # Dimitrie O. Paun <dimi@cs.toronto.edu> |
| # Patrik Stridvall <ps@leissner.se> |
| DEBUG_CHANNELS=`tools/find_debug_channels` |
| exec > include/debugdefs.h |
| /* Do not modify this file -- it is automatically generated! */ |
| #define DEBUG_CLASS_COUNT __DBCL_COUNT |
| const char * const debug_cl_name[] = { "fixme", "err", "warn", "trace" }; |
| for ch in $DEBUG_CHANNELS |
| echo "int dbch_$ch = $chno;" |
| echo "#define DEBUG_CHANNEL_COUNT $chno" |
| echo 'char debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {' |
| for ch in $DEBUG_CHANNELS |
| if [ "${count}" != "${chno}" ]; then |
| echo 'const char * const debug_ch_name[DEBUG_CHANNEL_COUNT] = {' |
| for ch in $DEBUG_CHANNELS |
| if [ "${count}" != "${chno}" ]; then |
| /* end of automatically generated debug.h */ |