3 ARRAY_NAME=ul_log_domains_array
7 while [ $# -gt 0 ] ; do
10 echo -e Usage: `basename ${0}`" [options] <srcdir> .."
11 echo -e " -h --help help"
12 echo -e " -a --array identifier of log domain array variable"
15 "x--arrayx" | "x-ax" )
30 DOMAINS=$( for d in $DIRS ; do find -L $d '(' -name '*.c' -o -name '*.cc' ')' -exec grep UL_LOG_CUST '{}' ';' | \
31 sed -n -e 's/^.*UL_LOG_CUST(\([^)]*\)).*$/\1/p' ; done | sort -u )
35 #echo -e "#define UL_LOGL_DEF UL_LOGL_DEB\n"
38 echo " * This is generated file, do not edit it directly."
39 echo " * Take it from standard output of \"ul_log_domains\""
40 echo " * script called in the top level project directory"
43 for i in $DOMAINS ; do
44 echo "ul_log_domain_t $i = {UL_LOGL_DEF, \"$(echo -n $i | sed -n -e 's/ulogd_\(.*\)/\1/pg' )\"};"
48 echo "ul_log_domain_t *$ARRAY_NAME[] = {"
50 for i in $DOMAINS ; do